Re: [GHC] #7102: Type family instance overlap accepted in ghci

#7102: Type family instance overlap accepted in ghci -------------------------------------+------------------------------------- Reporter: exbb2 | Owner: rwbarton Type: bug | Status: new Priority: normal | Milestone: Component: GHCi | Version: 7.4.1 Resolution: | Keywords: TypeFamilies Operating System: Unknown/Multiple | Architecture: Type of failure: GHC accepts | Unknown/Multiple invalid program | Test Case: T7102a, T7102 Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Phab:D2994 Wiki Page: | -------------------------------------+------------------------------------- Changes (by rwbarton): * testcase: => T7102a, T7102 * differential: => Phab:D2994 Comment: There are actually two issues in this ticket. * The original issue, that you can replace type family instances in ghci as in comment:1. There was special logic to allow this (copied from the case of class instances), so fixing it was just deleting code (that I was going to have to change anyways, for another issue). I added test `T7102a` for this one. * The issue in comment:7 is different, and doesn't rely on the two instances having the same LHS. It's apparently not that ghci is replacing one instance with the other one, but rather that it never checks that the two instances are consistent with each other. So we need an additional consistency check somewhere. I haven't fixed this yet, but I added a expect_broken test `T7102` for it. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/7102#comment:12 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC