[GHC] #15413: Poor error message when trying to import non-existent class methods

GHC ghc-devs at haskell.org
Wed Jul 25 11:25:47 UTC 2018


#15413: Poor error message when trying to import non-existent class methods
-------------------------------------+-------------------------------------
        Reporter:                    |                Owner:  (none)
  quasicomputational                 |
            Type:  bug               |               Status:  new
        Priority:  normal            |            Milestone:  8.6.1
       Component:  Compiler          |              Version:  8.4.2
      Resolution:                    |             Keywords:
Operating System:  Unknown/Multiple  |         Architecture:
                                     |  Unknown/Multiple
 Type of failure:  None/Unknown      |            Test Case:
      Blocked By:                    |             Blocking:
 Related Tickets:                    |  Differential Rev(s):
       Wiki Page:                    |
-------------------------------------+-------------------------------------

Comment (by Simon Peyton Jones <simonpj@…>):

 In [changeset:"f7d3054a133247cea1f488993695d3cbb941f29d/ghc"
 f7d3054a/ghc]:
 {{{
 #!CommitTicketReference repository="ghc"
 revision="f7d3054a133247cea1f488993695d3cbb941f29d"
 Improve error message on un-satisfied import

 Consider
   import M( C( a,b,c ) )
 where class C is defined as
   module M where
      class C x where
         a :: blah
         c :: blah

 Tnen (Trac #15413) we'd like to get an error message only about
 failing to import C( b ), not C( a,b,c ).

 This was fairly easy (and local) to do.

 Turned out that the existing tests mod81 and mod91 are adequate
 tests for the feature.
 }}}

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


More information about the ghc-tickets mailing list