[Haskell-beginners] Is there a simpler way? Building a monad on `IO' Monad
Arlen Cuss
celtic at sairyx.org
Mon Jan 10 09:26:55 CET 2011
Hi Daniel,
> If it is not mutated at all (which seems not entirely unlikely with a pair
> (stdin,stdout) of Handles), you should use
>
> ReaderT (Handle,Handle) IO
>
> instead of
>
> StateT (Handle,Handle) IO
Thank you so much! Your careful exposition of the avenues available to
me in the previous email was amazing, and is most, most appreciated! I
had a feeling what I was doing was probably a common occurrence, but
haven't seen enough real-world Haskell code to know what to call it yet!
> Cheers,
> Daniel
Thanks again;
Arlen
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part
URL: <http://www.haskell.org/pipermail/beginners/attachments/20110110/611c59b4/attachment-0001.pgp>
More information about the Beginners
mailing list