Skip to content

Commit

Permalink
Remove upstreamed bracketEitherT.
Browse files Browse the repository at this point in the history
  • Loading branch information
MostAwesomeDude committed Jul 23, 2015
1 parent 1f5d3a5 commit b4abcc0
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -571,19 +571,6 @@ call o v as = left $ Refused o v as S.empty

-- | Evaluation helpers

bracketEitherT :: Monad m =>
EitherT e m a
-> (a -> EitherT e m b)
-> (a -> EitherT e m c)
-> EitherT e m c
bracketEitherT before after thing = do
a <- before
r <- thing a `catchError` (\err -> after a >> left err)
-- If catchError already triggered, then `after` already ran *and* we are
-- in a Left state, so `after` will not run again here.
_ <- after a
return r

scoped :: Monte a -> Monte a
scoped action =
bracketEitherT push pop (const action)
Expand Down

0 comments on commit b4abcc0

Please sign in to comment.