[Haskell-cafe] Partial application in case expression rules

Brandon Allbery allbery.b at gmail.com
Mon Nov 5 22:29:30 CET 2012


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
http://www.haskell.org/onlinereport/haskell2010/haskellch3.html#x8-490003.15for
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20121105/c693b7a1/attachment.htm>


More information about the Haskell-Cafe mailing list