23 May
                
                    2007
                
            
            
                23 May
                
                '07
                
            
            
            
        
    
                3:17 p.m.
            
        On Wed, 23 May 2007 19:54:27 +0100
"Neil Mitchell" 
Hi
foo = do (1 :: Int)
While intuitively this should be disallowed, it seems a pity that desugaring couldn't be totally separated from typechecking. Hmm.
You can always desugar as:
do x ==> return () >> x
Although then you are relying on the Monad laws more than you possibly should. You could also have:
monady :: Monad m => m a -> m a monady x = x
do x ==> monady x
How about: do x ==> (x :: Monad m => m a) Or even: do x ==> (asTypeOf x (return ())) Cheers, Spencer Janssen