Strange strict-binding behavior
Summary
For some reason, when entering the following expression into ghci, it evaluates to ():
let !(p : q : _) = [2] in ()
I believe the correct behavior is a pattern-match failure, which I observe if:
- the variables
pandqare replaced with wildcards, or -
2is replaced with2 :: Int, or - I compile and run a whole program containing this expression
Environment
- GHC versions used: 9.0.2, 9.2.5, 9.4.4, 9.6.0.20230111