Skip to content

Legal Bang Patterns cannot parse

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?)

Edited by rem
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information