Commit 7fa287ac authored by Simon Peyton Jones's avatar Simon Peyton Jones

Accept error message changes

parent c5b92198
arrowfail001.hs:16:36:
No instance for (Foo a)
arising from a use of `foo'
In the expression: foo
In the expression: proc x -> case x of { Bar a -> foo -< a }
In an equation for `get':
get = proc x -> case x of { Bar a -> foo -< a }
arrowfail001.hs:16:27:
Couldn't match expected type `a0' with actual type `a'
because type variable `a' would escape its scope
This (rigid, skolem) type variable is bound by
a pattern with constructor
Bar :: forall a. Foo a => a -> Bar,
in a case alternative
In the pattern: Bar a
In a case alternative: Bar a -> foo -< a
In the command: case x of { Bar a -> foo -< a }
arrowfail001.hs:16:36:
No instance for (Foo a0) arising from a use of `foo'
In the expression: foo
In the expression: proc x -> case x of { Bar a -> foo -< a }
In an equation for `get':
get = proc x -> case x of { Bar a -> foo -< a }
......@@ -17,7 +17,8 @@ data TEx where
TEx :: a -> TEx
f (x::beta) =
f x =
let g1 :: forall b. b -> ()
g1 _ = h [x]
g2 z = case z of TEx y -> (h [[undefined]], op x [y])
......@@ -27,7 +28,27 @@ f (x::beta) =
{- This example comes from Note [Extra TcS Untouchables] in TcSimplify. It demonstrates
why when floating equalities out of an implication constraint we must record the free
variables of the equalities as untouchables. With GHC 7.4.1 this program gives a Core
Lint error because of an existential escaping. -}
Lint error because of an existential escaping.
assuming x:beta
forall b. F Int ~ [beta] (from g1)
forall a. F Int ~ [[alpha]], C beta [a] (from g2)
-}
{- Assume x:beta
From g1 we get (forall b. F Int ~ [beta])
From g2 we get (forall c. 0 => F Int ~ [[alpha]] /\ C beta [c])
Floating we get
F Int ~ [beta], F Int ~ [[alpha]], alpha ~ alpha', forall c. C beta [c]
= { alpha := alpha' }
= beta ~ [alpha'], F Int ~ [[alpha']], forall c. C beta [c]
= { beta := [alpha']
F Int ~ [[alpha']], forall c. C [alpha'] [c]
= F Int ~ [[alpha']], forall c. (C [alpha'] [c], alpha' ~ c)
-}
\ No newline at end of file
ExtraTcsUntch.hs:23:53:
ExtraTcsUntch.hs:24:53:
Could not deduce (C [t] [a]) arising from a use of `op'
from the context (beta ~ [t], F Int ~ [[t]])
from the context (F Int ~ [[t]])
bound by the inferred type of
f :: (beta ~ [t], F Int ~ [[t]]) => beta -> ((), ((), ()))
at ExtraTcsUntch.hs:(20,1)-(24,29)
f :: F Int ~ [[t]] => [t] -> ((), ((), ()))
at ExtraTcsUntch.hs:(21,1)-(25,29)
Possible fix: add an instance declaration for (C [t] [a])
In the expression: op x [y]
In the expression: (h [[undefined]], op x [y])
......
T2627b.hs:20:14:
Couldn't match expected type `b0' with actual type `Dual (Dual b0)'
`b0' is untouchable
Couldn't match type `t0' with `Dual (Dual t0)'
`t0' is untouchable
inside the constraints (b ~ W a2 b2)
bound at a pattern with constructor
Wr :: forall a b. a -> Comm b -> Comm (W a b),
in an equation for `conn'
Expected type: Dual t0
Actual type: Dual (Dual (Dual t0))
In the pattern: Wr a r
In an equation for `conn':
conn (Rd k) (Wr a r) = conn undefined undefined
T3330a.hs:19:34:
Couldn't match type `s' with `(->) (s0 ix1 -> ix1)'
Couldn't match type `ix'
with `r ix1 -> Writer [AnyF ((->) (s0 ix0 -> ix1))] (r'0 ix1)'
`ix' is a rigid type variable bound by
the type signature for children :: s ix -> PF s r ix -> [AnyF s]
at T3330a.hs:18:13
Expected type: (s0 ix0 -> ix1)
-> r ix1 -> Writer [AnyF s] (r'0 ix1)
Actual type: s ix
In the first argument of `hmapM', namely `p'
In the first argument of `execWriter', namely `(hmapM p collect x)'
In the expression: execWriter (hmapM p collect x)
T3330a.hs:19:34:
Couldn't match type `s' with `(->) (s0 ix0 -> ix1)'
`s' is a rigid type variable bound by
the type signature for children :: s ix -> PF s r ix -> [AnyF s]
at T3330a.hs:18:13
Expected type: (s0 ix0 -> ix1) -> r ix1 -> Writer [AnyF s] (r ix1)
Expected type: (s0 ix0 -> ix1)
-> r ix1 -> Writer [AnyF s] (r'0 ix1)
Actual type: s ix
In the first argument of `hmapM', namely `p'
In the first argument of `execWriter', namely `(hmapM p collect x)'
In the expression: execWriter (hmapM p collect x)
T3330a.hs:19:44:
Couldn't match type `ix' with `r ix0 -> Writer [AnyF s0] (r ix0)'
Couldn't match type `ix' with `r0 ix0 -> Writer [AnyF s0] (r0 ix0)'
`ix' is a rigid type variable bound by
the type signature for children :: s ix -> PF s r ix -> [AnyF s]
at T3330a.hs:18:13
Expected type: PF s r (r ix0 -> Writer [AnyF s0] (r ix0))
Expected type: PF s r (r0 ix0 -> Writer [AnyF s0] (r0 ix0))
Actual type: PF s r ix
In the third argument of `hmapM', namely `x'
In the first argument of `execWriter', namely `(hmapM p collect x)'
......
{-# LANGUAGE TypeFamilies #-}
module T7010 where
type Vector = Serial Float
data Serial v = Serial
class MakeValueTuple a where
type ValueTuple a :: *
instance MakeValueTuple Float where
type ValueTuple Float = IO Float
instance (MakeValueTuple v) => MakeValueTuple (Serial v) where
type ValueTuple (Serial v) = Serial (ValueTuple v)
stereoFromMono :: (v, v)
stereoFromMono = undefined
processIO ::
(MakeValueTuple a) =>
(ValueTuple a, ValueTuple a) ->
(a, a)
processIO = undefined
phoneme :: (Vector, Vector)
phoneme = processIO stereoFromMono
withArgs ::
(MakeValueTuple b) =>
(a, ValueTuple b) ->
(a, b)
withArgs = undefined
plug ::
(MakeValueTuple b) =>
(b, ValueTuple b)
plug = undefined
filterFormants :: (Float, Vector)
filterFormants = withArgs plug
{-# LANGUAGE TypeFamilies #-}
module T7010 where
type Vector = Serial Float
data Serial v = Serial
class MakeValueTuple a where
type ValueTuple a :: *
instance MakeValueTuple Float where
type ValueTuple Float = IO Float
instance (MakeValueTuple v) => MakeValueTuple (Serial v) where
type ValueTuple (Serial v) = Serial (ValueTuple v)
stereoFromMono :: (v, v)
stereoFromMono = undefined
processIO ::
(MakeValueTuple a) =>
(ValueTuple a, ValueTuple a) ->
(a, a)
processIO = undefined
phoneme :: (Vector, Vector)
phoneme = processIO stereoFromMono
withArgs ::
(MakeValueTuple b) =>
(a, ValueTuple b) ->
(a, b)
withArgs = undefined
plug ::
(MakeValueTuple c) =>
(c, ValueTuple c)
plug = undefined
filterFormants :: (Float, Vector)
filterFormants = withArgs plug
{- Call to withArgs generates
(MakeValueTuple Vector, (c,ValueTuple c)~(Float,ValueTuple Vector), MakeValueTuple c)
= (MakeValueTuple (Serial Float), ValueTuple Float ~ ValueTuple (Serial Float), MakeValueTuple Float)
= (MakeValueTuple (Serial Float), MakeValueTuple Float,
IO Float ~ Serial (ValueTuple Float))
IO Float ~ Serial f, ValueTuple Float ~ f
= IO Float ~ Serial f, IO Float ~ f
-}
T7010.hs:44:27:
Couldn't match type `Serial (ValueTuple Float)' with `IO Float'
Expected type: (Float, ValueTuple Vector)
Actual type: (Float, ValueTuple Float)
In the first argument of `withArgs', namely `plug'
In the expression: withArgs plug
In an equation for `filterFormants': filterFormants = withArgs plug
T7010.hs:44:27:
Couldn't match type `Serial (IO Float)' with `IO Float'
Expected type: (Float, ValueTuple Vector)
Actual type: (Float, ValueTuple Float)
In the first argument of `withArgs', namely `plug'
In the expression: withArgs plug
In an equation for `filterFormants': filterFormants = withArgs plug
==================== FloatOut stats: ====================
1 Lets floated to top level; 0 Lets floated elsewhere; from 4 Lambda groups
==================== FloatOut stats: ====================
0 Lets floated to top level; 0 Lets floated elsewhere; from 3 Lambda groups
==================== Grand total simplifier statistics ====================
Total ticks: 11
2 PreInlineUnconditionally
1 f
1 lvl
1 UnfoldingDone 1 Roman.bar
1 RuleFired 1 foo/bar
7 BetaReduction
1 f
1 m
1 a
1 m
1 b
1 m
1 a
8 SimplifierDone 8
==================== FloatOut stats: ====================
1 Lets floated to top level; 0 Lets floated elsewhere; from 4 Lambda groups
==================== FloatOut stats: ====================
0 Lets floated to top level; 0 Lets floated elsewhere; from 3 Lambda groups
==================== Grand total simplifier statistics ====================
Total ticks: 11
2 PreInlineUnconditionally
1 f
1 lvl
1 UnfoldingDone 1 Roman.bar
1 RuleFired 1 foo/bar
7 BetaReduction
1 f
1 m
1 a
1 m
1 a
1 m
1 b
8 SimplifierDone 8
T2714.hs:8:5:
Couldn't match type `a' with `f0 b'
`a' is a rigid type variable bound by
the type signature for f :: ((a -> b) -> b) -> forall c. c -> a
at T2714.hs:7:6
Expected type: ((a -> b) -> b) -> c -> a
Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
In the expression: ffmap
In an equation for `f': f = ffmap
T2714.hs:8:5:
Couldn't match type `c' with `f0 (f0 b -> b)'
`c' is a rigid type variable bound by
the type signature for f :: ((a -> b) -> b) -> c -> a
at T2714.hs:8:1
Expected type: ((a -> b) -> b) -> c -> a
Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
In the expression: ffmap
In an equation for `f': f = ffmap
T2714.hs:8:5:
Couldn't match type `c' with `f0 (a -> b)'
`c' is a rigid type variable bound by
the type signature for f :: ((a -> b) -> b) -> c -> a
at T2714.hs:8:1
Expected type: ((a -> b) -> b) -> c -> a
Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
In the expression: ffmap
In an equation for `f': f = ffmap
T2714.hs:8:5:
Couldn't match type `a' with `f0 b'
`a' is a rigid type variable bound by
the type signature for f :: ((a -> b) -> b) -> forall c. c -> a
at T2714.hs:7:6
Expected type: ((a -> b) -> b) -> c -> a
Actual type: ((a -> b) -> b) -> f0 (a -> b) -> f0 b
In the expression: ffmap
In an equation for `f': f = ffmap
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