On 26.09 10:01, Adam Langley wrote:
> >For the decoding part:
> >* Provide a monadic interface
> 
> Are you suggesting a monad to pass in the input around, or that it
> returns mzero on error? The latter makes more sense to me.

Yes. Also make it possible for user supplied functions to fail
in better ways than to produce Either or use error.

> >* Add a test part to ReadType:
> >    Test :: ReadType a -> (a -> Bool) -> ReadType Test
> >    (or a -> m ()) in the monadic case.
> 
> Again, I'm not clear what you are thinking of here?

In some protocols I am using there are some fixed bytes
which I want to ignore (no Haskell value produced), but
check that they are valid in the data stream.

- Einar Karttunen
_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to