
#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