[Haskell-cafe] Partial application in case expression rules

Patrick Premont ppremont at cognimeta.com
Tue Nov 6 00:04:16 CET 2012

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 <allbery.b at gmail.com> wrote:

>On Mon, Nov 5, 2012 at 4:15 PM, Stephen Tetley <stephen.tetley at gmail.com>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
>the H'2010 version.
>brandon s allbery kf8nh                               sine nomine associates
>allbery.b at gmail.com                                  ballbery at sinenomine.net
>unix/linux, openafs, kerberos, infrastructure          http://sinenomine.net

More information about the Haskell-Cafe mailing list