diff --git a/Plutarch/CPS/Optics/Prism.hs b/Plutarch/CPS/Optics/Prism.hs index 18abecd..6b5f087 100644 --- a/Plutarch/CPS/Optics/Prism.hs +++ b/Plutarch/CPS/Optics/Prism.hs @@ -37,9 +37,8 @@ instance CProfunctor r (ConcretePrism r a b) where cdimap ab cd p = ConcretePrism { cprismGet = - (\a -> - ab a >>= - cprismGet p >>= + (ab >=> + cprismGet p >=> either (\c -> c >>= cd >>= return . Left . return) (return . Right)