[Haskell-cafe] Restricted file reading monad

Jason Dusek jason.dusek at gmail.com
Wed Oct 1 21:35:11 EDT 2008

  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

  I defined a "pointer walking" monad a while back, but that did
  all the IO with `unsafePerformIO`, so I could use a pure State


More information about the Haskell-Cafe mailing list