[Haskell-cafe] how to catch/bracket in yesod-1.6?
hafnersimon at gmail.com
Wed Apr 25 12:21:33 UTC 2018
>From the doc  there's a few instances you can use. `MonadResource`
sounds like the most obvious choice, with its `allocate` , but
that'll require you to refactor your application a bit. It's what I'd
recommend though. If that's unfeasable, there's always the new
`bracket_` on `MonadUnliftIO` 
2018-04-25 13:26 GMT+02:00 waldmann <johannes.waldmann at htwk-leipzig.de>:
> Dear Cafe,
> I wonder what's the recommended way to catch an exception,
> clean up resources, etc., in a yesod Handler.
> I was using Control.Monad.Catch.bracket_ in legacy code but now I get
> "No instance for (Control.Monad.Catch.MonadMask (HandlerFor App))"
> - J
> Haskell-Cafe mailing list
> To (un)subscribe, modify options or view archives go to:
> Only members subscribed via the mailman list are allowed to post.
More information about the Haskell-Cafe