[GHC] #7102: Type family instance overlap accepted in ghci
GHC
cvs-ghc at haskell.org
Sat Jul 28 16:49:41 CEST 2012
#7102: Type family instance overlap accepted in ghci
-----------------------------------------+----------------------------------
Reporter: exbb2 | Owner:
Type: bug | Status: new
Priority: normal | Component: GHCi
Version: 7.4.1 | Keywords:
Os: Unknown/Multiple | Architecture: Unknown/Multiple
Failure: GHC accepts invalid program | Testcase:
Blockedby: | Blocking:
Related: |
-----------------------------------------+----------------------------------
This code works if I paste it line by line in ghci, but not if i try to
load or compile it.
{{{
{-# LANGUAGE TypeFamilies #-}
data Rec a b = Rec {unRec :: Rec a b -> b}
class RecursiveFun f where type A a b :: *; recurse :: f (A a b) b -> b
instance RecursiveFun Rec where type A a b = a; recurse r = unRec r r
instance RecursiveFun (->) where type A a b = Rec a b; recurse f = f (Rec
f)
}}}
--
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/7102>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler
More information about the Glasgow-haskell-bugs
mailing list