Commit 5951c536 authored by Ian Lynagh's avatar Ian Lynagh
Browse files

Fix various tests for the 6.8 branch

parent 39c6c735
......@@ -20,10 +20,10 @@ test('Simple16', normal, compile, [''])
test('Simple17', expect_fail, compile, [''])
test('Simple18', normal, compile, [''])
test('Simple19', normal, compile, [''])
test('Simple20', normal, compile, [''])
test('Simple21', normal, compile, [''])
test('Simple22', normal, compile, [''])
test('Simple23', normal, compile, [''])
test('Simple20', expect_fail_if_compiler_lt('ghc','6.9'), compile, [''])
test('Simple21', expect_fail_if_compiler_lt('ghc','6.9'), compile, [''])
test('Simple22', expect_fail_if_compiler_lt('ghc','6.9'), compile, [''])
test('Simple23', expect_fail_if_compiler_lt('ghc','6.9'), compile, [''])
test('ind1', normal, compile, [''])
test('ind2', expect_fail_ways_if_compiler_lt('ghc','6.9',['profc','profasm']),
......
......@@ -26,7 +26,7 @@ test('read020', normal, compile_fail, [''])
test('read021', expect_fail_if_compiler_type('hugs'), compile_fail, [''])
test('read022', normal, compile_fail, [''])
test('read023', normal, compile_fail, [''])
test('read023', namebase_if_compiler_lt('ghc','6.9', 'read023-6.8'), compile_fail, [''])
test('read024', normal, compile_fail, [''])
test('read025', normal, compile_fail, [''])
test('read026', normal, compile_fail, [''])
......
read023.hs:9:4:
The operator `**' [infixl 7] of a section
must have lower precedence than the operand prefix `-' [infixl 6]
in the section: `(- 3 **)'
......@@ -15,7 +15,7 @@ test('rnfail015', normal, compile_fail, [''])
test('rnfail016', normal, compile_fail, [''])
test('rnfail017', normal, compile_fail, [''])
test('rnfail018', normal, compile_fail, [''])
test('rnfail019', normal, compile_fail, [''])
test('rnfail019', namebase_if_compiler_lt('ghc','6.9', 'rnfail019-6.8'), compile_fail, [''])
test('rnfail020', normal, compile, ['']) # Succeeds now (Jan07)
test('rnfail021', normal, compile_fail, [''])
test('rnfail022', normal, compile_fail, [''])
......
rnfail019.hs:5:8:
The operator `:' [infixr 5] of a section
must have lower precedence than the operand `(:)' [infixr 5]
in the section: `(x : y :)'
TH_exn1.hs:1:0:
Exception when trying to run compile-time code:
TH_exn1.hs:(9,3)-(10,15): Non-exhaustive patterns in case
Code: let
return = return @ Language.Haskell.TH.Syntax.Q $dMonad
$dMonad = Language.Haskell.TH.Syntax.$f22
in
case reverse @ Char "no" of
[]
-> return @ [Language.Haskell.TH.Syntax.Dec]
(GHC.Base.[] @ Language.Haskell.TH.Syntax.Dec)
TH_exn2.hs:1:0:
Exception when trying to run compile-time code:
Prelude.tail: empty list
Code: let
>>= = (>>=) @ Language.Haskell.TH.Syntax.Q $dMonad
$dMonad = $dMonad
return = return @ Language.Haskell.TH.Syntax.Q $dMonad
....
in
do ds <- [d| |]
return @ [Language.Haskell.TH.Syntax.Dec]
(tail @ Language.Haskell.TH.Syntax.Dec ds)
TH_runIO.hs:12:8:
Exception when trying to run compile-time code:
user error (hi)
Code: let
fail = fail @ IO $dMonad
$dMonad = GHC.IOBase.$f16
in runIO @ Exp (fail @ Exp "hi")
In the expression: $(runIO (fail "hi"))
In the definition of `foo': foo = $(runIO (fail "hi"))
......@@ -65,10 +65,10 @@ test('TH_where', normal, compile_and_run, [''])
test('TH_spliceInst', normal, compile, ['-v0'])
test('TH_exn1', normal, compile_fail, ['-v0'])
test('TH_exn1', namebase_if_compiler_lt('ghc','6.9', 'TH_exn1-6.8'), compile_fail, ['-v0'])
test('TH_dupdecl', normal, compile_fail, ['-v0'])
test('TH_exn2', normal, compile_fail, ['-v0'])
test('TH_exn2', namebase_if_compiler_lt('ghc','6.9', 'TH_exn2-6.8'), compile_fail, ['-v0'])
test('TH_recover', normal, compile_and_run, [''])
test('TH_dataD1', normal, compile_fail, ['-v0'])
......@@ -76,4 +76,4 @@ test('TH_dataD1', normal, compile_fail, ['-v0'])
test('TH_ppr1', normal, compile_and_run, ['-fglasgow-exts'])
test('TH_fail', normal, compile_fail, ['-v0'])
test('TH_runIO', normal, compile_fail, ['-v0'])
test('TH_runIO', namebase_if_compiler_lt('ghc','6.9', 'TH_runIO-6.8'), compile_fail, ['-v0'])
......@@ -141,7 +141,7 @@ test('tc135', only_compiler_types(['ghc']), compile, [''])
test('tc136', normal, compile, [''])
test('tc137', normal, compile, [''])
test('tc140', normal, compile, [''])
test('tc141', normal, compile_fail, [''])
test('tc141', namebase_if_compiler_lt('ghc','6.9', 'tc141-6.8'), compile_fail, [''])
test('tc142', normal, compile, [''])
test('tc143', normal, compile, [''])
test('tc144', omit_compiler_types(['hugs']), compile, ['']) # Hugs loops
......
tc141.hs:11:14: Not in scope: type variable `a'
tc141.hs:11:19: Not in scope: type variable `a'
tc141.hs:13:15: Not in scope: type variable `a'
......@@ -54,7 +54,7 @@ test('tcfail061', normal, compile_fail, [''])
test('tcfail062', normal, compile_fail, [''])
test('tcfail063', normal, compile_fail, [''])
test('tcfail065', normal, compile_fail, [''])
test('tcfail067', normal, compile_fail, [''])
test('tcfail067', namebase_if_compiler_lt('ghc','6.9', 'tcfail067-6.8'), compile_fail, [''])
test('tcfail068', only_compiler_types(['ghc']), compile_fail, ['-fglasgow-exts'])
test('tcfail069', normal, compile_fail, [''])
test('tcfail070', normal, compile_fail, [''])
......@@ -108,8 +108,10 @@ test('tcfail120', only_compiler_types(['ghc']), compile_fail, [''])
test('tcfail121', normal, compile_fail, [''])
test('tcfail122', only_compiler_types(['ghc']), compile_fail, [''])
test('tcfail123', only_compiler_types(['ghc']), compile_fail, [''])
test('tcfail124', only_compiler_types(['ghc']), compile_fail, [''])
test('tcfail125', normal, compile_fail, [''])
test('tcfail124', compose(only_compiler_types(['ghc']),
namebase_if_compiler_lt('ghc','6.9', 'tcfail124-6.8')),
compile_fail, [''])
test('tcfail125', namebase_if_compiler_lt('ghc','6.9', 'tcfail125-6.8'), compile_fail, [''])
test('tcfail126', reqlib('mtl'), compile_fail, [''])
test('tcfail127', normal, compile_fail, [''])
test('tcfail128', normal, compile_fail, [''])
......@@ -159,7 +161,7 @@ test('tcfail171', normal, compile_fail, [''])
test('tcfail172', normal, compile_fail, [''])
test('tcfail173', normal, compile_fail, [''])
test('tcfail174', normal, compile_fail, [''])
test('tcfail175', normal, compile_fail, [''])
test('tcfail175', namebase_if_compiler_lt('ghc','6.9', 'tcfail175-6.8'), compile_fail, [''])
test('tcfail176', normal, compile_fail, [''])
test('tcfail177', expect_broken(1176), compile_fail, [''])
test('tcfail178', normal, compile_fail, [''])
......
tcfail067.hs:12:15:
Could not deduce (Ord a) from the context ()
arising from a use of `SubRange' at tcfail067.hs:12:15-43
Possible fix:
add (Ord a) to the context of
the type signature for `subRangeValue'
In the pattern: SubRange (lower, upper) value
In the definition of `subRangeValue':
subRangeValue (SubRange (lower, upper) value) = value
tcfail067.hs:15:10:
Could not deduce (Ord a) from the context ()
arising from a use of `SubRange' at tcfail067.hs:15:10-25
Possible fix:
add (Ord a) to the context of the type signature for `subRange'
In the pattern: SubRange r value
In the definition of `subRange': subRange (SubRange r value) = r
tcfail067.hs:46:11:
Could not deduce (Ord a) from the context (Show a)
arising from a use of `SubRange' at tcfail067.hs:46:11-39
Possible fix:
add (Ord a) to the context of the type signature for `showRange'
In the pattern: SubRange (lower, upper) value
In the definition of `showRange':
showRange (SubRange (lower, upper) value)
= show value ++ " :" ++ show lower ++ ".." ++ show upper
tcfail067.hs:60:0:
Could not deduce (Show (SubRange a)) from the context (Num a)
arising from the superclasses of an instance declaration
at tcfail067.hs:60:0
Possible fix:
add (Show (SubRange a)) to the context of the instance declaration
or add an instance declaration for (Show (SubRange a))
In the instance declaration for `Num (SubRange a)'
tcfail067.hs:61:11:
Could not deduce (Ord a)
from the context (Num (SubRange a),
Num a,
Eq (SubRange a),
Show (SubRange a))
arising from a use of `numSubRangeNegate' at tcfail067.hs:61:11-27
Possible fix:
add (Ord a) to the context of the type signature for `negate'
In the expression: numSubRangeNegate
In the definition of `negate': negate = numSubRangeNegate
In the definition for method `negate'
tcfail067.hs:65:18:
Could not deduce (Ord a)
from the context (Num (SubRange a),
Num a,
Eq (SubRange a),
Show (SubRange a))
arising from a use of `SubRange' at tcfail067.hs:65:18-72
Possible fix:
add (Ord a) to the context of the type signature for `fromInteger'
In the expression:
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:4:
Could not deduce (Ord a) from the context (Num a)
arising from a use of `SubRange' at tcfail067.hs:74:4-35
Possible fix:
add (Ord a) to the context of
the type signature for `numSubRangeBinOp'
In the expression: SubRange (result, result) result
In the definition of `numSubRangeBinOp':
numSubRangeBinOp op a b
= SubRange (result, result) result
where
result = (subRangeValue a) `op` (subRangeValue b)
tcfail124.hs:6:7:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: x : _
In the definition of `f1': f1 (xs@(x : _)) = x
tcfail124.hs:9:3:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: [x]
In the definition of `f2': f2 [x] = x
tcfail124.hs:12:4:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: x : []
In the definition of `f3': f3 (x : []) = x
tcfail125.hs:11:3:
Could not deduce (Show a) from the context ()
arising from a use of `LiftObs' at tcfail125.hs:11:3-13
Possible fix:
add (Show a) to the context of the type signature for `f'
In the pattern: LiftObs _ _
In the definition of `f': f (LiftObs _ _) = "yes"
tcfail175.hs:11:0:
The equation(s) for `evalRHS' have three arguments,
but its type `Int -> a' has only one
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