Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Shayne Fletcher
Glasgow Haskell Compiler
Commits
8ee2b953
Commit
8ee2b953
authored
Sep 19, 2015
by
eir@cis.upenn.edu
Browse files
Polish some error messages.
parent
2d4db40a
Changes
4
Hide whitespace changes
Inline
Side-by-side
compiler/typecheck/FamInst.hs
View file @
8ee2b953
...
...
@@ -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 infer
r
able 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
...
...
testsuite/tests/ghci/scripts/T6018ghcifail.stderr
View file @
8ee2b953
...
...
@@ -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 infer
r
able 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 infer
r
able 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 infer
r
able 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 infer
r
able 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]
testsuite/tests/typecheck/should_fail/T6018fail.stderr
View file @
8ee2b953
...
...
@@ -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 infer
r
able 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 infer
r
able 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 infer
r
able 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 infer
r
able 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 infer
r
able 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:
...
...
testsuite/tests/typecheck/should_fail/T6018failclosed.stderr
View file @
8ee2b953
...
...
@@ -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 infer
r
able 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 infer
r
able 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’
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment