[GHC] #15458: Misleading error message on mising BangPatterns extension

#15458: Misleading error message on mising BangPatterns extension -------------------------------------+------------------------------------- Reporter: sergv | Owner: (none) Type: bug | Status: new Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Keywords: | Operating System: Linux Architecture: x86_64 | Type of failure: Poor/confusing (amd64) | error message Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- For following program I'm getting an unexpected error message. {{{#!hs foo :: Int -> Int foo = bar where bar :: Int -> Int bar !i = i }}} {{{ $ ghc -o Test Test.hs [1 of 1] Compiling Main ( Test.hs, Test.o ) Test.hs:4:5: error: The type signature for ‘bar’ lacks an accompanying binding | 4 | bar :: Int -> Int | ^^^ }}} Enabling `-XBangPatterns` fixes the issue but I wanted the compiler to suggest me to enable it: {{{ $ ghc -XBangPatterns -o Test Test.hs [1 of 1] Compiling Main ( Test.hs, Test.o ) Test.hs:1:1: error: The IO action ‘main’ is not defined in module ‘Main’ | 1 | foo :: Int -> Int | ^ }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15458 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#15458: Misleading error message on mising BangPatterns extension -------------------------------------+------------------------------------- Reporter: sergv | Owner: (none) Type: bug | Status: closed Priority: normal | Milestone: 8.6.1 Component: Compiler | Version: 8.4.3 Resolution: duplicate | Keywords: Operating System: Linux | Architecture: x86_64 Type of failure: Poor/confusing | (amd64) error message | Test Case: Blocked By: | Blocking: Related Tickets: #13600, #15166 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by RyanGlScott): * status: new => closed * resolution: => duplicate * related: => #13600, #15166 Comment: This is a duplicate of #13600, so I'll close this ticket in favor of that one. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/15458#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC