Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
42a4a859
Commit
42a4a859
authored
Nov 12, 2010
by
Simon Peyton Jones
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Follow error message changes with new typechecker
parent
be72302b
Changes
28
Hide whitespace changes
Inline
Sidebyside
Showing
28 changed files
with
301 additions
and
70 deletions
+301
70
testsuite/tests/ghcregress/deriving/should_fail/T3621.stderr
...suite/tests/ghcregress/deriving/should_fail/T3621.stderr
+3
0
testsuite/tests/ghcregress/gadt/T3651.stderr
testsuite/tests/ghcregress/gadt/T3651.stderr
+3
3
testsuite/tests/ghcregress/indexedtypes/should_compile/Simple14.stderr
.../ghcregress/indexedtypes/should_compile/Simple14.stderr
+5
3
testsuite/tests/ghcregress/indexedtypes/should_fail/GADTwrong1.stderr
...s/ghcregress/indexedtypes/should_fail/GADTwrong1.stderr
+1
1
testsuite/tests/ghcregress/indexedtypes/should_fail/T1900.hs
...uite/tests/ghcregress/indexedtypes/should_fail/T1900.hs
+62
3
testsuite/tests/ghcregress/indexedtypes/should_fail/T1900.stderr
.../tests/ghcregress/indexedtypes/should_fail/T1900.stderr
+1
0
testsuite/tests/ghcregress/indexedtypes/should_fail/T2627b.stderr
...tests/ghcregress/indexedtypes/should_fail/T2627b.stderr
+3
7
testsuite/tests/ghcregress/indexedtypes/should_fail/T3330c.stderr
...tests/ghcregress/indexedtypes/should_fail/T3330c.stderr
+21
4
testsuite/tests/ghcregress/indexedtypes/should_fail/T4093a.stderr
...tests/ghcregress/indexedtypes/should_fail/T4093a.stderr
+2
0
testsuite/tests/ghcregress/indexedtypes/should_fail/T4093b.stderr
...tests/ghcregress/indexedtypes/should_fail/T4093b.stderr
+2
0
testsuite/tests/ghcregress/indexedtypes/should_fail/T4099.stderr
.../tests/ghcregress/indexedtypes/should_fail/T4099.stderr
+1
1
testsuite/tests/ghcregress/indexedtypes/should_fail/T4179.stderr
.../tests/ghcregress/indexedtypes/should_fail/T4179.stderr
+13
14
testsuite/tests/ghcregress/indexedtypes/should_fail/T4254.stderr
.../tests/ghcregress/indexedtypes/should_fail/T4254.stderr
+4
0
testsuite/tests/ghcregress/indexedtypes/should_fail/T4272.stderr
.../tests/ghcregress/indexedtypes/should_fail/T4272.stderr
+5
4
testsuite/tests/ghcregress/parser/should_fail/readFail003.stderr
...e/tests/ghcregress/parser/should_fail/readFail003.stderr
+30
6
testsuite/tests/ghcregress/typecheck/should_compile/FD3.stderr
...ite/tests/ghcregress/typecheck/should_compile/FD3.stderr
+14
2
testsuite/tests/ghcregress/typecheck/should_compile/T2494.stderr
...e/tests/ghcregress/typecheck/should_compile/T2494.stderr
+1
1
testsuite/tests/ghcregress/typecheck/should_fail/T2714.hs
testsuite/tests/ghcregress/typecheck/should_fail/T2714.hs
+19
1
testsuite/tests/ghcregress/typecheck/should_fail/T2714.stderr
...uite/tests/ghcregress/typecheck/should_fail/T2714.stderr
+2
9
testsuite/tests/ghcregress/typecheck/should_fail/tcfail014.stderr
.../tests/ghcregress/typecheck/should_fail/tcfail014.stderr
+1
1
testsuite/tests/ghcregress/typecheck/should_fail/tcfail122.stderr
.../tests/ghcregress/typecheck/should_fail/tcfail122.stderr
+14
0
testsuite/tests/ghcregress/typecheck/should_fail/tcfail123.stderr
.../tests/ghcregress/typecheck/should_fail/tcfail123.stderr
+8
0
testsuite/tests/ghcregress/typecheck/should_fail/tcfail143.hs
...uite/tests/ghcregress/typecheck/should_fail/tcfail143.hs
+14
3
testsuite/tests/ghcregress/typecheck/should_fail/tcfail143.stderr
.../tests/ghcregress/typecheck/should_fail/tcfail143.stderr
+58
2
testsuite/tests/ghcregress/typecheck/should_fail/tcfail167.stderr
.../tests/ghcregress/typecheck/should_fail/tcfail167.stderr
+1
1
testsuite/tests/ghcregress/typecheck/should_fail/tcfail191.stderr
.../tests/ghcregress/typecheck/should_fail/tcfail191.stderr
+5
2
testsuite/tests/ghcregress/typecheck/should_fail/tcfail192.stderr
.../tests/ghcregress/typecheck/should_fail/tcfail192.stderr
+4
1
testsuite/tests/ghcregress/typecheck/should_fail/tcfail193.stderr
.../tests/ghcregress/typecheck/should_fail/tcfail193.stderr
+4
1
No files found.
testsuite/tests/ghcregress/deriving/should_fail/T3621.stderr
View file @
42a4a859
...
...
@@ 5,4 +5,7 @@ T3621.hs:21:22:
the instance declaration at T3621.hs:21:22
`state' is a rigid type variable bound by
the instance declaration at T3621.hs:21:22
arising from the 'deriving' clause of a data type declaration
Alternatively, use a standalone 'deriving instance' declaration,
so you can specify the instance context yourself
When deriving the instance for (MonadState state (WrappedState s))
testsuite/tests/ghcregress/gadt/T3651.stderr
View file @
42a4a859
T3651.hs:11:11:
Couldn't match type `()' with `Bool'
Inaccessible code in
a pattern with constructor `U', in an equation for `unsafe1'
Couldn't match type `()' with `Bool'
In the pattern: U
In an equation for `unsafe1': unsafe1 B U = ()
T3651.hs:14:11:
Couldn't match type `()' with `Bool'
Inaccessible code in
a pattern with constructor `U', in an equation for `unsafe2'
Couldn't match type `()' with `Bool'
In the pattern: U
In an equation for `unsafe2': unsafe2 B U = ()
T3651.hs:17:11:
Couldn't match type `()' with `Bool'
Inaccessible code in
a pattern with constructor `U', in an equation for `unsafe3'
Couldn't match type `()' with `Bool'
In the pattern: U
In an equation for `unsafe3': unsafe3 B U = True
testsuite/tests/ghcregress/indexedtypes/should_compile/Simple14.stderr
View file @
42a4a859
Simple14.hs:17:12:
Couldn't match type `z' with `n'
`z' is untouchable
inside the constraints (Maybe m ~ Maybe n)
bound at the polymorphic type `x ~ y => EQ_ z z'
`n' is a rigid type variable bound by
the type signature for `foo' at Simple14.hs:16:17
because z is untouchable
inside the constraints (Maybe m ~ Maybe n)
bound at the polymorphic type `x ~ y => EQ_ z z'
Expected type: z
Actual type: m
In the second argument of `eqE', namely `(eqI :: EQ_ m n)'
In the first argument of `ntI', namely `(`eqE` (eqI :: EQ_ m n))'
In the expression: ntI (`eqE` (eqI :: EQ_ m n))
testsuite/tests/ghcregress/indexedtypes/should_fail/GADTwrong1.stderr
View file @
42a4a859
GADTwrong1.hs:12:19:
Could
n't match type `a1' with `b'
Could
not deduce (a1 ~ b) from the context (() ~ Const a1)
`a1' is a rigid type variable bound by
a pattern with constructor T :: forall a. a > T (Const a)
at GADTwrong1.hs:12:12
...
...
testsuite/tests/ghcregress/indexedtypes/should_fail/T1900.hs
View file @
42a4a859
...
...
@@ 2,13 +2,72 @@
module
Class4
where
class
(
Eq
(
Depend
s
))
=>
Bug
s
where
class
(
Eq
(
Depend
s
))
=>
Bug
s
where
type
Depend
s
trans
::
Depend
s
>
Depend
s
instance
Bug
Int
where
type
Depend
Int
=
()
trans
=
(
+
1
)
check
::
(
Bug
s
)
=>
Depend
s
>
Bool
check
d
=
d
==
trans
d
\ No newline at end of file
check
d
=
d
==
trans
d
{
Given: (Bug s, Eq (Depend s))
= (Bug s, Eq fsk, Depend s ~ fsk)
Wanted: (Eq alpha, (invocation of == at alpha)
Depend s ~ alpha (first arg of ==)
Depend sigma ~ alpha (second arg of ==)
Bug sigma, (invocation of trans at sigma)
Depend sigma ~ Depend s (first arg of trans)
{der}Eq (Depend sigma) (superclass of Bug sigma)
==>
Wanted: (Eq alpha, (invocation of == at alpha)
Depend s ~ alpha (first arg of ==)
Depend sigma ~ alpha (second arg of ==)
Bug sigma, (invocation of trans at sigma)
{der}Eq (Depend sigma) (superclass of Bug sigma)
==>
Wanted: (Eq alpha, (invocation of == at alpha)
Depend s ~ alpha (first arg of ==)
Depend sigma ~ alpha (second arg of ==)
Bug sigma, (invocation of trans at sigma)
{der}Eq uf_ahj
Depend sigma ~ uf_ahj
==> uf := alpha
Wanted: (Eq alpha, (invocation of == at alpha)
Depend s ~ alpha (first arg of ==)
Depend sigma ~ alpha (second arg of ==)
Bug sigma, (invocation of trans at sigma)
{der}Eq alpha)
==> discharge Eq alpha from {der}
Wanted: (Depend s ~ alpha (first arg of ==)
Depend sigma ~ alpha (second arg of ==)
Bug sigma, (invocation of trans at sigma)
{der}Eq alpha)
==> use given Depend s ~ fsk
Wanted: (alpha ~ fsk
Depend sigma ~ alpha (second arg of ==)
Bug sigma, (invocation of trans at sigma)
{der}Eq alpha)
==> alpha := fsk
Wanted: ({given}alpha ~ fsk
Depend sigma ~ alpha (second arg of ==)
Bug sigma, (invocation of trans at sigma)
{der}Eq fsk)
==> discharde {der} Eq fsk
Wanted: ({given}uf ~ fsk
Depend sigma ~ uf (second arg of ==)
Bug sigma, (invocation of trans at sigma)
}
testsuite/tests/ghcregress/indexedtypes/should_fail/T1900.stderr
View file @
42a4a859
...
...
@@ 10,6 +10,7 @@ T1900.hs:11:12:
T1900.hs:14:16:
Could not deduce (Depend s ~ Depend s1) from the context (Bug s1)
NB: `Depend' is a type function, and may not be injective
arising from a use of `trans'
In the second argument of `(==)', namely `trans d'
In the expression: d == trans d
In an equation for `check': check d = d == trans d
testsuite/tests/ghcregress/indexedtypes/should_fail/T2627b.stderr
View file @
42a4a859
T2627b.hs:20:14:
Couldn't match type `a' with `Dual (Dual a)'
because a is untouchable
inside the constraints (b ~ W a3 b2)
bound at a pattern with constructor
Wr :: forall a b. a > Comm b > Comm (W a b)
In the pattern: Wr a r
T2627b.hs:20:24:
Occurs check: cannot construct the infinite type: b = Dual (Dual b)
In the expression: conn undefined undefined
In an equation for `conn':
conn (Rd k) (Wr a r) = conn undefined undefined
testsuite/tests/ghcregress/indexedtypes/should_fail/T3330c.stderr
View file @
42a4a859
T3330c.hs:23:21:
Could not deduce (f2 ~ Der f2) from the context (f1 ~ (f2 :+: g))
`f2' is a rigid type variable bound by
a pattern with constructor
RSum :: forall (f :: * > *) (g :: * > *).
R f > R g > R (f :+: g)
at T3330c.hs:23:8
Expected type: Der f1 x
Actual type: (:+:) f (Der g) x
In the pattern: Inl df
In an equation for `plug'':
plug' (RSum rf rg) (Inl df) x = Inl (plug rf df x)
T3330c.hs:23:43:
Occurs check: cannot construct the infinite type:
f = f x
Expected type: Der ((>) x) (f x)
Actual type: R f
Couldn't match type `f' with `f x'
`f' is a rigid type variable bound by
a pattern with constructor
RSum :: forall (f :: * > *) (g :: * > *).
R f > R g > R (f :+: g)
at T3330c.hs:23:8
Expected type: Der ((>) x) (f x)
Actual type: R f
In the first argument of `plug', namely `rf'
In the first argument of `Inl', namely `(plug rf df x)'
In the expression: Inl (plug rf df x)
testsuite/tests/ghcregress/indexedtypes/should_fail/T4093a.stderr
View file @
42a4a859
...
...
@@ 3,5 +3,7 @@ T4093a.hs:8:8:
Could not deduce (e ~ ()) from the context (Foo e ~ Maybe e)
`e' is a rigid type variable bound by
the type signature for `hang' at T4093a.hs:7:14
Expected type: Foo e
Actual type: Maybe ()
In the expression: Just ()
In an equation for `hang': hang = Just ()
testsuite/tests/ghcregress/indexedtypes/should_fail/T4093b.stderr
View file @
42a4a859
...
...
@@ 5,6 +5,8 @@ T4093b.hs:31:13:
EitherCO x (A C C n) (A C O n) ~ A C x n)
`e' is a rigid type variable bound by
the type signature for `blockToNodeList' at T4093b.hs:20:12
Expected type: EitherCO e (A C O n) (A O O n)
Actual type: (MaybeC C (n C O), MaybeC O (n O C))
In the expression: (JustC n, NothingC)
In an equation for `f': f n _ = (JustC n, NothingC)
In an equation for `blockToNodeList':
...
...
testsuite/tests/ghcregress/indexedtypes/should_fail/T4099.stderr
View file @
42a4a859
T4099.hs:11:14:
Couldn't match type `T
b
' with `T
a
'
Couldn't match type `T
a
' with `T
b
'
NB: `T' is a type function, and may not be injective
In the first argument of `foo', namely `x'
In the expression: foo x
...
...
testsuite/tests/ghcregress/indexedtypes/should_fail/T4179.stderr
View file @
42a4a859
T4179.hs:26:16:
Could not deduce (DoC (x (A2 (FCon x) > A3 (FCon x))))
from the context (Functor x, DoC (FCon x))
arising from a use of `op'
Possible fix:
add (DoC (x (A2 (FCon x) > A3 (FCon x)))) to the context of
the type signature for `fCon'
or add an instance declaration for
(DoC (x (A2 (FCon x) > A3 (FCon x))))
In the first argument of `foldDoC', namely `op'
In the expression: foldDoC op
In an equation for `fCon': fCon = foldDoC op
T4179.hs:26:16:
Could not deduce (A2 (x (A2 (FCon x) > A3 (FCon x)))
~
...
...
@@ 24,17 +37,3 @@ T4179.hs:26:16:
In the first argument of `foldDoC', namely `op'
In the expression: foldDoC op
In an equation for `fCon': fCon = foldDoC op
T4179.hs:26:16:
Could not deduce (DoC (x (A2 (FCon x) > A3 (FCon x))))
from the context (Functor x, DoC (FCon x))
arising from a use of `op'
Possible fix:
add (DoC (x (A2 (FCon x) > A3 (FCon x)))) to the context of
the type signature for `fCon'
or add an instance declaration for
(DoC (x (A2 (FCon x) > A3 (FCon x))))
In the first argument of `foldDoC', namely `op'
In the expression: foldDoC op
In an equation for `fCon': fCon = foldDoC op
testsuite/tests/ghcregress/indexedtypes/should_fail/T4254.stderr
View file @
42a4a859
...
...
@@ 3,5 +3,9 @@ T4254.hs:19:10:
Could not deduce (b ~ Bool) from the context (a ~ Int, FD a b)
`b' is a rigid type variable bound by
the type signature for `fails' at T4254.hs:18:19
When using functional dependencies to combine
FD Int Bool, arising from a use of `op' at T4254.hs:19:1011
FD Int b,
arising from the type signature for `fails' at T4254.hs:19:111
In the expression: op
In an equation for `fails': fails = op
testsuite/tests/ghcregress/indexedtypes/should_fail/T4272.stderr
View file @
42a4a859
T4272.hs:11:26:
Occurs check: cannot construct the infinite type:
a = TermFamily a a
Expected type: TermFamily a (TermFamily a a)
Actual type: TermFamily a a
Couldn't match type `a' with `TermFamily a a'
`a' is a rigid type variable bound by
the type signature for `laws' at T4272.hs:10:16
Expected type: TermFamily a (TermFamily a a)
Actual type: TermFamily a a
In the first argument of `terms', namely
`(undefined :: TermFamily a a)'
In the second argument of `prune', namely
...
...
testsuite/tests/ghcregress/parser/should_fail/readFail003.stderr
View file @
42a4a859
...
...
@@ 4,9 +4,33 @@ readFail003.hs:4:27:
t = (t, [a], [a1])
In the expression: a
In a pattern binding:
~(a, b, c)
 nullity b = a
 nullity c = a
 otherwise = a
where
nullity = null
~(a, b, c)
 nullity b = a
 nullity c = a
 otherwise = a
where
nullity = null
readFail003.hs:5:27:
Occurs check: cannot construct the infinite type:
t = (t, [a], [a1])
In the expression: a
In a pattern binding:
~(a, b, c)
 nullity b = a
 nullity c = a
 otherwise = a
where
nullity = null
readFail003.hs:6:27:
Occurs check: cannot construct the infinite type:
t = (t, [a], [a1])
In the expression: a
In a pattern binding:
~(a, b, c)
 nullity b = a
 nullity c = a
 otherwise = a
where
nullity = null
testsuite/tests/ghcregress/typecheck/should_compile/FD3.stderr
View file @
42a4a859
FD3.hs:15:15:
Occurs check: cannot construct the infinite type:
a = (String, a)
Couldn't match type `a' with `(String, a)'
`a' is a rigid type variable bound by
the type signature for `translate' at FD3.hs:14:23
When using functional dependencies to combine
MkA a a,
arising from the dependency `a > b'
in the instance declaration at FD3.hs:12:10
MkA (String, a) a, arising from a use of `mkA' at FD3.hs:15:1517
In the expression: mkA a
In an equation for `translate': translate a = mkA a
FD3.hs:15:15:
No instance for (MkA (String, a1) a1)
arising from a use of `mkA'
Possible fix: add an instance declaration for (MkA (String, a1) a1)
In the expression: mkA a
In an equation for `translate': translate a = mkA a
testsuite/tests/ghcregress/typecheck/should_compile/T2494.stderr
View file @
42a4a859
...
...
@@ 10,7 +10,7 @@ T2494.hs:15:14:
In the expression: foo f (foo g x)
T2494.hs:15:30:
Could
not deduce (b ~ a) from the context (Monad m)
Could
n't match type `b' with `a'
`b' is a rigid type variable bound by
the type signature for `g' at T2494.hs:14:46
`a' is a rigid type variable bound by
...
...
testsuite/tests/ghcregress/typecheck/should_fail/T2714.hs
View file @
42a4a859
...
...
@@ 5,4 +5,22 @@
module
T2714
where
f
::
((
a
>
b
)
>
b
)
>
(
forall
c
.
c
>
a
)
f
=
fmap
f
=
ffmap
ffmap
::
Functor
f
=>
(
p
>
q
)
>
f
p
>
f
q
ffmap
=
error
"urk"
{
a ~ f q
c ~ f p
(p>q) ~ (a>b) > b
=>
a ~ f q
c ~ f p
p ~ a>b
q ~ b
=>
a ~ f b
c ~ f (a>b)
}
\ No newline at end of file
testsuite/tests/ghcregress/typecheck/should_fail/T2714.stderr
View file @
42a4a859
...
...
@@ 3,12 +3,5 @@ T2714.hs:8:5:
Couldn't match type `a' with `f b'
`a' is a rigid type variable bound by
the type signature for `f' at T2714.hs:7:8
In the expression: fmap
In an equation for `f': f = fmap
T2714.hs:8:5:
Couldn't match type `c' with `f (f b > b)'
`c' is a rigid type variable bound by
the type signature for `f' at T2714.hs:7:33
In the expression: fmap
In an equation for `f': f = fmap
In the expression: ffmap
In an equation for `f': f = ffmap
testsuite/tests/ghcregress/typecheck/should_fail/tcfail014.stderr
View file @
42a4a859
tcfail014.hs:5:33:
Occurs check: cannot construct the infinite type: t = t > t
1
Occurs check: cannot construct the infinite type: t
1
= t
1
> t
In the first argument of `z', namely `z'
In the expression: z z
In an equation for `h': h z = z z
testsuite/tests/ghcregress/typecheck/should_fail/tcfail122.stderr
View file @
42a4a859
tcfail122.hs:8:9:
Kind incompatibility when matching types:
d :: * > *
b :: *
In the expression:
undefined :: forall c :: ((* > *) > *) d :: (* > *). c d
In the expression:
[undefined :: forall a b. a b,
undefined :: forall c :: ((* > *) > *) d :: (* > *). c d]
In an equation for `foo':
foo
= [undefined :: forall a b. a b,
undefined :: forall c :: ((* > *) > *) d :: (* > *). c d]
tcfail122.hs:8:9:
Kind incompatibility when matching types:
c :: (* > *) > *
...
...
testsuite/tests/ghcregress/typecheck/should_fail/tcfail123.stderr
View file @
42a4a859
...
...
@@ 6,3 +6,11 @@ tcfail123.hs:11:10:
In the first argument of `f', namely `3#'
In the expression: f 3#
In the expression: (f 3#, f 4.3#, f True)
tcfail123.hs:11:16:
Kind incompatibility when matching types:
t1 :: *
GHC.Prim.Float# :: #
In the first argument of `f', namely `4.3#'
In the expression: f 4.3#
In the expression: (f 3#, f 4.3#, f True)
testsuite/tests/ghcregress/typecheck/should_fail/tcfail143.hs
View file @
42a4a859
...
...
@@ 7,10 +7,11 @@ data Z = Z
data
S
a
=
S
a
class
MinMax
a
b
c
d

a
b
>
c
d
,
a
c
d
>
b
,
b
c
d
>
a
instance
MinMax
Z
Z
Z
Z
instance
MinMax
a
Z
Z
a
 L1: wrongly flagged as error src.
instance
MinMax
Z
b
Z
b
instance
MinMax
Z
Z
Z
Z
 (a)
instance
MinMax
a
Z
Z
a
 (b)
 L1: wrongly flagged as error src.
instance
MinMax
Z
b
Z
b
 (c)
instance
MinMax
a
b
c
d
=>
MinMax
(
S
a
)
(
S
b
)
(
S
c
)
(
S
d
)
 (d)
class
Extend
a
b
where
extend
::
a
>
b
>
b
instance
Extend
Z
b
where
Z
`
extend
`
b
=
b
...
...
@@ 33,6 +34,16 @@ t2 = n1 `extend` n0  L3: uncommenting just this line produces
 error message rightly pointing at L2 and L3.
{ n0 :: Z; n1 :: S Z
Call of extend gives wanted: Extend (S Z) Z
Use instance => MinMax (S Z) Z gamma Z
FD on (b) => gamma ~ Z, Z ~ S Z
=> MinMax (S Z) Z Z Z
FD on (a), 3rd fundep => Z ~ S Z
(b) again (sadly) Z ~ S Z
}
{
Here's what is happening.
...
...
testsuite/tests/ghcregress/typecheck/should_fail/tcfail143.stderr
View file @
42a4a859
tcfail143.hs:28:9:
tcfail143.hs:29:9:
Couldn't match type `Z' with `S Z'
When using functional dependencies to combine
MinMax Z b Z b,
arising from the dependency `b c d > a'
in the instance declaration at tcfail143.hs:12:10
MinMax (S Z) Z Z Z,
arising from a use of `extend' at tcfail143.hs:29:916
In the expression: n1 `extend` n0
In an equation for `t2': t2 = n1 `extend` n0
tcfail143.hs:29:9:
Couldn't match type `Z' with `S Z'
When using functional dependencies to combine
MinMax a Z Z a,
arising from the dependency `b c d > a'
in the instance declaration at tcfail143.hs:11:10
MinMax (S Z) Z Z Z,
arising from a use of `extend' at tcfail143.hs:29:916
In the expression: n1 `extend` n0
In an equation for `t2': t2 = n1 `extend` n0
tcfail143.hs:29:9:
Couldn't match type `Z' with `S Z'
When using functional dependencies to combine
MinMax Z Z Z Z,
arising from the dependency `b c d > a'
in the instance declaration at tcfail143.hs:10:10
MinMax (S Z) Z Z Z,
arising from a use of `extend' at tcfail143.hs:29:916
In the expression: n1 `extend` n0
In an equation for `t2': t2 = n1 `extend` n0
tcfail143.hs:29:9:
Couldn't match type `S Z' with `Z'
When using functional dependencies to combine
MinMax a Z Z a,
arising from the dependency `a b > c d'
in the instance declaration at tcfail143.hs:11:10
MinMax (S Z) Z Z Z,
arising from a use of `extend' at tcfail143.hs:29:916
In the expression: n1 `extend` n0
In an equation for `t2': t2 = n1 `extend` n0
tcfail143.hs:29:9:
Couldn't match type `S Z' with `Z'
arising from a use of `extend'
When using functional dependencies to combine
MinMax a Z Z a,
arising from the dependency `a b > c d'
in the instance declaration at tcfail143.hs:11:10
MinMax (S Z) Z Z Z,
arising from a use of `extend' at tcfail143.hs:29:916
In the expression: n1 `extend` n0
In an equation for `t2': t2 = n1 `extend` n0
tcfail143.hs:29:9:
No instance for (MinMax (S Z) Z Z Z)
arising from a use of `extend'
Possible fix: add an instance declaration for (MinMax (S Z) Z Z Z)
In the expression: n1 `extend` n0
In an equation for `t2': t2 = n1 `extend` n0
testsuite/tests/ghcregress/typecheck/should_fail/tcfail167.stderr
View file @
42a4a859
tcfail167.hs:14:14:
Couldn't match type `Char' with `Float'
Inaccessible code in
a pattern with constructor `C2', in an equation for `inaccessible'
Couldn't match type `Char' with `Float'
In the pattern: C2
In an equation for `inaccessible': inaccessible C2 = ' '
testsuite/tests/ghcregress/typecheck/should_fail/tcfail191.stderr
View file @
42a4a859
tcfail191.hs:11:26:
Occurs check: cannot construct the infinite type: a = [a]
Couldn't match type `a' with `[a]'
`a' is a rigid type variable bound by
the polymorphic type `forall a1. [a1] > [[a1]]'
at tcfail191.hs:11:9
In the expression: take 5
In a stmt of a list comprehension: then group using take 5
In the expression:
[()  x < [Gnorf, Brain], then group using take 5]
[()  x < [Gnorf, Brain], then group using take 5]
testsuite/tests/ghcregress/typecheck/should_fail/tcfail192.stderr
View file @
42a4a859
...
...
@@ 10,7 +10,10 @@ tcfail192.hs:8:11:
foo = [x + 1  x < ["Hello", "World"], then group using take 5]
tcfail192.hs:10:26:
Occurs check: cannot construct the infinite type: a = [a]
Couldn't match type `a' with `[a]'
`a' is a rigid type variable bound by
the polymorphic type `forall a1. [a1] > [[a1]]'
at tcfail192.hs:10:9
In the expression: take 5
In a stmt of a list comprehension: then group using take 5
In the expression:
...
...
testsuite/tests/ghcregress/typecheck/should_fail/tcfail193.stderr
View file @
42a4a859
tcfail193.hs:10:31:
Occurs check: cannot construct the infinite type: a = [a]
Couldn't match type `a' with `[a]'
`a' is a rigid type variable bound by
the polymorphic type `forall a1. [a1] > [a1]'
at tcfail193.hs:10:10
In the expression: inits
In a stmt of a list comprehension: then inits
In the expression: [x  x < [3, 2, 1], then inits]
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