CMonad.hascasl revision 9b3f1a9c8994dc5a964d53de628f650317fa6d6f
9b3f1a9c8994dc5a964d53de628f650317fa6d6fChristian Maederclass Functor < Type -> Type
4f759b699e41703e06e6ce522072aa3210953561Christian Maederclass Monad < Functor
4f759b699e41703e06e6ce522072aa3210953561Christian Maedertype List : Monad
9b3f1a9c8994dc5a964d53de628f650317fa6d6fChristian Maedervar a, b : Type
9b3f1a9c8994dc5a964d53de628f650317fa6d6fChristian Maederop return : a -> m a
4f759b699e41703e06e6ce522072aa3210953561Christian Maedervar f : Functor
4f759b699e41703e06e6ce522072aa3210953561Christian Maederop fmap : (a -> b) -> f a -> f b
9b3f1a9c8994dc5a964d53de628f650317fa6d6fChristian Maederop empty : List a
9b3f1a9c8994dc5a964d53de628f650317fa6d6fChristian Maedertype Set : Functor
4f759b699e41703e06e6ce522072aa3210953561Christian Maederop emptySet : Set a
4f759b699e41703e06e6ce522072aa3210953561Christian Maeder. fail = emptySet
4f759b699e41703e06e6ce522072aa3210953561Christian Maeder. fail = empty
4f759b699e41703e06e6ce522072aa3210953561Christian Maederop map : (a -> b) -> List a -> List b
4f759b699e41703e06e6ce522072aa3210953561Christian Maederop __bind__ : m a * (a -> m b) -> m b
4f759b699e41703e06e6ce522072aa3210953561Christian Maedervar g : a -> b; var x : m a
4f759b699e41703e06e6ce522072aa3210953561Christian Maeder. fmap g = map g
c6456fd6e9cc28e09be25058d38fd41cc49a87e9Christian Maeder. fmap g x = x bind \ y: a .! return (g y)