Nested pattern binding translates to outermost binding?
simonpj at microsoft.com
Mon Jul 9 04:38:39 EDT 2007
In the section "Changes to the Report" of the Wiki page you refer to
I attempted to give the semantics of bang-patterns by saying what changes would be needed in the Haskell Report. If you think it's incomplete or ambiguous, then do yell.
(The wiki says that the changes are "incomplete" but I can't now think why!)
| -----Original Message-----
| From: haskell-prime-bounces at haskell.org [mailto:haskell-prime-bounces at haskell.org] On Behalf Of Dan
| Sent: 06 July 2007 20:08
| To: Haskell Prime
| Subject: Nested pattern binding translates to outermost binding?
| From Haskell' ticket #76:
| > 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?
| Haskell-prime mailing list
| Haskell-prime at haskell.org
More information about the Haskell-prime