
I'm having a little difficulty finding full properties for Parsec3's Stream class, largely because I don't want to overspecify it with regard to side-effects. Here's the class:
class Stream s m t | s -> t where uncons :: s -> m (Maybe (t,s))
The idea is that: * unfoldM uncons gives the [t] corresponding to the stream * Assuming no relevant side-effects, unconsing the same value twice will yield the same result What's a relevant side-effect? Well, that's up to the stream and the monad it's built in - but unconsing once shouldn't affect the result of unconsing a second time unless you've found something fiendishly clever that I haven't thought of. Using stream mutability to implement a programming language from within the parsing monad is not a good idea, though no doubt someone'll do it anyway! -- flippa@flippac.org Society does not owe people jobs. Society owes it to itself to find people jobs.