[GHC] #8612: Error message "not in scope" on missing 'deriving'

GHC ghc-devs at haskell.org
Thu Dec 12 23:53:56 UTC 2013


#8612: Error message "not in scope" on missing 'deriving'
------------------------------------+-------------------------------------
       Reporter:  mirpa             |             Owner:
           Type:  bug               |            Status:  new
       Priority:  low               |         Milestone:
      Component:  Compiler          |           Version:  7.4.1
       Keywords:                    |  Operating System:  Unknown/Multiple
   Architecture:  Unknown/Multiple  |   Type of failure:  None/Unknown
     Difficulty:  Unknown           |         Test Case:
     Blocked By:                    |          Blocking:
Related Tickets:                    |
------------------------------------+-------------------------------------
 Incorrect definition like:

 {{{
 module Der where

 data A = A { a :: Int
            } (Show) -- missing deriving
 }}}

 gives error message:
 {{{
 der.hs:3:14: Not in scope: `a'
 }}}

 I had bigger data structure, where I concentrated on {{{a :: Int}}} part
 between parentheses trying to figure out why {{{a}}} is not defined.
 Missing {{{deriving}}} could easily escape your eye in such case.

 I would like to get something like:
 {{{
 der.hs:4:14: Unexpected `('
 }}}

 For instance Hugs says:
 {{{
 ERROR "der.hs":4 - Syntax error in input (unexpected `(')
 }}}

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/8612>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list