
19 Mar
2010
19 Mar
'10
6:10 p.m.
On Fri, 19 Mar 2010, oleg@okmij.org wrote:
Paul Brauner wrote:
is there a way in some haskell extension to explicit (system F's) big lambdas and (term Type) applications in order to help type inference?
Actually, yes: newtype constructor introductions may act as a big lambda, with constructor elimination acting as type applications: http://okmij.org/ftp/Haskell/types.html#some-impredicativity
Newtypes are also handy for turning type functions (defined by type families) into real lambdas. For example, given the following code
Isn't this the equivalent of explicitly naming a function rather than making an anonymous one with lambda? Cheers, Ganesh