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

GHC ghc-devs at haskell.org
Thu Aug 6 00:46:44 UTC 2015


#7102: Type family instance overlap accepted in ghci
-------------------------------------+-------------------------------------
        Reporter:  exbb2             |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  normal            |               Milestone:
       Component:  GHCi              |                 Version:  7.4.1
      Resolution:                    |                Keywords:
Operating System:  Unknown/Multiple  |            Architecture:
 Type of failure:  GHC accepts       |  Unknown/Multiple
  invalid program                    |               Test Case:
      Blocked By:                    |                Blocking:
 Related Tickets:                    |  Differential Revisions:
-------------------------------------+-------------------------------------
Changes (by oerjan):

 * cc: oerjan (added)
 * status:  closed => new
 * resolution:  wontfix =>


Comment:

 I think this behavior should be reconsidered when Safe Haskell is enabled.

 {{{
 Prelude> :set -XSafe
 Prelude> :seti -XSafe
 Prelude> :set -XTypeFamilies
 Prelude> type family T a b
 Prelude> type instance T a b = a
 Prelude> let fro :: a -> T a b; fro = id
 Prelude> type instance T a b = b
 Prelude> let uc :: a -> b; uc = fro
 Prelude> uc 'a' :: Int
 97
 }}}

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


More information about the ghc-tickets mailing list