
1 Oct
2008
1 Oct
'08
9:35 p.m.
This is something of the blind leading the blind, but you seem to need a bit of state monad mixed with IO monad. So you could look into StateT, a monad transformer, which should make you a StateIO monad specialized to FileReader. Then you define a `runFileReader` that allows you to jump into the FileReader monad. I defined a "pointer walking" monad a while back, but that did all the IO with `unsafePerformIO`, so I could use a pure State monad. -- _jsn