[GHC] #8155: Defaulting bug or unfortunate error message with closed type families

GHC ghc-devs at haskell.org
Fri Aug 23 17:17:21 UTC 2013


#8155: Defaulting bug or unfortunate error message with closed type families
-------------------------------------+------------------------------------
        Reporter:  nh2               |            Owner:
            Type:  bug               |           Status:  closed
        Priority:  normal            |        Milestone:
       Component:  Compiler          |          Version:  7.6.3
      Resolution:  invalid           |         Keywords:
Operating System:  Unknown/Multiple  |     Architecture:  Unknown/Multiple
 Type of failure:  None/Unknown      |       Difficulty:  Unknown
       Test Case:                    |       Blocked By:
        Blocking:                    |  Related Tickets:
-------------------------------------+------------------------------------

Comment (by goldfire):

 It's hard for me to see how to do this. It seems that the problem is that
 your closed type family contains an equation which does not fire in the
 general case. But, this equation does fire in more specific cases, when
 the type variable is fully instantiated. I could imagine issuing a warning
 in this situation, but it would seem that this isn't always a programmer
 mistake. I could also imagine tracking when you have an equation like this
 that doesn't fire and then reporting that to the user along with other
 type errors, in case those errors are related. But, that would take a fair
 amount of very specific plumbing to pull together, and it's not obvious
 that this is the right idea.

 Do you see a better way forward here? What should be reported and when?

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




More information about the ghc-tickets mailing list