Newbie qustion about monads
Juanma Barranquero
jmbarranquero at laley.wke.es
Thu Oct 2 15:33:43 EDT 2003
On Thu, 2 Oct 2003 12:30:54 +0100
Alastair Reid <alastair at reid-consulting-uk.ltd.uk> wrote:
> Observational equivalence.
>
> For monads like list and maybe, this boils down to the normal equality because
> the standard equality on these types is exactly observational equality.
>
> For monads like IO, you can't define an Eq instance so it comes down to what
> can the user of the program observe.
OK.
But in my examples, the difference is observable only if I do define a
"count" or equivalent to show it. Otherwise, c1/c2 (or m1/m2) are
indistinguishable.
> (There's a little circularity there and I'm ignoring the exception part of
> parser monads but, hopefully, you get the idea.)
Yes, thanks a lot.
Juanma
More information about the Haskell-Cafe
mailing list