[Haskell-cafe] Re: Do expression definition
gleb.alexeev at gmail.com
Mon Sep 13 05:28:05 EDT 2010
On 09/13/2010 12:23 PM, Michael Lazarev wrote:
> 2010/9/13 Henning Thielemann<lemming at henning-thielemann.de>:
>> It means that variables bound by let, may be instantiated to different types
> Can you give an example, please?
testOk = let f = id in (f 42, f True)
--testNotOk :: Monad m => m (Int, Bool)
--testNotOk = do f <- return id
-- return (f 42, f True)
Try uncommenting the 'testNotOk' definition.
More information about the Haskell-Cafe