Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
b504edb3
Commit
b504edb3
authored
Nov 28, 2002
by
simonpj
Browse files
[project @ 2002-11-28 17:21:00 by simonpj]
Update expected output for new type-error generation
parent
85630e62
Changes
25
Hide whitespace changes
Inline
Side-by-side
testsuite/tests/ghc-regress/typecheck/should_fail/all.T
View file @
b504edb3
...
...
@@ -99,3 +99,4 @@ test('tcfail109', normal, compile_fail, [''])
test
('
tcfail110
',
normal
,
compile_fail
,
[''])
test
('
tcfail111
',
normal
,
compile_fail
,
[''])
test
('
tcfail112
',
normal
,
compile_fail
,
[''])
test
('
tcfail113
',
normal
,
compile_fail
,
[''])
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail003.stderr
View file @
b504edb3
tcfail003.hs:3:
No instance for (Num Char)
arising from the literal `1' at tcfail003.hs:3
arising from the literal `1' at tcfail003.hs:3
In the list element: 1
In the right-hand side of a pattern binding: [1, 'a']
In a pattern binding: (d : e) = [1, 'a']
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail006.stderr
View file @
b504edb3
tcfail006.hs:5:
No instance for (Num Bool)
arising from the literal `1' at tcfail006.hs:5
arising from the literal `1' at tcfail006.hs:5
In the body of a case alternative: (1, True)
In a case alternative: False -> (1, True)
In the case expression:
case (if True then True else False) of
True -> (True, 1)
False -> (1, True)
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail008.stderr
View file @
b504edb3
tcfail008.hs:3:
No instance for (Num [a])
arising from the literal `2' at tcfail008.hs:3
arising from the literal `2' at tcfail008.hs:3
Possible cause: the monomorphism restriction applied to the following:
o :: [a] (bound at tcfail008.hs:3)
In the second argument of `(:)', namely `2'
In a right-hand side of function `o': 1 : 2
In the definition of `o': o = 1 : 2
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail010.stderr
View file @
b504edb3
tcfail010.hs:3:
No instance for (Num [a])
arising from use of `+' at tcfail010.hs:3
arising from use of `+' at tcfail010.hs:3
Possible cause: the monomorphism restriction applied to the following:
q :: [a] -> [a] (bound at tcfail010.hs:3)
In the body of a lambda: z + 2
In a lambda abstraction: \ (y : z) -> z + 2
In a right-hand side of function `q': \ (y : z) -> z + 2
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail017.stderr
View file @
b504edb3
tcfail017.hs:10:
Could not deduce (C [a]) from the context (B a)
arising from the instance declaration at tcfail017.hs:10
Probable fix:
Add (C [a]) to the instance declaration superclass context
Or add an instance declaration for (C [a])
arising from the instance declaration at tcfail017.hs:10
In the instance declaration for `B [a]'
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail018.stderr
View file @
b504edb3
tcfail018.hs:5:
No instance for (Num [a])
arising from the literal `1' at tcfail018.hs:5
arising from the literal `1' at tcfail018.hs:5
Possible cause: the monomorphism restriction applied to the following:
a :: a (bound at tcfail018.hs:5)
In the right-hand side of a pattern binding: 1
In a pattern binding: (a : []) = 1
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail019.stderr
View file @
b504edb3
tcfail019.hs:18:
Could not deduce (C [a], B [a]) from the context ()
arising from the instance declaration at tcfail019.hs:18
Probable fix:
Add (C [a], B [a]) to the instance declaration superclass context
Or add an instance declaration for (C [a], B [a])
arising from the instance declaration at tcfail019.hs:18
In the instance declaration for `D [a]'
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail020.stderr
View file @
b504edb3
tcfail020.hs:10:
Could not deduce (A [a]) from the context (A a)
arising from the instance declaration at tcfail020.hs:10
Probable fix:
Add (A [a]) to the instance declaration superclass context
Or add an instance declaration for (A [a])
arising from the instance declaration at tcfail020.hs:10
In the instance declaration for `B [a]'
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail028.stderr
View file @
b504edb3
tcfail028.hs:4:
Couldn't match `k -> k1' against `Type bx'
Expected kind: k -> k1
Inferred kind: Type bx
When checking that `A a' is a type
Kind error: `A a' is not applied to enough type arguments
In the data type declaration for `A'
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail034.stderr
View file @
b504edb3
tcfail034.hs:17:
Could not deduce (Integral a) from the context (Num a, Eq a)
arising from use of `mod' at tcfail034.hs:17
Probable fix:
Add (Integral a) to the type signature(s) for `test'
arising from use of `mod' at tcfail034.hs:17
In the first argument of `(==)', namely `(x `mod` 3)'
In a right-hand side of function `test': (x `mod` 3) == 0
In the definition of `test': test x = (x `mod` 3) == 0
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail040.stderr
View file @
b504edb3
tcfail040.hs:19:
Ambiguous type variable(s) `a' in the constraint
`
ORD a
'
arising from use of `<<' at tcfail040.hs:19
Ambiguous type variable(s) `a' in the constraint
(
ORD a
)
arising from use of `<<' at tcfail040.hs:19
In the first argument of `(===)', namely `(<<)'
In a right-hand side of function `f': (<<) === (<<)
In the definition of `f': f = (<<) === (<<)
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail042.stderr
View file @
b504edb3
tcfail042.hs:15:
Could not deduce (Num a) from the context (Eq a, Show a)
arising from the instance declaration at tcfail042.hs:15
Probable fix:
Add (Num a) to the instance declaration superclass context
arising from the instance declaration at tcfail042.hs:15
In the instance declaration for `Bar [a]'
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail043.stderr
View file @
b504edb3
tcfail043.hs:38:
Ambiguous type variable(s) `a' in the constraint `Ord_ a'
arising from use of `gt' at tcfail043.hs:38
Ambiguous type variable(s) `a' in the constraint (Ord_ a)
arising from use of `gt' at tcfail043.hs:38
Possible cause: the monomorphism restriction applied to the following:
search :: a -> [a] -> Bool (bound at tcfail043.hs:38)
In the predicate expression: gt (hd bs) a
In the body of a lambda:
if gt (hd bs) a then
False
else
if eq a (hd bs) then True else search a (tl bs)
In a lambda abstraction:
\ a bs
-> if gt (hd bs) a then
False
else
if eq a (hd bs) then True else search a (tl bs)
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail057.stderr
View file @
b504edb3
tcfail057.hs:5:
Class `RealFrac' used as a type
When checking kinds in `RealFrac a'
In the type: forall a. (RealFrac a) -> a -> a
While checking the type signature for `f'
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail063.stderr
View file @
b504edb3
tcfail063.hs:6:
Couldn't match `*' against `* -> *'
Expected kind: *
Inferred kind: * -> *
Kind error: `Num' is not applied to enough type arguments
When checking kinds in `Num'
In the type: forall a. (Num) => Int -> a -> Int
While checking the type signature for `moby'
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail067.stderr
View file @
b504edb3
tcfail067.hs:12:
Could not deduce (Ord a) from the context ()
arising from the pattern `SubRange (lower, upper) value' at tcfail067.hs:12
Probable fix:
Add (Ord a) to the type signature(s) for `subRangeValue'
arising from the pattern `SubRange (lower, upper) value' at tcfail067.hs:12
When checking the pattern: SubRange (lower, upper) value
In the definition of `subRangeValue':
subRangeValue (SubRange (lower, upper) value) = value
tcfail067.hs:15:
Could not deduce (Ord a) from the context ()
arising from the pattern `SubRange r value' at tcfail067.hs:15
Probable fix:
Add (Ord a) to the type signature(s) for `subRange'
arising from the pattern `SubRange r value' at tcfail067.hs:15
When checking the pattern: SubRange r value
In the definition of `subRange': subRange (SubRange r value) = r
tcfail067.hs:47:
Could not deduce (Ord a) from the context (Show a)
arising from the pattern `SubRange (lower, upper) value' at tcfail067.hs:47
Probable fix:
Add (Ord a) to the type signature(s) for `showRange'
arising from the pattern `SubRange (lower, upper) value' at tcfail067.hs:47
When checking the pattern: SubRange (lower, upper) value
In the definition of `showRange':
showRange (SubRange (lower, upper) value)
...
...
@@ -28,11 +28,11 @@ tcfail067.hs:47:
tcfail067.hs:60:
Could not deduce (Show (SubRange a)) from the context (Num a)
arising from the instance declaration at tcfail067.hs:60
Probable fix:
Add (Show (SubRange a))
to the instance declaration superclass context
Or add an instance declaration for (Show (SubRange a))
arising from the instance declaration at tcfail067.hs:60
In the instance declaration for `Num (SubRange a)'
tcfail067.hs:61:
...
...
@@ -41,11 +41,12 @@ tcfail067.hs:61:
Num a,
Eq (SubRange a),
Show (SubRange a))
arising from use of `numSubRangeNegate' at tcfail067.hs:61
Probable fix:
Add (Ord a) to the class or instance method `negate'
arising from use of `numSubRangeNegate' at tcfail067.hs:61
In a right-hand side of function `negate': numSubRangeNegate
In the definition of `negate': negate = numSubRangeNegate
In the definition for method `negate'
tcfail067.hs:65:
Could not deduce (Ord a)
...
...
@@ -53,20 +54,21 @@ tcfail067.hs:65:
Num a,
Eq (SubRange a),
Show (SubRange a))
arising from use of `SubRange' at tcfail067.hs:65
Probable fix:
Add (Ord a) to the class or instance method `fromInteger'
arising from use of `SubRange' at tcfail067.hs:65
In a right-hand side of function `fromInteger':
SubRange (fromInteger a, fromInteger a) (fromInteger a)
In the definition of `fromInteger':
fromInteger a = SubRange (fromInteger a, fromInteger a)
(fromInteger a)
In the definition for method `fromInteger'
tcfail067.hs:74:
Could not deduce (Ord a) from the context (Num a)
arising from use of `SubRange' at tcfail067.hs:74
Probable fix:
Add (Ord a) to the type signature(s) for `numSubRangeBinOp'
arising from use of `SubRange' at tcfail067.hs:74
In a right-hand side of function `numSubRangeBinOp':
SubRange (result, result) result
In the definition of `numSubRangeBinOp':
...
...
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail070.stderr
View file @
b504edb3
tcfail070.hs:15:
Couldn't match `*' against `* -> k'
Expected kind: *
Inferred kind: * -> k
Kind error: `[Int]' is applied to too many type arguments
When checking kinds in `[Int] Bool'
In the type synonym declaration for `State'
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail072.stderr
View file @
b504edb3
tcfail072.hs:23:
Ambiguous type variable(s) `p' in the constraint
`
Ord p
'
arising from use of `g' at tcfail072.hs:23
Ambiguous type variable(s) `p' in the constraint
(
Ord p
)
arising from use of `g' at tcfail072.hs:23
In a right-hand side of function `g': g A
In the definition of `g': g (B _ _) = g A
tcfail072.hs:23:
Ambiguous type variable(s) `q' in the constraint
`
Ord q
'
arising from use of `g' at tcfail072.hs:23
Ambiguous type variable(s) `q' in the constraint
(
Ord q
)
arising from use of `g' at tcfail072.hs:23
In a right-hand side of function `g': g A
In the definition of `g': g (B _ _) = g A
testsuite/tests/ghc-regress/typecheck/should_fail/tcfail079.stderr
View file @
b504edb3
tcfail079.hs:9:
Couldn't match `*' against `#'
Expected kind: *
Inferred kind: #
When checking that `Int#' is a type
Kind error: Expecting a lifted type, but `Int#' is unlifted
In the newtype declaration for `Unboxed'
Prev
1
2
Next
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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