Re: [Haskell-cafe] Partial application in case expression rules

I had not thought of this record syntax.
But it does not perform the currying effect shown in the example; it just drops the omitted fields.
Brandon Allbery
On Mon, Nov 5, 2012 at 4:15 PM, Stephen Tetley
wrote: There is a long extant GHC extension to elide constructor arguments
f (Leaf {}) = ...
f (Node {}) = ...
I don't think that's an extension, it falls out directly from how Haskell builds records on top of ADTs and is specified in the standard as such. See http://www.haskell.org/onlinereport/decls.html at the end of the "Labelled Fields" section for Haskell98, or the middle of section 3.15.2 in http://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-490003.15... the H'2010 version.
-- brandon s allbery kf8nh sine nomine associates allbery.b@gmail.com ballbery@sinenomine.net unix/linux, openafs, kerberos, infrastructure http://sinenomine.net
participants (1)
-
Patrick Premont