summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Eisenberg <eir@cis.upenn.edu>2015-09-19 09:56:03 -0400
committerRichard Eisenberg <eir@cis.upenn.edu>2015-09-19 12:09:17 -0400
commit8ee2b9532e3249c652f3bdabaf4ee9e3e3a282b9 (patch)
tree643c56aadaed21120c586efb447904496557a5ca
parent2d4db40ac07db2fc776d61aac2383608911281ff (diff)
downloadhaskell-8ee2b9532e3249c652f3bdabaf4ee9e3e3a282b9.tar.gz
Polish some error messages.
-rw-r--r--compiler/typecheck/FamInst.hs6
-rw-r--r--testsuite/tests/ghci/scripts/T6018ghcifail.stderr34
-rw-r--r--testsuite/tests/typecheck/should_fail/T6018fail.stderr40
-rw-r--r--testsuite/tests/typecheck/should_fail/T6018failclosed.stderr18
4 files changed, 49 insertions, 49 deletions
diff --git a/compiler/typecheck/FamInst.hs b/compiler/typecheck/FamInst.hs
index febdf2f6d4..0fc692eadb 100644
--- a/compiler/typecheck/FamInst.hs
+++ b/compiler/typecheck/FamInst.hs
@@ -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
diff --git a/testsuite/tests/ghci/scripts/T6018ghcifail.stderr b/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
index e3a330e88e..d90dcce897 100644
--- a/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
+++ b/testsuite/tests/ghci/scripts/T6018ghcifail.stderr
@@ -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]
diff --git a/testsuite/tests/typecheck/should_fail/T6018fail.stderr b/testsuite/tests/typecheck/should_fail/T6018fail.stderr
index 2e0267a3b8..cb8d8abb6e 100644
--- a/testsuite/tests/typecheck/should_fail/T6018fail.stderr
+++ b/testsuite/tests/typecheck/should_fail/T6018fail.stderr
@@ -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:
diff --git a/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr b/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
index 452022d6ed..e8fcef8896 100644
--- a/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
+++ b/testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
@@ -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’