[GHC] #10471: Confusing parse error when forgetting "deriving"

#10471: Confusing parse error when forgetting "deriving" -------------------------------------+------------------------------------- Reporter: | Owner: AlexanderThiemann | Status: new Type: bug | Milestone: Priority: normal | Version: 7.6.3 Component: Compiler | Operating System: Unknown/Multiple Keywords: | Type of failure: Incorrect Architecture: | warning at compile-time Unknown/Multiple | Blocked By: Test Case: | Related Tickets: Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- This code: {{{ module Main where data Foo = Foo { f_x :: Int , f_y :: Int } (Eq, Show) }}} Produces this error message: {{{ foo.hs:5:7: Not in scope: `f_x' foo.hs:6:7: Not in scope: `f_y' }}} I'm not sure how easy it is to improve the error message; but a "Not in scope" seems very confusing to me... -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10471 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10471: Confusing parse error when forgetting "deriving" -------------------------------------+------------------------------------- Reporter: | Owner: AlexanderThiemann | Status: closed Type: bug | Milestone: Priority: normal | Version: 7.6.3 Component: Compiler | Keywords: Resolution: duplicate | Architecture: Operating System: Unknown/Multiple | Unknown/Multiple Type of failure: Incorrect | Test Case: warning at compile-time | Blocking: Blocked By: | Differential Revisions: Related Tickets: #8612 | -------------------------------------+------------------------------------- Changes (by thomie): * status: new => closed * resolution: => duplicate * related: => #8612 Comment: With 7.8 or newer you'd get: {{{ test.hs:5:6: error: Record syntax is illegal here: {f_x :: Int, f_y :: Int} test.hs:5:8: error: Not in scope: ‘f_x’ test.hs:6:8: error: Not in scope: ‘f_y’ }}} This was reported before, in #8612, and then closed as "not ideal, but acceptable". -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10471#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC