Repository : ssh://darcs.haskell.org//srv/darcs/testsuite On branch : type-nats
http://hackage.haskell.org/trac/ghc/changeset/7db3608abcaf89d6ce53f8295efe58c3b0f276b5 >--------------------------------------------------------------- commit 7db3608abcaf89d6ce53f8295efe58c3b0f276b5 Author: Iavor S. Diatchki <[email protected]> Date: Sun Mar 18 15:01:12 2012 -0700 The example n this test is now valid, when TypeOperators are enabled. >--------------------------------------------------------------- tests/typecheck/should_compile/all.T | 1 + tests/typecheck/should_compile/tc261.hs | 4 ++++ tests/typecheck/should_fail/tcfail173.stderr | 5 +++-- 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/tests/typecheck/should_compile/all.T b/tests/typecheck/should_compile/all.T index ce6f95e..76708bb 100644 --- a/tests/typecheck/should_compile/all.T +++ b/tests/typecheck/should_compile/all.T @@ -352,6 +352,7 @@ test('tc257', normal, compile, ['']) test('tc258', normal, compile, ['']) test('tc259', normal, compile, ['']) test('tc260', normal, compile, ['']) +test('tc261', normal, compile, ['']) test('GivenOverlapping', normal, compile, ['']) test('SilentParametersOverlapping', normal, compile, ['']) diff --git a/tests/typecheck/should_compile/tc261.hs b/tests/typecheck/should_compile/tc261.hs new file mode 100644 index 0000000..3269c7e --- /dev/null +++ b/tests/typecheck/should_compile/tc261.hs @@ -0,0 +1,4 @@ +{-# LANGUAGE TypeOperators #-} +module TcOK where + +newtype (f <.> g) a = Compose (f (g a)) diff --git a/tests/typecheck/should_fail/tcfail173.stderr b/tests/typecheck/should_fail/tcfail173.stderr index ee8f59b..4bda7d5 100644 --- a/tests/typecheck/should_fail/tcfail173.stderr +++ b/tests/typecheck/should_fail/tcfail173.stderr @@ -1,3 +1,4 @@ -tcfail173.hs:5:10: - Malformed head of type or class declaration: (f <.> g) a +tcfail173.hs:5:12: + Illegal declaration of a type or class operator `<.>' + Use -XTypeOperators to declare operators in type and declarations _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
