[GHC] #12792: Wrong error message when using a data type as a class instance head

GHC ghc-devs at haskell.org
Wed Nov 30 15:52:12 UTC 2016


#12792: Wrong error message when using a data type as a class instance head
-------------------------------------+-------------------------------------
        Reporter:  nomeata           |                Owner:
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:
       Component:  Compiler          |              Version:  8.1
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
 Type of failure:  Incorrect         |  Unknown/Multiple
  error/warning at compile-time      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by nomeata):

 >  Unless imported, or from an earlier GHCi line. So yes, for imported
 things one could do better. Maybe that is useful enough to do.

 I think it would.

 (I’m still not convined that it’s not possible otherwise. If the renamer
 knows about what “Names” have which “methods” (and it seems it does, given
 the error message), then surely it must know what “Names” can have
 “methods” in the first place – namely classes. But I should just try it
 myself, or at least read the code carefully, instead of rambling here.)

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


More information about the ghc-tickets mailing list