Commit 8ee2b953 authored by eir@cis.upenn.edu's avatar eir@cis.upenn.edu

Polish some error messages.

parent 2d4db40a
......@@ -570,16 +570,16 @@ unusedInjectiveVarsErr unused_tyvars errorBuilder tyfamEqn
= if not (null tyVars)
then text "Injective type variable" <> plural tyVars <+>
pprQuotedList tyVars <+> doOrDoes tyVars <+>
text "not appear on injective position."
text "not appear on the right-hand side."
else empty
kiVarsSDoc
= if not (null kiVars)
then text "Injective kind variable" <> plural kiVars <+>
pprQuotedList kiVars <+> isOrAre kiVars <+>
text "not inferable from the RHS type variables."
text "not inferrable from the RHS type variables."
else empty
in tyVarsSDoc $$ kiVarsSDoc $$
text "In the RHS of type family equation:"
text "In the type family equation:"
-- | Build error message for equation that has a type family call at the top
-- level of RHS
......
......@@ -22,14 +22,14 @@
<interactive>:40:15: error:
Type family equation violates injectivity annotation.
Injective type variable ‘b’ does not appear on injective position.
In the RHS of type family equation:
Injective type variable ‘b’ does not appear on the right-hand side.
In the type family equation:
J Int b c = Char
<interactive>:44:15: error:
Type family equation violates injectivity annotation.
Injective type variable ‘n’ does not appear on injective position.
In the RHS of type family equation:
Injective type variable ‘n’ does not appear on the right-hand side.
In the type family equation:
K ('S n) m = 'S m
<interactive>:49:15: error:
......@@ -39,27 +39,27 @@
<interactive>:55:41: error:
Type family equation violates injectivity annotation.
Injective kind variable ‘k’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective kind variable ‘k’ is not inferrable from the RHS type variables.
In the type family equation:
PolyKindVarsF '[] = '[]
<interactive>:60:15: error:
Type family equation violates injectivity annotation.
Injective kind variable ‘k1’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective kind variable ‘k1’ is not inferrable from the RHS type variables.
In the type family equation:
PolyKindVars '[] = '[]
<interactive>:64:15: error:
Type family equation violates injectivity annotation.
Injective kind variable ‘k’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective kind variable ‘k’ is not inferrable from the RHS type variables.
In the type family equation:
forall (k :: BOX) (a :: k) (b :: k). Fc a b = Int
<interactive>:68:15: error:
Type family equation violates injectivity annotation.
Injective type variables ‘a’, ‘b’ do not appear on injective position.
Injective kind variable ‘k’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective type variables ‘a’, ‘b’ do not appear on the right-hand side.
Injective kind variable ‘k’ is not inferrable from the RHS type variables.
In the type family equation:
forall (k :: BOX) (a :: k) (b :: k). Gc a b = Int
<interactive>:81:15: error:
......@@ -95,8 +95,8 @@
<interactive>:104:15: error:
Type family equation violates injectivity annotation.
Injective type variable ‘b’ does not appear on injective position.
In the RHS of type family equation:
Injective type variable ‘b’ does not appear on the right-hand side.
In the type family equation:
G4 a b = [a]
<interactive>:107:15: error:
......@@ -106,6 +106,6 @@
<interactive>:111:15: error:
Type family equation violates injectivity annotation.
Injective type variable ‘a’ does not appear on injective position.
In the RHS of type family equation:
Injective type variable ‘a’ does not appear on the right-hand side.
In the type family equation:
G6 [a] = [HF1 a]
......@@ -42,14 +42,14 @@ T6018fail.hs:37:15: error:
T6018fail.hs:42:15: error:
Type family equation violates injectivity annotation.
Injective type variable ‘b’ does not appear on injective position.
In the RHS of type family equation:
Injective type variable ‘b’ does not appear on the right-hand side.
In the type family equation:
J Int b c = Char
T6018fail.hs:46:15: error:
Type family equation violates injectivity annotation.
Injective type variable ‘n’ does not appear on injective position.
In the RHS of type family equation:
Injective type variable ‘n’ does not appear on the right-hand side.
In the type family equation:
K ('S n) m = 'S m
T6018fail.hs:51:15: error:
......@@ -59,27 +59,27 @@ T6018fail.hs:51:15: error:
T6018fail.hs:59:10: error:
Type family equation violates injectivity annotation.
Injective kind variable ‘k’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective kind variable ‘k’ is not inferrable from the RHS type variables.
In the type family equation:
PolyKindVarsF '[] = '[]
T6018fail.hs:62:15: error:
Type family equation violates injectivity annotation.
Injective kind variable ‘k1’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective kind variable ‘k1’ is not inferrable from the RHS type variables.
In the type family equation:
PolyKindVars '[] = '[]
T6018fail.hs:66:15: error:
Type family equation violates injectivity annotation.
Injective kind variable ‘k’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective kind variable ‘k’ is not inferrable from the RHS type variables.
In the type family equation:
forall (k :: BOX) (a :: k) (b :: k). Fc a b = Int
T6018fail.hs:70:15: error:
Type family equation violates injectivity annotation.
Injective type variables ‘a’, ‘b’ do not appear on injective position.
Injective kind variable ‘k’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective type variables ‘a’, ‘b’ do not appear on the right-hand side.
Injective kind variable ‘k’ is not inferrable from the RHS type variables.
In the type family equation:
forall (k :: BOX) (a :: k) (b :: k). Gc a b = Int
T6018fail.hs:75:15: error:
......@@ -115,8 +115,8 @@ T6018fail.hs:103:15: error:
T6018fail.hs:106:15: error:
Type family equation violates injectivity annotation.
Injective type variable ‘b’ does not appear on injective position.
In the RHS of type family equation:
Injective type variable ‘b’ does not appear on the right-hand side.
In the type family equation:
G4 a b = [a]
T6018fail.hs:110:15: error:
......@@ -126,15 +126,15 @@ T6018fail.hs:110:15: error:
T6018fail.hs:113:15: error:
Type family equation violates injectivity annotation.
Injective type variable ‘a’ does not appear on injective position.
In the RHS of type family equation:
Injective type variable ‘a’ does not appear on the right-hand side.
In the type family equation:
G6 [a] = [HF1 a]
T6018fail.hs:118:15: error:
Type family equation violates injectivity annotation.
Injective type variable ‘c’ does not appear on injective position.
Injective kind variable ‘k’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective type variable ‘c’ does not appear on the right-hand side.
Injective kind variable ‘k’ is not inferrable from the RHS type variables.
In the type family equation:
forall (k :: BOX) a b (c :: k). G7 a b c = [G7a a b c]
T6018fail.hs:129:1: error:
......
......@@ -23,9 +23,9 @@ T6018failclosed.hs:19:5:
T6018failclosed.hs:25:5:
Type family equation violates injectivity annotation.
Injective type variable ‘b’ does not appear on injective position.
Injective kind variable ‘k’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective type variable ‘b’ does not appear on the right-hand side.
Injective kind variable ‘k’ is not inferrable from the RHS type variables.
In the type family equation:
forall (k :: BOX) (k1 :: BOX) (b :: k) (c :: k1).
JClosed Int b c = Char
In the equations for closed type family ‘JClosed’
......@@ -33,8 +33,8 @@ T6018failclosed.hs:25:5:
T6018failclosed.hs:30:5:
Type family equation violates injectivity annotation.
Injective type variable ‘n’ does not appear on injective position.
In the RHS of type family equation:
Injective type variable ‘n’ does not appear on the right-hand side.
In the type family equation:
KClosed ('S n) m = 'S m
In the equations for closed type family ‘KClosed’
In the type family declaration for ‘KClosed’
......@@ -62,8 +62,8 @@ T6018failclosed.hs:43:5:
T6018failclosed.hs:50:3:
Type family equation violates injectivity annotation.
Injective type variable ‘a’ does not appear on injective position.
In the RHS of type family equation:
Injective type variable ‘a’ does not appear on the right-hand side.
In the type family equation:
E2 a = 'False
In the equations for closed type family ‘E2’
In the type family declaration for ‘E2’
......@@ -77,8 +77,8 @@ T6018failclosed.hs:61:3:
T6018failclosed.hs:66:5:
Type family equation violates injectivity annotation.
Injective kind variable ‘k’ is not inferable from the RHS type variables.
In the RHS of type family equation:
Injective kind variable ‘k’ is not inferrable from the RHS type variables.
In the type family equation:
forall (k :: BOX) (a :: k) (b :: k). Gc a b = Int
In the equations for closed type family ‘Gc’
In the type family declaration for ‘Gc’
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment