
20 Jan
2012
20 Jan
'12
11:36 a.m.
On Fri, Jan 20, 2012 at 5:53 AM, Simon Hengel
For testing I want to stub handles, performing all reads and writes in memory (and in process, so no mmap). From looking at the documentation of mkFileHandle[1], I think this should be possible. But it requires some work. Is there already something out there?
John Miliken has one on Hackage: http://hackage.haskell.org/package/knob I had a read-only version that I used for testing things a ways back: http://hackage.haskell.org/trac/ghc/attachment/ticket/4144/ByteStringHandle.... There might still be some things in GHC.IO.Handle that assume FD handles - I haven't tried it in a while. Antoine