[Haskell-cafe] data PLZ a

Donald Bruce Stewart dons at cse.unsw.edu.au
Tue May 29 03:22:21 EDT 2007

We got the names wrong!

    data PLZ a = AWSUM_THX a | O_NOES String

    instance Monad PLZ where
        return            = AWSUM_THX
        fail              = O_NOES
        O_NOES s    >>= _ = O_NOES s
        AWSUM_THX x >>= f = f x

Thanks to mauke on #haskell.

-- Don

More information about the Haskell-Cafe mailing list