
6 Jul
2007
6 Jul
'07
3:08 p.m.
From Haskell' ticket #76: http://hackage.haskell.org/trac/haskell-prime/wiki/BangPatterns
The main idea is to add a single new production to the syntax of patterns pat ::= !pat
Experiments (ghci -fbang-patterns -O2 -S, rename identifiers, then diff) shows that nested pattern bindings are equivalent to the outermost binding: !(!pat) ==> !pat !(~pat) ==> !pat ~(~pat) ==> ~pat ~(!pat) ==> ~pat but I do not see any wording to that effect either in the Haskell 98 report, the GHC documentation, or the Haskell' wiki. Have I overlooked it, or does it follow from the existing language definition? Dan