Send Beginners mailing list submissions to
        beginners@haskell.org

To subscribe or unsubscribe via the World Wide Web, visit
        http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners
or, via email, send a message with subject or body 'help' to
        beginners-requ...@haskell.org

You can reach the person managing the list at
        beginners-ow...@haskell.org

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Beginners digest..."


Today's Topics:

   1. Re:  MonadThrow, MonadReader and shake (Sylvain Henry)


----------------------------------------------------------------------

Message: 1
Date: Tue, 18 Dec 2018 11:56:03 +0100
From: Sylvain Henry <sylv...@haskus.fr>
To: beginners@haskell.org
Subject: Re: [Haskell-beginners] MonadThrow, MonadReader and shake
Message-ID: <3b721fa7-cf7c-635e-ae79-0e4810c20...@haskus.fr>
Content-Type: text/plain; charset=utf-8; format=flowed


>> 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 :).
I've swapped the args above, it should be:

liftIO $ runReaderT (toRuchePath attachements) stateBeforeCallingShake

> Does it mean that if an instance of the MonadReader was writtent for shake 
> (Action). it should work out of the box ?

With additional `MonadThrow Action` and `MonadReader Beamline Action` 
instances it should work. But the MonadReader one is really specific to 
your use case.

Cheers,
Sylvain



------------------------------

Subject: Digest Footer

_______________________________________________
Beginners mailing list
Beginners@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/beginners


------------------------------

End of Beginners Digest, Vol 126, Issue 13
******************************************

Reply via email to