
14 Jul
2016
14 Jul
'16
8:24 p.m.
On 07/14/2016 08:06 PM, Oleg Grenrus wrote:
Maybe pointing out the obvious, but when used with lens, catchJust approach is handy:
— | here catchJust is from `exceptions` though catching :: MonadCatch m => Getting (First a) SomeException a -> m r -> (a -> m r) -> m r catching l = catchJust (preview l)
http://hackage.haskell.org/package/lens-4.14/docs/src/Control.Exception.Lens...
lens is not a very appealing to have as a dependency if one is oneself writing a library for others to consume. (Because of the huge set of dependencies.)