[GHC] #10732: Legal Bang Patterns cannot parse

GHC ghc-devs at haskell.org
Mon Aug 3 23:46:36 UTC 2015


#10732: Legal Bang Patterns cannot parse
-------------------------------------+-------------------------------------
        Reporter:  rem               |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  Compiler          |                 Version:  7.8.3
  (Parser)                           |                Keywords:  Bang
      Resolution:                    |  Pattern Parser
Operating System:  Unknown/Multiple  |            Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------
Description changed by rem:

Old description:

> According to the syntax provided by GHC user guide
>
> pat ::= !pat
>
> Both !!pat and pat : !pat should be accepted, but GHC gives parsing
> error. For detail see http://stackoverflow.com/questions/31790327/where-
> can-bangpatterns-appear

New description:

 According to the syntax provided by GHC user guide

 pat ::= !pat

 Both !!pat and pat : !pat should be accepted, but GHC gives parsing error.
 For detail see http://stackoverflow.com/questions/31790327/where-can-
 bangpatterns-appear

 There also lacks a formal documentation regarding where BangPatterns can
 appear (the User Guide mentions in passing that "a pattern with a bang at
 the outermost level is not allowed at the top level of a module." Are
 there other restrictions?)

--

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10732#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list