summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/ghci/scripts/T4175.hs4
-rw-r--r--testsuite/tests/ghci/scripts/T4175.stdout113
-rw-r--r--testsuite/tests/ghci/scripts/T6018ghcifail.stderr13
-rw-r--r--testsuite/tests/indexed-types/should_compile/T10931.hs2
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail10.hs3
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail10.stderr11
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail9.hs5
-rw-r--r--testsuite/tests/indexed-types/should_fail/SimpleFail9.stderr7
-rw-r--r--testsuite/tests/indexed-types/should_fail/T11450.hs9
-rw-r--r--testsuite/tests/indexed-types/should_fail/T11450.stderr7
-rw-r--r--testsuite/tests/indexed-types/should_fail/all.T5
-rw-r--r--testsuite/tests/polykinds/T10570.stderr14
-rw-r--r--testsuite/tests/th/T9692.hs2
-rw-r--r--testsuite/tests/th/T9692.stderr4
-rw-r--r--testsuite/tests/typecheck/should_fail/T6018fail.hs4
-rw-r--r--testsuite/tests/typecheck/should_fail/T6018fail.stderr13
-rw-r--r--testsuite/tests/typecheck/should_fail/T6018failclosed.stderr144
17 files changed, 200 insertions, 160 deletions
diff --git a/testsuite/tests/ghci/scripts/T4175.hs b/testsuite/tests/ghci/scripts/T4175.hs
index 0fc53e76e9..0b7b554062 100644
--- a/testsuite/tests/ghci/scripts/T4175.hs
+++ b/testsuite/tests/ghci/scripts/T4175.hs
@@ -16,10 +16,10 @@ class C a where
type D a b
instance C Int where
- type D Int () = String
+ type D Int b = String
instance C () where
- type D () () = Bool
+ type D () a = Bool
type family E a where
E () = Bool
diff --git a/testsuite/tests/ghci/scripts/T4175.stdout b/testsuite/tests/ghci/scripts/T4175.stdout
index e1ef925bea..d319bd630e 100644
--- a/testsuite/tests/ghci/scripts/T4175.stdout
+++ b/testsuite/tests/ghci/scripts/T4175.stdout
@@ -1,57 +1,56 @@
-type family A a b :: * -- Defined at T4175.hs:7:1
-type instance A (B a) b = () -- Defined at T4175.hs:10:15
-type instance A (Maybe a) a = a -- Defined at T4175.hs:9:15
-type instance A Int Int = () -- Defined at T4175.hs:8:15
-data family B a -- Defined at T4175.hs:12:1
-instance G B -- Defined at T4175.hs:34:10
-data instance B () = MkB -- Defined at T4175.hs:13:15
-type instance A (B a) b = () -- Defined at T4175.hs:10:15
-class C a where
- type family D a b :: *
- -- Defined at T4175.hs:16:5
-type instance D () () = Bool -- Defined at T4175.hs:22:10
-type instance D Int () = String -- Defined at T4175.hs:19:10
-type family E a :: *
- where
- E () = Bool
- E Int = String
- -- Defined at T4175.hs:24:1
-data () = () -- Defined in ‘GHC.Tuple’
-instance C () -- Defined at T4175.hs:21: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’
-instance Monoid () -- Defined in ‘GHC.Base’
-type instance D () () = Bool -- Defined at T4175.hs:22:10
-type instance D Int () = String -- Defined at T4175.hs:19:10
-data instance B () = MkB -- Defined at T4175.hs:13:15
-data Maybe a = Nothing | Just a -- Defined in ‘GHC.Base’
-instance Eq a => Eq (Maybe a) -- Defined in ‘GHC.Base’
-instance Monad Maybe -- Defined in ‘GHC.Base’
-instance Functor Maybe -- Defined in ‘GHC.Base’
-instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’
-instance Read a => Read (Maybe a) -- Defined in ‘GHC.Read’
-instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
-instance Applicative Maybe -- Defined in ‘GHC.Base’
-instance Foldable Maybe -- Defined in ‘Data.Foldable’
-instance Traversable Maybe -- Defined in ‘Data.Traversable’
-instance Monoid a => Monoid (Maybe a) -- Defined in ‘GHC.Base’
-type instance A (Maybe a) a = a -- Defined at T4175.hs:9:15
-data Int = I# Int# -- Defined in ‘GHC.Types’
-instance C Int -- Defined at T4175.hs:18: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 D Int () = String -- Defined at T4175.hs:19:10
-type instance A Int Int = () -- Defined at T4175.hs:8:15
-class Z a -- Defined at T4175.hs:28:1
-instance F (Z a) -- Defined at T4175.hs:31:10
+type family A a b :: * -- Defined at T4175.hs:7:1
+type instance A (B a) b = () -- Defined at T4175.hs:10:15
+type instance A (Maybe a) a = a -- Defined at T4175.hs:9:15
+type instance A Int Int = () -- Defined at T4175.hs:8:15
+data family B a -- Defined at T4175.hs:12:1
+instance G B -- Defined at T4175.hs:34:10
+data instance B () = MkB -- Defined at T4175.hs:13:15
+type instance A (B a) b = () -- Defined at T4175.hs:10:15
+class C a where
+ type family D a b :: *
+ -- Defined at T4175.hs:16:5
+type instance D () a = Bool -- Defined at T4175.hs:22:10
+type instance D Int b = String -- Defined at T4175.hs:19:10
+type family E a :: *
+ where
+ E () = Bool
+ E Int = String
+ -- Defined at T4175.hs:24:1
+data () = () -- Defined in ‘GHC.Tuple’
+instance C () -- Defined at T4175.hs:21: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’
+instance Monoid () -- Defined in ‘GHC.Base’
+type instance D () a = Bool -- Defined at T4175.hs:22:10
+data instance B () = MkB -- Defined at T4175.hs:13:15
+data Maybe a = Nothing | Just a -- Defined in ‘GHC.Base’
+instance Eq a => Eq (Maybe a) -- Defined in ‘GHC.Base’
+instance Monad Maybe -- Defined in ‘GHC.Base’
+instance Functor Maybe -- Defined in ‘GHC.Base’
+instance Ord a => Ord (Maybe a) -- Defined in ‘GHC.Base’
+instance Read a => Read (Maybe a) -- Defined in ‘GHC.Read’
+instance Show a => Show (Maybe a) -- Defined in ‘GHC.Show’
+instance Applicative Maybe -- Defined in ‘GHC.Base’
+instance Foldable Maybe -- Defined in ‘Data.Foldable’
+instance Traversable Maybe -- Defined in ‘Data.Traversable’
+instance Monoid a => Monoid (Maybe a) -- Defined in ‘GHC.Base’
+type instance A (Maybe a) a = a -- Defined at T4175.hs:9:15
+data Int = I# Int# -- Defined in ‘GHC.Types’
+instance C Int -- Defined at T4175.hs:18: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 D Int b = String -- Defined at T4175.hs:19:10
+type instance A Int Int = () -- Defined at T4175.hs:8:15
+class Z a -- Defined at T4175.hs:28:1
+instance F (Z a) -- Defined at T4175.hs:31:10
diff --git a/testsuite/tests/ghci/scripts/T6018ghcifail.stderr b/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
index c81c5218f8..5964262843 100644
--- a/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
+++ b/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
@@ -38,11 +38,14 @@
L a = MaybeSyn a -- Defined at <interactive>:49:15
<interactive>:55:41: error:
- Type family equation violates injectivity annotation.
- Kind variable ‘k’ cannot be inferred from the right-hand side.
- (enabling -fprint-explicit-kinds might help)
- In the type family equation:
- PolyKindVarsF '[] = '[] -- Defined at <interactive>:55:41
+ • Polymorphic type indexes of associated type ‘PolyKindVarsF’
+ (i.e. ones independent of the class type variables)
+ must be distinct type variables
+ Expected: PolyKindVarsF '[]
+ Actual: PolyKindVarsF '[]
+ Use -fprint-explicit-kinds to see the kind arguments
+ • In the type instance declaration for ‘PolyKindVarsF’
+ In the instance declaration for ‘PolyKindVarsC '[]’
<interactive>:60:15: error:
Type family equation violates injectivity annotation.
diff --git a/testsuite/tests/indexed-types/should_compile/T10931.hs b/testsuite/tests/indexed-types/should_compile/T10931.hs
index 44e5865177..2c0ea204d3 100644
--- a/testsuite/tests/indexed-types/should_compile/T10931.hs
+++ b/testsuite/tests/indexed-types/should_compile/T10931.hs
@@ -20,6 +20,6 @@ class ( m ~ Outer m (Inner m) ) => BugC (m :: * -> *) where
instance BugC (IdT m) where
type Inner (IdT m) = m
- type Outer (IdT _) = IdT
+ type Outer (IdT m) = IdT
bug f = IdC f
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail10.hs b/testsuite/tests/indexed-types/should_fail/SimpleFail10.hs
index 4bd7bde8df..57a9595254 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail10.hs
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail10.hs
@@ -8,6 +8,7 @@ class C8 a where
instance C8 Int where
data S8 Int a = S8Int a
--- Extra argument is not a variable; this is fine
+-- Extra argument is not a variable;
+-- this is now not allowed
instance C8 Bool where
data S8 Bool Char = S8Bool
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail10.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail10.stderr
new file mode 100644
index 0000000000..9b99cd1322
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail10.stderr
@@ -0,0 +1,11 @@
+
+SimpleFail10.hs:14:3: error:
+ • Polymorphic type indexes of associated type ‘S8’
+ (i.e. ones independent of the class type variables)
+ must be distinct type variables
+ Expected: S8 Bool <tv>
+ Actual: S8 Bool Char
+ where the `<tv>' arguments are type variables,
+ distinct from each other and from the instance variables
+ • In the data instance declaration for ‘S8’
+ In the instance declaration for ‘C8 Bool’
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail9.hs b/testsuite/tests/indexed-types/should_fail/SimpleFail9.hs
index 927c60caf0..9c1c4a82d2 100644
--- a/testsuite/tests/indexed-types/should_fail/SimpleFail9.hs
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail9.hs
@@ -8,8 +8,7 @@ class C7 a b where
instance C7 Char (a, Bool) where
data S7 (a, Bool) = S7_1
--- Used to fail, but now passes:
--- type indexes don't match the instance types by name
--- but do by structure
+-- Fails because the arg to S7 should be the
+-- same as that to C7
instance C7 Char (a, Int) where
data S7 (b, Int) = S7_2
diff --git a/testsuite/tests/indexed-types/should_fail/SimpleFail9.stderr b/testsuite/tests/indexed-types/should_fail/SimpleFail9.stderr
new file mode 100644
index 0000000000..b0c421fce8
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/SimpleFail9.stderr
@@ -0,0 +1,7 @@
+
+SimpleFail9.hs:14:3: error:
+ • Type indexes must match class instance head
+ Expected: S7 (a, Int)
+ Actual: S7 (b, Int)
+ • In the data instance declaration for ‘S7’
+ In the instance declaration for ‘C7 Char (a, Int)’
diff --git a/testsuite/tests/indexed-types/should_fail/T11450.hs b/testsuite/tests/indexed-types/should_fail/T11450.hs
new file mode 100644
index 0000000000..59ef495c53
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T11450.hs
@@ -0,0 +1,9 @@
+{-# LANGUAGE TypeFamilies #-}
+
+module T11450 where
+
+class C x where
+ type T x
+
+instance C (Either a b) where
+ type T (Either b a) = b -> a
diff --git a/testsuite/tests/indexed-types/should_fail/T11450.stderr b/testsuite/tests/indexed-types/should_fail/T11450.stderr
new file mode 100644
index 0000000000..a6fe961fcf
--- /dev/null
+++ b/testsuite/tests/indexed-types/should_fail/T11450.stderr
@@ -0,0 +1,7 @@
+
+T11450.hs:9:8: error:
+ • Type indexes must match class instance head
+ Expected: T (Either a b)
+ Actual: T (Either b a)
+ • In the type instance declaration for ‘T’
+ In the instance declaration for ‘C (Either a b)’
diff --git a/testsuite/tests/indexed-types/should_fail/all.T b/testsuite/tests/indexed-types/should_fail/all.T
index c6f29a492f..dfc0326154 100644
--- a/testsuite/tests/indexed-types/should_fail/all.T
+++ b/testsuite/tests/indexed-types/should_fail/all.T
@@ -11,8 +11,8 @@ test('SimpleFail5b', normal, compile_fail, [''])
test('SimpleFail6', normal, compile_fail, [''])
test('SimpleFail7', normal, compile_fail, [''])
test('SimpleFail8', normal, compile_fail, [''])
-test('SimpleFail9', normal, compile, [''])
-test('SimpleFail10', normal, compile, [''])
+test('SimpleFail9', normal, compile_fail, [''])
+test('SimpleFail10', normal, compile_fail, [''])
test('SimpleFail11a', normal, compile_fail, [''])
test('SimpleFail11b', normal, compile_fail, [''])
test('SimpleFail11c', normal, compile_fail, [''])
@@ -139,3 +139,4 @@ test('T10817', normal, compile_fail, [''])
test('T10899', normal, compile_fail, [''])
test('T11136', normal, compile_fail, [''])
test('T7788', normal, compile_fail, [''])
+test('T11450', normal, compile_fail, [''])
diff --git a/testsuite/tests/polykinds/T10570.stderr b/testsuite/tests/polykinds/T10570.stderr
index f40ed10ce4..3c91db5cfb 100644
--- a/testsuite/tests/polykinds/T10570.stderr
+++ b/testsuite/tests/polykinds/T10570.stderr
@@ -1,9 +1,9 @@
T10570.hs:10:10: error:
- Illegal instance declaration for ‘ConsByIdx2 Int a Proxy cls’
- The coverage condition fails in class ‘ConsByIdx2’
- for functional dependency: ‘x -> m’
- Reason: lhs type ‘Int’ does not determine rhs type ‘Proxy’
- Un-determined variable: k
- (Use -fprint-explicit-kinds to see the kind variables in the types)
- In the instance declaration for ‘ConsByIdx2 Int a Proxy cls’
+ • Illegal instance declaration for ‘ConsByIdx2 Int a Proxy cls’
+ The coverage condition fails in class ‘ConsByIdx2’
+ for functional dependency: ‘x -> m’
+ Reason: lhs type ‘Int’ does not determine rhs type ‘Proxy’
+ Un-determined variable: k
+ Use -fprint-explicit-kinds to see the kind arguments
+ • In the instance declaration for ‘ConsByIdx2 Int a Proxy cls’
diff --git a/testsuite/tests/th/T9692.hs b/testsuite/tests/th/T9692.hs
index 770290d7db..3f67b0dee9 100644
--- a/testsuite/tests/th/T9692.hs
+++ b/testsuite/tests/th/T9692.hs
@@ -8,7 +8,7 @@ import Language.Haskell.TH.Ppr
import System.IO
class C a where
- data F a (b :: k) :: *
+ data F a b :: *
instance C Int where
data F Int x = FInt x
diff --git a/testsuite/tests/th/T9692.stderr b/testsuite/tests/th/T9692.stderr
index ffa55365d4..f99d12bd74 100644
--- a/testsuite/tests/th/T9692.stderr
+++ b/testsuite/tests/th/T9692.stderr
@@ -1,2 +1,2 @@
-data family T9692.F (a_0 :: k_1) (b_2 :: k_3) :: *
-data instance T9692.F GHC.Types.Int (x_4 :: *) = T9692.FInt x_4
+data family T9692.F (a_0 :: k_1) (b_2 :: *) :: *
+data instance T9692.F GHC.Types.Int x_3 = T9692.FInt x_3
diff --git a/testsuite/tests/typecheck/should_fail/T6018fail.hs b/testsuite/tests/typecheck/should_fail/T6018fail.hs
index 44f5024f41..bb3c93c67b 100644
--- a/testsuite/tests/typecheck/should_fail/T6018fail.hs
+++ b/testsuite/tests/typecheck/should_fail/T6018fail.hs
@@ -50,8 +50,8 @@ type MaybeSyn a = Id a
type family L a = r | r -> a
type instance L a = MaybeSyn a
--- These should fail because given the RHS kind there is no way to determine LHS
--- kind
+-- These should fail because given the RHS kind
+-- there is no way to determine LHS kind
class PolyKindVarsC a where
type PolyKindVarsF a = (r :: k) | r -> a
diff --git a/testsuite/tests/typecheck/should_fail/T6018fail.stderr b/testsuite/tests/typecheck/should_fail/T6018fail.stderr
index 49e89afe54..95b9d1bb3e 100644
--- a/testsuite/tests/typecheck/should_fail/T6018fail.stderr
+++ b/testsuite/tests/typecheck/should_fail/T6018fail.stderr
@@ -58,11 +58,14 @@ T6018fail.hs:51:15: error:
L a = MaybeSyn a -- Defined at T6018fail.hs:51:15
T6018fail.hs:59:10: error:
- Type family equation violates injectivity annotation.
- Kind variable ‘k’ cannot be inferred from the right-hand side.
- (enabling -fprint-explicit-kinds might help)
- In the type family equation:
- PolyKindVarsF '[] = '[] -- Defined at T6018fail.hs:59:10
+ • Polymorphic type indexes of associated type ‘PolyKindVarsF’
+ (i.e. ones independent of the class type variables)
+ must be distinct type variables
+ Expected: PolyKindVarsF '[]
+ Actual: PolyKindVarsF '[]
+ Use -fprint-explicit-kinds to see the kind arguments
+ • In the type instance declaration for ‘PolyKindVarsF’
+ In the instance declaration for ‘PolyKindVarsC '[]’
T6018fail.hs:62:15: error:
Type family equation violates injectivity annotation.
diff --git a/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr b/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
index c151553a3a..6cc0c3700e 100644
--- a/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
+++ b/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
@@ -1,96 +1,96 @@
T6018failclosed.hs:11:5: error:
- Type family equation violates injectivity annotation.
- RHS of injective type family equation cannot be a type family:
- IdProxyClosed a = IdClosed a -- Defined at T6018failclosed.hs:11:5
- In the equations for closed type family ‘IdProxyClosed’
- In the type family declaration for ‘IdProxyClosed’
+ • Type family equation violates injectivity annotation.
+ RHS of injective type family equation cannot be a type family:
+ IdProxyClosed a = IdClosed a -- Defined at T6018failclosed.hs:11:5
+ • In the equations for closed type family ‘IdProxyClosed’
+ In the type family declaration for ‘IdProxyClosed’
T6018failclosed.hs:19:5: error:
- Type family equation violates injectivity annotation.
- RHS of injective type family equation is a bare type variable
- but these LHS type and kind patterns are not bare variables: ‘'Z’
- PClosed 'Z m = m -- Defined at T6018failclosed.hs:19:5
- In the equations for closed type family ‘PClosed’
- In the type family declaration for ‘PClosed’
+ • Type family equation violates injectivity annotation.
+ RHS of injective type family equation is a bare type variable
+ but these LHS type and kind patterns are not bare variables: ‘'Z’
+ PClosed 'Z m = m -- Defined at T6018failclosed.hs:19:5
+ • In the equations for closed type family ‘PClosed’
+ In the type family declaration for ‘PClosed’
T6018failclosed.hs:19:5: error:
- Type family equations violate injectivity annotation:
- PClosed 'Z m = m -- Defined at T6018failclosed.hs:19:5
- PClosed ('S n) m = 'S (PClosed n m)
- -- Defined at T6018failclosed.hs:20:5
- In the equations for closed type family ‘PClosed’
- In the type family declaration for ‘PClosed’
+ • Type family equations violate injectivity annotation:
+ PClosed 'Z m = m -- Defined at T6018failclosed.hs:19:5
+ PClosed ('S n) m = 'S (PClosed n m)
+ -- Defined at T6018failclosed.hs:20:5
+ • In the equations for closed type family ‘PClosed’
+ In the type family declaration for ‘PClosed’
T6018failclosed.hs:25:5: error:
- Type family equation violates injectivity annotation.
- Type and kind variables ‘k’, ‘b’
- cannot be inferred from the right-hand side.
- (enabling -fprint-explicit-kinds might help)
- In the type family equation:
- forall k k1 (b :: k) (c :: k1).
- JClosed Int b c = Char -- Defined at T6018failclosed.hs:25:5
- In the equations for closed type family ‘JClosed’
- In the type family declaration for ‘JClosed’
+ • Type family equation violates injectivity annotation.
+ Type and kind variables ‘k’, ‘b’
+ cannot be inferred from the right-hand side.
+ Use -fprint-explicit-kinds to see the kind arguments
+ In the type family equation:
+ forall k k1 (b :: k) (c :: k1).
+ JClosed Int b c = Char -- Defined at T6018failclosed.hs:25:5
+ • In the equations for closed type family ‘JClosed’
+ In the type family declaration for ‘JClosed’
T6018failclosed.hs:30:5: error:
- Type family equation violates injectivity annotation.
- Type variable ‘n’ cannot be inferred from the right-hand side.
- In the type family equation:
- KClosed ('S n) m = 'S m -- Defined at T6018failclosed.hs:30:5
- In the equations for closed type family ‘KClosed’
- In the type family declaration for ‘KClosed’
+ • Type family equation violates injectivity annotation.
+ Type variable ‘n’ cannot be inferred from the right-hand side.
+ In the type family equation:
+ KClosed ('S n) m = 'S m -- Defined at T6018failclosed.hs:30:5
+ • In the equations for closed type family ‘KClosed’
+ In the type family declaration for ‘KClosed’
T6018failclosed.hs:35:5: error:
- Type family equation violates injectivity annotation.
- RHS of injective type family equation cannot be a type family:
- forall k (a :: k).
- LClosed a = MaybeSynClosed a -- Defined at T6018failclosed.hs:35:5
- In the equations for closed type family ‘LClosed’
- In the type family declaration for ‘LClosed’
+ • Type family equation violates injectivity annotation.
+ RHS of injective type family equation cannot be a type family:
+ forall k (a :: k).
+ LClosed a = MaybeSynClosed a -- Defined at T6018failclosed.hs:35:5
+ • In the equations for closed type family ‘LClosed’
+ In the type family declaration for ‘LClosed’
T6018failclosed.hs:39:5: error:
- Type family equations violate injectivity annotation:
- FClosed Char Bool Int = Int -- Defined at T6018failclosed.hs:39:5
- FClosed Bool Int Char = Int -- Defined at T6018failclosed.hs:40:5
- In the equations for closed type family ‘FClosed’
- In the type family declaration for ‘FClosed’
+ • Type family equations violate injectivity annotation:
+ FClosed Char Bool Int = Int -- Defined at T6018failclosed.hs:39:5
+ FClosed Bool Int Char = Int -- Defined at T6018failclosed.hs:40:5
+ • In the equations for closed type family ‘FClosed’
+ In the type family declaration for ‘FClosed’
T6018failclosed.hs:43:5: error:
- Type family equations violate injectivity annotation:
- IClosed Int Char Bool = Bool -- Defined at T6018failclosed.hs:43:5
- IClosed Int Int Int = Bool -- Defined at T6018failclosed.hs:44:5
- In the equations for closed type family ‘IClosed’
- In the type family declaration for ‘IClosed’
+ • Type family equations violate injectivity annotation:
+ IClosed Int Char Bool = Bool -- Defined at T6018failclosed.hs:43:5
+ IClosed Int Int Int = Bool -- Defined at T6018failclosed.hs:44:5
+ • In the equations for closed type family ‘IClosed’
+ In the type family declaration for ‘IClosed’
T6018failclosed.hs:49:3: error:
- Type family equations violate injectivity annotation:
- E2 'True = 'False -- Defined at T6018failclosed.hs:49:3
- E2 a = 'False -- Defined at T6018failclosed.hs:50:3
- In the equations for closed type family ‘E2’
- In the type family declaration for ‘E2’
+ • Type family equations violate injectivity annotation:
+ E2 'True = 'False -- Defined at T6018failclosed.hs:49:3
+ E2 a = 'False -- Defined at T6018failclosed.hs:50:3
+ • In the equations for closed type family ‘E2’
+ In the type family declaration for ‘E2’
T6018failclosed.hs:50:3: error:
- Type family equation violates injectivity annotation.
- Type variable ‘a’ cannot be inferred from the right-hand side.
- In the type family equation:
- E2 a = 'False -- Defined at T6018failclosed.hs:50:3
- In the equations for closed type family ‘E2’
- In the type family declaration for ‘E2’
+ • Type family equation violates injectivity annotation.
+ Type variable ‘a’ cannot be inferred from the right-hand side.
+ In the type family equation:
+ E2 a = 'False -- Defined at T6018failclosed.hs:50:3
+ • In the equations for closed type family ‘E2’
+ In the type family declaration for ‘E2’
T6018failclosed.hs:61:3: error:
- Type family equations violate injectivity annotation:
- F a IO = IO a -- Defined at T6018failclosed.hs:61:3
- F Char b = b Int -- Defined at T6018failclosed.hs:62:3
- In the equations for closed type family ‘F’
- In the type family declaration for ‘F’
+ • Type family equations violate injectivity annotation:
+ F a IO = IO a -- Defined at T6018failclosed.hs:61:3
+ F Char b = b Int -- Defined at T6018failclosed.hs:62:3
+ • In the equations for closed type family ‘F’
+ In the type family declaration for ‘F’
T6018failclosed.hs:66:5: error:
- Type family equation violates injectivity annotation.
- Kind variable ‘k’ cannot be inferred from the right-hand side.
- (enabling -fprint-explicit-kinds might help)
- In the type family equation:
- forall k (a :: k) (b :: k).
- Gc a b = Int -- Defined at T6018failclosed.hs:66:5
- In the equations for closed type family ‘Gc’
- In the type family declaration for ‘Gc’
+ • Type family equation violates injectivity annotation.
+ Kind variable ‘k’ cannot be inferred from the right-hand side.
+ Use -fprint-explicit-kinds to see the kind arguments
+ In the type family equation:
+ forall k (a :: k) (b :: k).
+ Gc a b = Int -- Defined at T6018failclosed.hs:66:5
+ • In the equations for closed type family ‘Gc’
+ In the type family declaration for ‘Gc’