type aliases in instances

Sven Panne [email protected]
Mon, 11 Mar 2002 19:15:26 +0100


Bernhard Reus wrote:

> Richard Uhtenwoldt wrote:
>> [...] GHC's source code defines many monads not in class Monad.
>>I'll write some untested code to give an idea of
>>the naming conventions used:
>>
>>type FooMd out = (a,b,c)->((a,b,c),out)
>>returnFooMd out = \s0->out
>>thenFooMd p k = \s0->let (s,out) = p s0
> 
> Thanks Richard. So this means it is common practice in the Haskell
> community to use type aliases and not to declare the monads as
> instances. [...]


Nope, it just means that at the time those parts were written the class
Monad didn't exist, i.e. pre-Haskell-1.3, IIRC.  :-)

Cheers,

    S.