
#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: ----------------------------------------------+----------------------------- Loading the program {{{ powers n = go 1 where go !k = k : go (k * n) }}} into GHCi results in an error: {{{ *Main> :load "/home/manzyuk/tmp/example.hs" [1 of 1] Compiling Main ( /home/manzyuk/tmp/example.hs, interpreted ) /home/manzyuk/tmp/example.hs:1:12: Not in scope: `go' Failed, modules loaded: none. }}} The error message is plain wrong. The problem is fixed by enabling {{{BangPatterns}}} pragma. It would be nice if GHC could suggest that like it does in many other similar cases. {{{ $ ghc --version The Glorious Glasgow Haskell Compilation System, version 7.4.1 $ uname -a Linux paddy 2.6.32-45-generic #104-Ubuntu SMP Tue Feb 19 21:20:09 UTC 2013 x86_64 GNU/Linux }}} -- Ticket URL: http://hackage.haskell.org/trac/ghc/ticket/7791 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler