Commit 94a5678f authored by simonpj's avatar simonpj

[project @ 2003-05-01 16:27:58 by simonpj]

Update expected output.  The main change is slightly less duplication in typecheck
error messages.  I'm not quite sure when and why this got in, but it seems to be
an improvement.
parent fdf7254c
......@@ -2,5 +2,4 @@
ds041.hs:15:
Warning: Fields of `Foo' not initialised: x
In the record construction: Foo {}
In a right-hand side of function `foo': Foo {}
In the definition of `foo': foo = Foo {}
mdofail004.hs:17:
No instance for (MonadFix X)
arising from a do statement at mdofail004.hs:17
In a right-hand side of function `z': mdo return [1, 2, 3, 4]
arising from a do statement at mdofail004.hs:17
In the definition of `z': z = mdo return [1, 2, 3, 4]
......@@ -3,5 +3,4 @@ tcfail002.hs:4:
Occurs check: cannot construct the infinite type: a = [a]
Expected type: a
Inferred type: [a]
In a right-hand side of function `c': z
In the definition of `c': c z = z
......@@ -3,5 +3,4 @@ tcfail003.hs:3:
No instance for (Num Char)
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']
......@@ -3,5 +3,4 @@ tcfail004.hs:3:
Couldn't match `(t, t1)' against `(t2, t3, t4)'
Expected type: (t, t1)
Inferred type: (t2, t3, t4)
In the right-hand side of a pattern binding: (1, 2, 3)
In a pattern binding: (f, g) = (1, 2, 3)
......@@ -3,5 +3,4 @@ tcfail005.hs:3:
Couldn't match `[a]' against `(t, t1)'
Expected type: [a]
Inferred type: (t, t1)
In the right-hand side of a pattern binding: (1, 'a')
In a pattern binding: (h : i) = (1, 'a')
......@@ -2,9 +2,13 @@
tcfail006.hs:5:
No instance for (Num Bool)
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)
In a pattern binding:
(j, k)
= case (if True then True else False) of
True -> (True, 1)
False -> (1, True)
......@@ -6,5 +6,4 @@ tcfail008.hs:3:
o :: [a] (bound at tcfail008.hs:3)
Probable fix: give these definition(s) an explicit type signature
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
......@@ -5,6 +5,5 @@ tcfail010.hs:3:
Possible cause: the monomorphism restriction applied to the following:
q :: [a] -> [a] (bound at tcfail010.hs:3)
Probable fix: give these definition(s) an explicit type signature
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
In the definition of `q': q = \ (y : z) -> z + 2
......@@ -3,5 +3,4 @@ tcfail012.hs:3:
Couldn't match `Bool' against `[a]'
Expected type: Bool
Inferred type: [a]
In the right-hand side of a pattern binding: []
In a pattern binding: True = []
......@@ -4,4 +4,4 @@ tcfail014.hs:5:
Expected type: t
Inferred type: t -> t1
In the first argument of `z', namely `z'
In a right-hand side of function `h': z z
In the definition of `h': h z = z z
tcfail015.hs:7:
No instance for (Num Bool)
arising from the literal `2' at tcfail015.hs:7
In a right-hand side of function `g': 2
arising from the literal `2' at tcfail015.hs:7
In the definition of `g': g (ANull) = 2
......@@ -5,5 +5,4 @@ tcfail018.hs:5:
Possible cause: the monomorphism restriction applied to the following:
a :: a (bound at tcfail018.hs:5)
Probable fix: give these definition(s) an explicit type signature
In the right-hand side of a pattern binding: 1
In a pattern binding: (a : []) = 1
tcfail029.hs:6:
No instance for (Ord Foo)
arising from use of `>' at tcfail029.hs:6
In a right-hand side of function `f': x > Bar
arising from use of `>' at tcfail029.hs:6
In the definition of `f': f x = x > Bar
......@@ -4,4 +4,4 @@ tcfail031.hs:3:
Expected type: Bool
Inferred type: Char
In the predicate expression: 'a'
In a right-hand side of function `f': if 'a' then 1 else 2
In the definition of `f': f x = if 'a' then 1 else 2
......@@ -6,6 +6,4 @@ tcfail032.hs:14:
x :: a -> Int (bound at tcfail032.hs:14)
When checking the type signature of the expression:
x :: forall a. (Eq a) => a -> Int
In a right-hand side of function `f':
(x :: forall a. (Eq a) => a -> Int)
In the definition of `f': f x = (x :: forall a. (Eq a) => a -> Int)
......@@ -4,4 +4,4 @@ tcfail033.hs:4:
Expected type: (t, t1)
Inferred type: t
In the result of a list comprehension: x
In a right-hand side of function `buglet': [x | (x, y) <- buglet]
In the definition of `buglet': buglet = [x | (x, y) <- buglet]
......@@ -5,5 +5,4 @@ tcfail034.hs:17:
Probable fix:
Add (Integral a) to the type signature(s) for `test'
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
......@@ -44,9 +44,9 @@ tcfail067.hs:61:
arising from use of `numSubRangeNegate' at tcfail067.hs:61
Probable fix:
Add (Ord a) to the class or instance method `negate'
In a right-hand side of function `negate': numSubRangeNegate
In the definition of `negate': negate = numSubRangeNegate
In the definition for method `negate'
In the instance declaration for `Num (SubRange a)'
tcfail067.hs:65:
Could not deduce (Ord a)
......@@ -57,20 +57,17 @@ tcfail067.hs:65:
arising from use of `SubRange' at tcfail067.hs:65
Probable fix:
Add (Ord a) to the class or instance method `fromInteger'
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'
In the instance declaration for `Num (SubRange a)'
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'
In a right-hand side of function `numSubRangeBinOp':
SubRange (result, result) result
In the definition of `numSubRangeBinOp':
numSubRangeBinOp op a b
= SubRange (result, result) result
......
......@@ -5,5 +5,6 @@ tcfail076.hs:18:
It is mentioned in the environment:
cont :: a -> m res (bound at tcfail076.hs:18)
In the first argument of `KContT', namely `(\ cont' -> cont a)'
In the body of a lambda: KContT (\ cont' -> cont a)
In a lambda abstraction: \ a -> KContT (\ cont' -> cont a)
In the first argument of `f', namely
`(\ a -> KContT (\ cont' -> cont a))'
......@@ -2,5 +2,4 @@
tcfail084.hs:10:
Constructor `F' does not have field `y'
In the record construction: F {y = 2}
In a right-hand side of function `z': F {y = 2}
In the definition of `z': z = F {y = 2}
......@@ -2,5 +2,4 @@
tcfail085.hs:9:
Constructor `F' does not have the required strict field(s): y
In the record construction: F {x = 2}
In a right-hand side of function `z': F {x = 2}
In the definition of `z': z = F {x = 2}
......@@ -4,4 +4,4 @@ tcfail090.hs:8:
When matching types `ByteArray#' and `a'
Expected type: ByteArray#
Inferred type: a
In a right-hand side of function `die': undefined
In the definition of `die': die _ = undefined
......@@ -5,5 +5,4 @@ tcfail093.hs:14:
Possible cause: the monomorphism restriction applied to the following:
dup :: () -> Int -> h (bound at tcfail093.hs:14)
Probable fix: give these definition(s) an explicit type signature
In a right-hand side of function `dup': call primDup
In the definition of `dup': dup () = call primDup
......@@ -6,5 +6,4 @@ tcfail102.hs:8:
Add (Integral (Ratio a)) to the type signature(s) for `f'
Or add an instance declaration for (Integral (Ratio a))
In the record update: x {p = p x}
In a right-hand side of function `f': x {p = p x}
In the definition of `f': f x = x {p = p x}
......@@ -2,17 +2,14 @@
tcfail112.hs:11:
Constructor `S' does not have the required strict field(s): y
In the record construction: S {}
In a right-hand side of function `s1': S {}
In the definition of `s1': s1 = S {}
tcfail112.hs:12:
Constructor `S' does not have the required strict field(s): y
In the record construction: S {x = 3}
In a right-hand side of function `s2': S {x = 3}
In the definition of `s2': s2 = S {x = 3}
tcfail112.hs:14:
Constructor `T' does not have the required strict field(s)
In the record construction: T {}
In a right-hand side of function `t': T {}
In the definition of `t': t = T {}
......@@ -2,5 +2,4 @@
tcfail114.hs:11:
`foo' is not a record selector
In the record update: undefined {foo = ()}
In a right-hand side of function `test': undefined {foo = ()}
In the definition of `test': test = undefined {foo = ()}
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