Skip to content

Incorrect parentheses in warning message

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.4.1
$ cat > test.hs
main | x <- 1*2+3*4 = undefined
$ ghc test.hs

test.hs:1:5:
    Warning: accepting non-standard pattern guards (-fglasgow-exts to suppress this message)
                 [x <- ((1 * 2) + 3) * 4, undefined]

The arithmetic expression is parenthesized incorrectly in the warning.

Trac metadata
Trac field Value
Version 6.4.1
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