
#12384: Type family not reduced, again -------------------------------------+------------------------------------- Reporter: kosmikus | Owner: Type: bug | Status: closed Priority: normal | Milestone: Component: Compiler | Version: 8.0.1 Resolution: invalid | Keywords: Operating System: Linux | Architecture: Type of failure: GHC rejects | Unknown/Multiple valid program | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by simonpj): * status: new => closed * resolution: => invalid Comment: Yes, I think this is something we simply don't support at all. Associated type declarations are just a way to remind you to add `type instance` decl for D whenever you make an `instance` decl for `C`. It's always equivalent to doing it separately, thus: {{{ type instance D a = True instance (F a ~ Bool) => C a where }}} And you can see that this isn't going to work. The point is that `(F a ~ Bool)` is has local evidence, bound by the dictionary lambda for the instance dfun. That evidence can't be used in a `type instance` decl. So I'll close this as invalid, but you can re-open as a feature request if (a) you think it's important, (b) you can specify what it does, and (c) you can extend System FC to support it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/12384#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler