
If I have this right, Stream is a monad transformer.
Stream s m t means that it parses 's', is stacked with monad 'm' and has a
result of type 't'
So Identity is a monad, the simplest monad, defined as such:
newtype Indentity t = Identity { runIdentity :: t }
It's the identity monad, that does nothing special but wrapping its result.
2011/10/8 Captain Freako
Hi all,
In this definition from the Parsec library:
parse :: (Stream s Identity t) => Parsec s () a -> SourceName -> s -> Either ParseError aparse p = runP p ()
what's the significance of `Identity t'? (`t' isn't used anywhere.)
Thanks, -db
_______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe