[Haskell-beginners] MonadThrow, MonadReader and shake
PICCA Frederic-Emmanuel
frederic-emmanuel.picca at synchrotron-soleil.fr
Sat Dec 15 11:29:52 UTC 2018
> Hello,
Hello sylvain.
> The` toRuchePath` function has the following constraints on `m`:
> `MonadReader Beamline m, MonadThrow m`
> In your code, `m ~ Action` (from Shake) which doesn't fulfil the
> constraints (hence the error).
[...]
> If you want `m ~ ReaderT Beamline m IO`, you can use something like:
> `liftIO $ runReaderT stateBeforeCallingShake $ toRuchePath attachements`
> (you need `stateBeforeCallingShake <- ask` before calling shake).
ok, I will check this :).
Does it mean that if an instance of the MonadReader was writtent for shake (Action). it should work out of the box ?
Fred
More information about the Beginners
mailing list