Commit ef3ccc56 authored by drl's avatar drl
Browse files

Changes to the testsuite for the new renamer

The rationale for these new behaviors is as follows:

We now allow existentials to be unpacked in local (but not top-level!)
ValBinds, so some pattern signatures that used to fail in the renamer
now fail in the type checker (if the type of the body mentions the
unpacked type var):
   tc141(normal)

We don't always print HsWrappers in debug mode:
   TH_exn1(normal)
   TH_exn2(normal)

Sections are parsed (and therefore printed) differently:
   rnfail019(normal)
   read023(normal)

Character numbers in pattern printing are more precise:
   tcfail067(normal)
   tcfail124(normal)
   tcfail125(normal)
parent 5fb860d1
read023.hs:9:4:
read023.hs:9:5:
The operator `**' [infixl 7] of a section
must have lower precedence than the operand prefix `-' [infixl 6]
in the section: `(- 3 **)'
in the section: `- 3 **'
rnfail019.hs:5:8:
rnfail019.hs:5:9:
The operator `:' [infixr 5] of a section
must have lower precedence than the operand `(:)' [infixr 5]
in the section: `(x : y :)'
in the section: `x : y :'
......@@ -3,7 +3,4 @@ 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: case reverse @ Char "no" of
[]
-> return @ [Language.Haskell.TH.Syntax.Dec]
(GHC.Base.[] @ Language.Haskell.TH.Syntax.Dec)
Code: case reverse "no" of [] -> return (GHC.Base.[])
......@@ -3,11 +3,10 @@ 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
return = return
....
in
do ds <- [d| |]
return @ [Language.Haskell.TH.Syntax.Dec]
(tail @ Language.Haskell.TH.Syntax.Dec ds)
return (tail ds)
tc141.hs:11:14: Not in scope: type variable `a'
tc141.hs:11:11:
A pattern type signature cannot bind scoped type variables `a'
unless the pattern has a rigid type context
In the pattern: p :: a
In the pattern: (p :: a, q :: a)
In a pattern binding: (p :: a, q :: a) = x
tc141.hs:11:19: Not in scope: type variable `a'
tc141.hs:13:12:
A pattern type signature cannot bind scoped type variables `a'
unless the pattern has a rigid type context
In the pattern: y :: a
In a pattern binding: y :: a = a
In the expression:
let y :: a = a in
let
v :: a
v = b
in v
tc141.hs:13:15: Not in scope: type variable `a'
tc141.hs:15:6:
Inferred type is less polymorphic than expected
Quantified type variable `a' is mentioned in the environment:
b :: a (bound at tc141.hs:13:4)
When trying to generalise the type inferred for `v'
Signature type: forall a. a
Type to generalise: a
In the type signature for `v'
When generalising the type(s) for `v'
tcfail067.hs:12:15:
Could not deduce (Ord a) from the context ()
arising from a use of `SubRange' at tcfail067.hs:12:15-43
arising from a use of `SubRange' at tcfail067.hs:12:15-22
Possible fix:
add (Ord a) to the context of
the type signature for `subRangeValue'
......@@ -11,7 +11,7 @@ tcfail067.hs:12:15:
tcfail067.hs:15:10:
Could not deduce (Ord a) from the context ()
arising from a use of `SubRange' at tcfail067.hs:15:10-25
arising from a use of `SubRange' at tcfail067.hs:15:10-17
Possible fix:
add (Ord a) to the context of the type signature for `subRange'
In the pattern: SubRange r value
......@@ -19,7 +19,7 @@ tcfail067.hs:15:10:
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
arising from a use of `SubRange' at tcfail067.hs:46:11-18
Possible fix:
add (Ord a) to the context of the type signature for `showRange'
In the pattern: SubRange (lower, upper) value
......
tcfail124.hs:6:7:
tcfail124.hs:6:8:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: x : _
......@@ -11,7 +11,7 @@ tcfail124.hs:9:3:
In the pattern: [x]
In the definition of `f2': f2 [x] = x
tcfail124.hs:12:4:
tcfail124.hs:12:5:
Couldn't match expected type `forall a. (Eq a) => [a]'
against inferred type `[a]'
In the pattern: 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"
tcfail125.hs:11:3:
Could not deduce (Show a) from the context ()
arising from a use of `LiftObs' at tcfail125.hs:11:3-9
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"
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