
7 Feb
2006
7 Feb
'06
11:20 p.m.
I'll give the full desugaring, perhaps that will make it more clear:
foo :: (Monad m) => m Int foo = return id >>= (\i -> return (i 7))
fooSet :: Set Int fooSet = foo
mkMonadDictSet :: EqDict a -> MonadDict Set eqDictInt :: EqDict Int return :: MoandDict m -> a -> m a foo :: MonadDict m -> m Int foo monadDict = (>>=) monadDict (return monadDict id) (\i -> return monadDict (i 7)) fooSet :: Set Int fooSet = foo (mkMonadDictSet eqDictInt) John -- John Meacham - ⑆repetae.net⑆john⑈