
On Fri, 08 Dec 2006 07:31:25 -0500, Cat Dancer wrote:
On 12/7/06, J. Garrett Morris
wrote: foo :: ErrorT String IO Int
Since ErrorT String IO Int is not the same as IO, you can't use IO operations directly. In this case, you want:
< a <- lift getLine
You want:
< r <- runErrorT foo
Wow! I found your help terrific! Thank you! Can I give you some money?
I didn't see the original question, but there are some examples of this in the ConfigFile (formerly part of MissingH) docs here: http://software.complete.org/configfile/static/doc/Data-ConfigFile.html#12 After you read that, you'll probably also want to scroll back and look at the other examples of usage: http://software.complete.org/configfile/static/doc/Data-ConfigFile.html#9 to really give you a complete sense of the styles available. The Error monad is one of the really awesome things about Haskell, IMHO. -- John