CMonad.hascasl revision c6456fd6e9cc28e09be25058d38fd41cc49a87e9
4f759b699e41703e06e6ce522072aa3210953561Christian Maederclass Functor : Type -> Type
4f759b699e41703e06e6ce522072aa3210953561Christian Maederclass Monad < Functor
4f759b699e41703e06e6ce522072aa3210953561Christian Maedertype List : Monad
4f759b699e41703e06e6ce522072aa3210953561Christian Maedervar a, b : Type
4f759b699e41703e06e6ce522072aa3210953561Christian Maederop return : a -> m a
4f759b699e41703e06e6ce522072aa3210953561Christian Maedervar f : Functor
4f759b699e41703e06e6ce522072aa3210953561Christian Maederop fmap : (a -> b) -> f a -> f b
4f759b699e41703e06e6ce522072aa3210953561Christian Maederop empty : List a
4f759b699e41703e06e6ce522072aa3210953561Christian 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)