[GHC] #7791: Bad error message when strictness annotations are used without BangPatterns pragma

GHC cvs-ghc at haskell.org
Sun Mar 24 18:17:50 CET 2013


#7791: Bad error message when strictness annotations are used without BangPatterns
pragma
----------------------------------------------+-----------------------------
Reporter:  manzyuk                            |          Owner:                
    Type:  bug                                |         Status:  new           
Priority:  normal                             |      Component:  Compiler      
 Version:  7.4.1                              |       Keywords:                
      Os:  Linux                              |   Architecture:  x86_64 (amd64)
 Failure:  Incorrect warning at compile-time  |      Blockedby:                
Blocking:                                     |        Related:                
----------------------------------------------+-----------------------------

Comment(by monoidal):

 The error message is correct, since without extensions, the declaration
 `go ! k = ...` defines an operator called `!` (analogously to `go * k =
 ...`) and therefore `go` is out of scope in line 1. You can get a nice
 suggestion if you write `go (!k) = ...` or `go !k !l = ...`. It's hard to
 expect GHC to deduce from context whether a syntactically-correct `go ! k
 = ...` was meant to be something different.

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



More information about the ghc-tickets mailing list