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

GHC ghc-devs at haskell.org
Mon Jun 1 13:05:05 UTC 2015


#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


More information about the ghc-tickets mailing list