[Haskell-cafe] Re: rebinding >>= for restricted monads

Chung-chieh Shan ccshan at post.harvard.edu
Sun Dec 17 13:35:49 EST 2006


David Roundy <droundy at darcs.net> wrote in article <20061217155252.GC12828 at abridgegame.org> in gmane.comp.lang.haskell.cafe:
> class WitnessMonad wm where
>    (>>=) :: wm w w' a -> (a -> wm w' w'' b) -> wm w w'' b
>    (>>)   :: wm w w' a -> wm w' w'' b -> wm w w'' b
>    return :: a -> wm w w' a
>    fail   :: String -> wm w w' a

I suspect that you want "w" and "w'" to be the same type in the types of
"return" and "fail".

Previous work:

Atkey, Robert. 2006. Parameterised notions of computation. In MSFP 2006:
Workshop on mathematically structured functional programming, ed. Conor
McBride and Tarmo Uustalu. Electronic Workshops in Computing, British
Computer Society.  http://homepages.inf.ed.ac.uk/ratkey/param-notions.pdf

http://haskell.org/pipermail/haskell-cafe/2004-July/006448.html

-- 
Edit this signature at http://www.digitas.harvard.edu/cgi-bin/ken/sig
FORTH is a program that interfaces keyboards with computer.

Charles H.Moore, Geoffrey C. Leach, 1970.
http://www.ultratechnology.com/4th_1970.html



More information about the Haskell-Cafe mailing list