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

Ben Rudiak-Gould benrg@dark.darkweb.com
Fri, 1 Aug 2003 18:17:51 -0700 (PDT)


I wrote:

>   serialize                  :: (Serializable a) => BlockRecoder a Word8
>   unserialize                :: (Unserializable a) => BlockRecoder Word8 a

... except that as BlockRecoder is currently defined, these won't work
unless the type a is Storable also. Oops. They could be done this way
instead:

    serialize ::
      (Serializable a, InputStream s Word8, InputStream X a) => s -> X

    unserialize ::
      (Unserializable a, OutputStream s Word8, OutputStream X a) => s -> X


where X is some concrete type. Hope I got that right. (Also, I got the
types of filterXputStream wrong: t should be replaced by another concrete
type like X.)


-- Ben