Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : master
http://hackage.haskell.org/trac/ghc/changeset/d26ca7cb2e50dc4531574569ef1b93994a958113 >--------------------------------------------------------------- commit d26ca7cb2e50dc4531574569ef1b93994a958113 Author: Paolo Capriotti <[email protected]> Date: Thu Apr 12 11:05:12 2012 +0100 Add testcase for #6001 >--------------------------------------------------------------- tests/typecheck/should_fail/T6001.hs | 9 +++++++++ tests/typecheck/should_fail/T6001.stderr | 5 +++++ tests/typecheck/should_fail/all.T | 1 + 3 files changed, 15 insertions(+), 0 deletions(-) diff --git a/tests/typecheck/should_fail/T6001.hs b/tests/typecheck/should_fail/T6001.hs new file mode 100644 index 0000000..fd918aa --- /dev/null +++ b/tests/typecheck/should_fail/T6001.hs @@ -0,0 +1,9 @@ +{-# LANGUAGE InstanceSigs #-} + +module T6001 where + +data DayKind = Work | Rest + +instance Num DayKind where + fromInteger :: Int -> DayKind + fromInteger = undefined diff --git a/tests/typecheck/should_fail/T6001.stderr b/tests/typecheck/should_fail/T6001.stderr new file mode 100644 index 0000000..7fe591d --- /dev/null +++ b/tests/typecheck/should_fail/T6001.stderr @@ -0,0 +1,5 @@ + +T6001.hs:8:18: + Method signature does not match class; it should be + fromInteger :: Integer -> DayKind + In the instance declaration for `Num DayKind' diff --git a/tests/typecheck/should_fail/all.T b/tests/typecheck/should_fail/all.T index caf92fb..e0f95bf 100644 --- a/tests/typecheck/should_fail/all.T +++ b/tests/typecheck/should_fail/all.T @@ -272,3 +272,4 @@ test('T5689', normal, compile_fail, ['']) test('T5684', normal, compile_fail, ['']) test('T5858', normal, compile_fail, ['']) test('T5957', normal, compile_fail, ['']) +test('T6001', normal, compile_fail, ['']) _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
