[Haskell-cafe] lambda abstraction

Patrick Browne patrick.browne at dit.ie
Sun Jun 5 13:45:34 CEST 2011

Are the following two functions equivalent? (i.e. do they describe the
same computation)

let add1 a  = a + 2
let add2 = \ a -> a + 2

:t add1
add1 :: forall a. (Num a) => a -> a

:t add2
add2 :: forall a. (Num a) => a -> a

Does Haskell interpreter convert all functions in the form of add1 to
the lambda form of add2?

Does this lambda form represent the operational semantics of Haskell?

How should I translate the type information into English?


This message has been scanned for content and viruses by the DIT Information Services E-Mail Scanning Service, and is believed to be clean. http://www.dit.ie

More information about the Haskell-Cafe mailing list