Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/4bd3920047fb62514fbe7ddab0e04af0c35c56b0 >--------------------------------------------------------------- commit 4bd3920047fb62514fbe7ddab0e04af0c35c56b0 Author: Simon Peyton Jones <[email protected]> Date: Sun Mar 3 23:13:41 2013 +0000 Test Trac #7696, #7697 >--------------------------------------------------------------- tests/typecheck/should_fail/T7696.hs | 17 +++++++++++++++++ tests/typecheck/should_fail/T7696.stderr | 17 +++++++++++++++++ tests/typecheck/should_fail/T7697.hs | 4 ++++ tests/typecheck/should_fail/T7697.stderr | 4 ++++ tests/typecheck/should_fail/all.T | 2 ++ 5 files changed, 44 insertions(+), 0 deletions(-) diff --git a/tests/typecheck/should_fail/T7696.hs b/tests/typecheck/should_fail/T7696.hs new file mode 100644 index 0000000..f2dbdde --- /dev/null +++ b/tests/typecheck/should_fail/T7696.hs @@ -0,0 +1,17 @@ +module T7696 where + +f1 :: (m a, t m) +f1 = undefined + +f2 :: ((), w ()) +f2 = f1 + +{- +m :: * -> * +t :: (* -> *) -> * +a :: * +w :: * -> * + +m a ~ () +t m ~ w () +-} \ No newline at end of file diff --git a/tests/typecheck/should_fail/T7696.stderr b/tests/typecheck/should_fail/T7696.stderr new file mode 100644 index 0000000..da30556 --- /dev/null +++ b/tests/typecheck/should_fail/T7696.stderr @@ -0,0 +1,17 @@ + +T7696.hs:7:6: + Couldn't match kind â* -> *â with â*â + When matching types + m0 :: * -> * + () :: * + Expected type: ((), w ()) + Actual type: (m0 a0, t0 m0) + In the expression: f1 + In an equation for âf2â: f2 = f1 + +T7696.hs:7:6: + Couldn't match type âm0 a0â with â()â + Expected type: ((), w ()) + Actual type: (m0 a0, t0 m0) + In the expression: f1 + In an equation for âf2â: f2 = f1 diff --git a/tests/typecheck/should_fail/T7697.hs b/tests/typecheck/should_fail/T7697.hs new file mode 100644 index 0000000..00815f7 --- /dev/null +++ b/tests/typecheck/should_fail/T7697.hs @@ -0,0 +1,4 @@ +module T7697 where + +f :: Int => Int +f x = x diff --git a/tests/typecheck/should_fail/T7697.stderr b/tests/typecheck/should_fail/T7697.stderr new file mode 100644 index 0000000..759d4ab --- /dev/null +++ b/tests/typecheck/should_fail/T7697.stderr @@ -0,0 +1,4 @@ + +T7697.hs:3:6: + Expected a constraint, but âIntâ has kind â*â + In the type signature for âfâ: f :: Int => Int diff --git a/tests/typecheck/should_fail/all.T b/tests/typecheck/should_fail/all.T index dfa0668..284f60d 100644 --- a/tests/typecheck/should_fail/all.T +++ b/tests/typecheck/should_fail/all.T @@ -298,3 +298,5 @@ test('T7609', normal, compile_fail, ['']) test('T7645', normal, compile_fail, ['']) test('T2354', normal, compile_fail, ['-O']) test('T7734', normal, compile_fail, ['']) +test('T7697', normal, compile_fail, ['']) +test('T7696', normal, compile_fail, [''])
_______________________________________________ ghc-commits mailing list [email protected] http://www.haskell.org/mailman/listinfo/ghc-commits
