Commit 40c54e02 authored by simonpj's avatar simonpj
Browse files

[project @ 2001-11-20 16:25:21 by simonpj]

Update error messages
parent 77198bc9
tests/ghc-regress/typecheck/should_fail/tcfail032.hs:14:
tcfail032.hs:14:
Inferred type is less polymorphic than expected
Quantified type variable `a' escapes
It is mentioned in the environment
The following variables in the environment mention `a'
x :: a -> Int
Quantified type variable `a' escapes
It is mentioned in the environment:
x :: a -> Int (bound at tcfail032.hs:14)
Signature type: forall a. (Eq a) => a -> Int
Type to generalise: a -> Int
When checking an expression type signature
......
tests/ghc-regress/typecheck/should_fail/tcfail065.hs:28:
tcfail065.hs:28:
Inferred type is less polymorphic than expected
Quantified type variable `x' is unified with another quantified type variable `x'
Quantified type variable `x' escapes
It unifies with `x1', which is mentioned in the environment:
Type variable `x1'
is bound by the instance declaration at tcfail065.hs:28
Signature type: forall x. x -> X x1 -> X x1
Type to generalise: x -> X x -> X x
Type to generalise: x1 -> X x1 -> X x1
When checking the type signature for `setX'
When generalising the type(s) for setX
In the definition for method `setX'
./tcfail068.hs:12:
tcfail068.hs:12:
Inferred type is less polymorphic than expected
Quantified type variable `s' escapes
It is reachable from the type variable(s) `a'
which is free in the signature
Quantified type variable `s' escapes
It is reachable from the type variable(s) `a'
which is free in the signature
Signature type: forall s. ST s a
Type to generalise: ST s1 (IndTree s1 a1)
When checking an expression type signature
......@@ -11,12 +11,11 @@
`(newSTArray ((1, 1), n) x)'
In the definition of `itgen': runST (newSTArray ((1, 1), n) x)
./tcfail068.hs:17:
tcfail068.hs:17:
Inferred type is less polymorphic than expected
Quantified type variable `s' escapes
It unifies with `s1', which is mentioned in the environment
The following variables in the environment mention `s1'
arr :: IndTree s1 a
Quantified type variable `s' escapes
It unifies with `s1', which is mentioned in the environment:
arr :: IndTree s1 a (bound at tcfail068.hs:17)
Signature type: forall s. ST s a1
Type to generalise: ST s1 (IndTree s1 a)
When checking an expression type signature
......@@ -27,28 +26,30 @@
runST ((readSTArray arr i)
>>= (\ val -> (writeSTArray arr i (f val)) >> (return arr)))
./tcfail068.hs:23:
tcfail068.hs:23:
Inferred type is less polymorphic than expected
Quantified type variable `s' escapes
It unifies with `s1', which is mentioned in the environment
The following variables in the environment mention `s1'
itrap' :: Int -> Int -> ST s1 (IndTree s1 a)
itrapsnd :: Int -> Int -> ST s1 (IndTree s1 a)
arr :: IndTree s1 a
Quantified type variable `s' escapes
It unifies with `s1', which is mentioned in the environment:
itrap' :: Int -> Int -> ST s1 (IndTree s1 a)
(bound at tcfail068.hs:25)
itrapsnd :: Int -> Int -> ST s1 (IndTree s1 a)
(bound at tcfail068.hs:28)
arr :: IndTree s1 a (bound at tcfail068.hs:23)
Signature type: forall s. ST s a1
Type to generalise: ST s1 (IndTree s1 a)
When checking an expression type signature
In the first argument of `runST', namely `(itrap' i k)'
In the definition of `itrap': runST (itrap' i k)
./tcfail068.hs:35:
tcfail068.hs:35:
Inferred type is less polymorphic than expected
Quantified type variable `s' escapes
It unifies with `s1', which is mentioned in the environment
The following variables in the environment mention `s1'
itrapstate' :: Int -> Int -> c -> ST s1 (c, IndTree s1 b)
itrapstatesnd :: Int -> Int -> c -> ST s1 (c, IndTree s1 b)
arr :: IndTree s1 b
Quantified type variable `s' escapes
It unifies with `s1', which is mentioned in the environment:
itrapstate' :: Int -> Int -> c -> ST s1 (c, IndTree s1 b)
(bound at tcfail068.hs:37)
itrapstatesnd :: Int -> Int -> c -> ST s1 (c, IndTree s1 b)
(bound at tcfail068.hs:40)
arr :: IndTree s1 b (bound at tcfail068.hs:35)
Signature type: forall s. ST s a
Type to generalise: ST s1 (c, IndTree s1 b)
When checking an expression type signature
......
tcfail076.hs:18:
Inferred type is less polymorphic than expected
Quantified type variable `res' escapes
It unifies with `res1', which is mentioned in the environment
The following variables in the environment mention `res1'
cont :: a -> m res1
Quantified type variable `res' escapes
It unifies with `res1', which is mentioned in the environment:
cont :: a -> m res1 (bound at tcfail076.hs:18)
Signature type: forall res. (a1 -> m1 res) -> m1 res
Type to generalise: (b -> m res1) -> m res1
When checking an expression type signature
In the first argument of `KContT', namely `(\ cont' -> cont a)'
in a lambda abstraction: KContT (\ cont' -> cont a)
In a lambda abstraction: KContT (\ cont' -> cont a)
......@@ -3,8 +3,8 @@ tcfail103.hs:14:
Inferred type is less polymorphic than expected
Quantified type variable `t' escapes
It unifies with `s', which is mentioned in the environment:
Type variable `s'
is bound by pattern type signature at tcfail103.hs:15
Type variable `s'
is bound by the pattern type signature at tcfail103.hs:6
Signature type: forall t. ST t Int
Type to generalise: ST s Int
When checking the type signature for `f'
......
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