Skip to content

bang pattern parsing inconsistency

-- Works
f2 (!x, !y) = [x, y]

-- Parse error on input '!'
len1 lst =
  case lst of
    [] -> 0
    (!x : !xs) -> 1 + len1 xs

-- Parse error on input '!'
len2 [] = 0
len2 (!x : !xs) = 1 + len xs

Tried with: HEAD, 7.10.2.

Trac metadata
Trac field Value
Version 7.11
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component Compiler
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information