Permalink
Browse files

Initial test for Trac #4175

  • Loading branch information...
1 parent dfc87c8 commit 886872b78fa9d5ee56eea850a75824c8752b3237 @simonpj simonpj committed Mar 15, 2013
Showing with 84 additions and 0 deletions.
  1. +24 −0 tests/ghci/scripts/T4175.hs
  2. +8 −0 tests/ghci/scripts/T4175.script
  3. +52 −0 tests/ghci/scripts/T4175.stdout
View
24 tests/ghci/scripts/T4175.hs
@@ -0,0 +1,24 @@
+{-# LANGUAGE TypeFamilies #-}
+module T4175 where
+
+type family A a b
+type instance A Int Int = ()
+type instance A (Maybe a) a = a
+
+data family B a
+data instance B () = MkB
+
+class C a where
+ type D a b
+
+instance C Int where
+ type D Int () = String
+
+instance C () where
+ type D () () = Bool
+
+type family E a
+
+type instance where
+ E () = Bool
+ E Int = String
View
8 tests/ghci/scripts/T4175.script
@@ -0,0 +1,8 @@
+:l T4175.hs
+:i A
+:i B
+:i D
+:i E
+:i ()
+:i Maybe
+:i Int
View
52 tests/ghci/scripts/T4175.stdout
@@ -0,0 +1,52 @@
+type family A a b :: * -- Defined at T4175.hs:4:13
+type instance A (Maybe a) a -- Defined at T4175.hs:6:15
+type instance A Int Int -- Defined at T4175.hs:5:15
+data family B a -- Defined at T4175.hs:8:13
+data instance B () -- Defined at T4175.hs:9:15
+class C a where
+ type family D a b :: *
+ -- Defined at T4175.hs:12:10
+type D () () -- Defined at T4175.hs:18:10
+type D Int () -- Defined at T4175.hs:15:10
+type family E a :: * -- Defined at T4175.hs:20:13
+type instance where
+ E () -- Defined at T4175.hs:23:5
+ E Int -- Defined at T4175.hs:24:5
+data () = () -- Defined in ‛GHC.Tuple’
+instance C () -- Defined at T4175.hs:17:10
+instance Bounded () -- Defined in ‛GHC.Enum’
+instance Enum () -- Defined in ‛GHC.Enum’
+instance Eq () -- Defined in ‛GHC.Classes’
+instance Ord () -- Defined in ‛GHC.Classes’
+instance Read () -- Defined in ‛GHC.Read’
+instance Show () -- Defined in ‛GHC.Show’
+type instance where
+ E () -- Defined at T4175.hs:23:5
+ E Int -- Defined at T4175.hs:24:5
+type D () () -- Defined at T4175.hs:18:10
+type D Int () -- Defined at T4175.hs:15:10
+data instance B () -- Defined at T4175.hs:9:15
+data Maybe a = Nothing | Just a -- Defined in ‛Data.Maybe’
+instance Eq a => Eq (Maybe a) -- Defined in ‛Data.Maybe’
+instance Monad Maybe -- Defined in ‛Data.Maybe’
+instance Functor Maybe -- Defined in ‛Data.Maybe’
+instance Ord a => Ord (Maybe a) -- Defined in ‛Data.Maybe’
+instance Read a => Read (Maybe a) -- Defined in ‛GHC.Read’
+instance Show a => Show (Maybe a) -- Defined in ‛GHC.Show’
+type instance A (Maybe a) a -- Defined at T4175.hs:6:15
+data Int = GHC.Types.I# GHC.Prim.Int# -- Defined in ‛GHC.Types’
+instance C Int -- Defined at T4175.hs:14:10
+instance Bounded Int -- Defined in ‛GHC.Enum’
+instance Enum Int -- Defined in ‛GHC.Enum’
+instance Eq Int -- Defined in ‛GHC.Classes’
+instance Integral Int -- Defined in ‛GHC.Real’
+instance Num Int -- Defined in ‛GHC.Num’
+instance Ord Int -- Defined in ‛GHC.Classes’
+instance Read Int -- Defined in ‛GHC.Read’
+instance Real Int -- Defined in ‛GHC.Real’
+instance Show Int -- Defined in ‛GHC.Show’
+type instance where
+ E () -- Defined at T4175.hs:23:5
+ E Int -- Defined at T4175.hs:24:5
+type D Int () -- Defined at T4175.hs:15:10
+type instance A Int Int -- Defined at T4175.hs:5:15

0 comments on commit 886872b

Please sign in to comment.