[Haskell-cafe] Should "do 1" compile

David House dmhouse at gmail.com
Wed May 23 13:35:00 EDT 2007


On 23/05/07, Neil Mitchell <ndmitchell at gmail.com> wrote:
> As discussed on #haskell, the following code:
>
> ----------------
> module Foo where
> foo = do (1 :: Int)
> ----------------
>
> Compiles fine on Yhc, but doesn't on Hugs and GHC.

Why should it compile? Expressions in a do-block have to have the type
m a for some monad m, don't they?

-- 
-David House, dmhouse at gmail.com


More information about the Haskell-Cafe mailing list