[Haskell-cafe] Should "do 1" compile
Stefan Holdermans
stefan at cs.uu.nl
Wed May 23 17:09:52 EDT 2007
Spencer,
> How about:
>
> do x ==> (x :: Monad m => m a)
That one does not do it, because now you demand x to be polymorphic
in all monad types m and all monad-element types a, which I guess
restricts x to
undefined
and
return undefined
and combinations thereof, glued together by monadic binds.
> do x ==> (asTypeOf x (return ()))
Again, no, for now you restrict the element type to () and, hence,
you preclude, for instance,
do return False
Cheers,
Stefan
More information about the Haskell-Cafe
mailing list