[GHC] #7102: Type family instance overlap accepted in ghci
GHC
ghc-devs at haskell.org
Mon Feb 6 02:25:01 UTC 2017
#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: |
-------------------------------------+-------------------------------------
Comment (by Ben Gamari <ben@…>):
In [changeset:"0abe7361249b0b4dc43dc66547451da8916b30bf/ghc"
0abe7361/ghc]:
{{{
#!CommitTicketReference repository="ghc"
revision="0abe7361249b0b4dc43dc66547451da8916b30bf"
Don't replace type family instances with the same LHS in GHCi (#7102)
This fixes the easy part of #7102 by removing the logic that lets the
user replace a type family instance with a new one with the same LHS.
As discussed on that ticket, this is unsound in general. Better to have
the user redefine the type family from scratch.
The example from comment:7 involving loading modules into ghci is not
fixed yet; it actually doesn't rely on the instances having the same LHS.
This commit adds an expect_broken test for that example as well.
Test Plan: T7102a for the fix; T7102 is the test not fixed yet
Reviewers: dfeuer, austin, bgamari, goldfire
Reviewed By: dfeuer
Subscribers: dfeuer, thomie
Differential Revision: https://phabricator.haskell.org/D2994
}}}
--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/7102#comment:14>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the ghc-tickets
mailing list