Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : tc-untouchables
http://hackage.haskell.org/trac/ghc/changeset/13ee7f616f98959c173b2efe4a8c64009b4233a4 >--------------------------------------------------------------- commit 13ee7f616f98959c173b2efe4a8c64009b4233a4 Author: Simon Peyton Jones <[email protected]> Date: Fri Aug 31 10:05:31 2012 +0100 Accept error message changes >--------------------------------------------------------------- tests/indexed-types/should_compile/T3208b.hs | 19 +++++++++++++++---- tests/indexed-types/should_compile/T3208b.stderr | 20 ++++++++++++++++---- tests/indexed-types/should_fail/T7010.stderr | 2 +- tests/polykinds/all.T | 2 +- 4 files changed, 33 insertions(+), 10 deletions(-) diff --git a/tests/indexed-types/should_compile/T3208b.hs b/tests/indexed-types/should_compile/T3208b.hs index 012756a..075c74b 100644 --- a/tests/indexed-types/should_compile/T3208b.hs +++ b/tests/indexed-types/should_compile/T3208b.hs @@ -9,14 +9,25 @@ class SUBST s where class OBJECT o where type OTerm o - apply :: (SUBST s, OTerm o ~ STerm s) => s -> o + apply :: (SUBST a, OTerm o ~ STerm a) => a -> o fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c fce' f = fce (apply f) -- f :: a --- apply f :: (OBJECT a, SUBST a, OTerm o ~ STerm a) => o +-- apply f :: (SUBST a, OBJECT o, OTerm o ~ STerm a) => o -- fce called with a=o, gives wanted (OTerm o ~ STerm o, OBJECT o, SUBST o) +-- o is a unif var. - -fce :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c +fce :: (OTerm o ~ STerm o, OBJECT o, SUBST o) => o -> c fce f = fce' f + + +{- (OTerm a ~ STerm a, OBJECT a, SUBST a) + => (SUBST a, OBJECT o, OTerm o ~ STerm a, OTerm o ~ STerm o, OBJECT o, SUBST o) + + = OTerm o ~ u1 + STerm o ~ u1 + Sterm a ~ u1 + + = (SUBST a, OBJECT o, STerm o ~ STerm a, OTerm o ~ STerm o, OBJECT o, SUBST o) +-} \ No newline at end of file diff --git a/tests/indexed-types/should_compile/T3208b.stderr b/tests/indexed-types/should_compile/T3208b.stderr index fc697fb..6dc3e84 100644 --- a/tests/indexed-types/should_compile/T3208b.stderr +++ b/tests/indexed-types/should_compile/T3208b.stderr @@ -1,14 +1,26 @@ T3208b.hs:15:10: - Could not deduce (STerm a0 ~ STerm a) + Could not deduce (STerm o0 ~ STerm a) from the context (OTerm a ~ STerm a, OBJECT a, SUBST a) bound by the type signature for fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c at T3208b.hs:14:9-56 NB: `STerm' is a type function, and may not be injective - The type variable `a0' is ambiguous + The type variable `o0' is ambiguous Possible fix: add a type signature that fixes these type variable(s) - Expected type: STerm a0 - Actual type: OTerm a0 + Expected type: STerm o0 + Actual type: OTerm o0 + In the expression: fce (apply f) + In an equation for fce': fce' f = fce (apply f) + +T3208b.hs:15:15: + Could not deduce (STerm a ~ OTerm o0) + from the context (OTerm a ~ STerm a, OBJECT a, SUBST a) + bound by the type signature for + fce' :: (OTerm a ~ STerm a, OBJECT a, SUBST a) => a -> c + at T3208b.hs:14:9-56 + The type variable `o0' is ambiguous + Possible fix: add a type signature that fixes these type variable(s) + In the first argument of `fce', namely `(apply f)' In the expression: fce (apply f) In an equation for fce': fce' f = fce (apply f) diff --git a/tests/indexed-types/should_fail/T7010.stderr b/tests/indexed-types/should_fail/T7010.stderr index 6f620c7..b9d213a 100644 --- a/tests/indexed-types/should_fail/T7010.stderr +++ b/tests/indexed-types/should_fail/T7010.stderr @@ -1,6 +1,6 @@ T7010.hs:44:27: - Couldn't match type `Serial (IO Float)' with `IO Float' + Couldn't match type `IO Float' with `Serial t0' Expected type: (Float, ValueTuple Vector) Actual type: (Float, ValueTuple Float) In the first argument of `withArgs', namely `plug' diff --git a/tests/polykinds/all.T b/tests/polykinds/all.T index f2d2532..86e0530 100644 --- a/tests/polykinds/all.T +++ b/tests/polykinds/all.T @@ -63,6 +63,6 @@ test('T7128', normal, compile,['']) test('T7151', normal, compile_fail,['']) test('T7095', normal, compile,['']) test('T7090', normal, compile,['']) -test('T7176', expect_broken(7176), compile,['']) +test('T7176', normal, compile,['']) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
