Skip to content

Commit

Permalink
Cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AriFordsham committed Aug 3, 2022
1 parent 40da02f commit 26997df
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions Plutarch/CPS/Optics/Prism.hs
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,11 @@ instance CProfunctor r (ConcretePrism r a b) where
cdimap ab cd p
= ConcretePrism
{ cprismGet =
(\a ->
ab a >>=
cprismGet p >>=
either
(\c -> c >>= cd >>= return . Left . return)
(return . Right)
)
ab >=>
cprismGet p >=>
either
(\c -> Left . return <$> (c >>= cd))
(return . Right)
, cprismSet = (cprismSet p >=> cd)
}

Expand Down

0 comments on commit 26997df

Please sign in to comment.