Raw I/O library proposal, second (more pragmatic) draft

John Meacham john@repetae.net
Thu, 7 Aug 2003 16:06:03 -0700


On Thu, Aug 07, 2003 at 10:13:12AM +0100, Simon Marlow wrote:
 > 
> > Unless of course your stream type is a type constructor:
> > 
> > class InputStream s where
> >   streamGet :: s m e -> m e
> >   ...
> 
> I can see the advantage in abstracting over the element type (in fact, I
> think I'll explore that).
> 
> What would be the motivation for abstracting over the monad type?  IMHO,
> it has to be done consistently or not at all.  That is, *all* our IO
> code should be abstracted over the monad, and I don't think that's a
> good idea.

ArrayStreams could be implemented in the state monad. Not sure how
useful this is, but I imagine people would use it if it were available.
        John

-- 
---------------------------------------------------------------------------
John Meacham - California Institute of Technology, Alum. - john@foo.net
---------------------------------------------------------------------------