I noticed that StateT can enclose IO actions for instance.  So you are saying the whole Parsec library would need to be rewritten as something like a ParsecT transformer monad for this to work? If this is the case I suppose I will stick with returning my list of include files. - Greg

----- Original Message ----
From: Bulat Ziganshin <bulat.ziganshin@gmail.com>
To: Gregory Propf <gregorypropf@yahoo.com>
Cc: haskell-cafe@haskell.org
Sent: Saturday, August 11, 2007 11:33:00 PM
Subject: Re: Fw: [Haskell-cafe] IO within parser

Hello Gregory,

Sunday, August 12, 2007, 9:32:04 AM, you wrote:

>> I've been struggling with writing a parser that needs to parse include
>> files within source files.  

Parsec can't accomplish with without using unsafePerformIO because
it's monad is pure. it's algorithmically impossible to have any i/o
actions inside it. there was plans to rewrite Parsec in
monad-transformer way and afair it was even one of GSOC projects

--
Best regards,
Bulat                            mailto:Bulat.Ziganshin@gmail.com




Yahoo! oneSearch: Finally, mobile search that gives answers, not web links.