The example n this test is now valid, when TypeOperators are enabled.
authorIavor S. Diatchki <iavor.diatchki@gmail.com>
Sun, 18 Mar 2012 22:01:12 +0000 (15:01 -0700)
committerIavor S. Diatchki <iavor.diatchki@gmail.com>
Sun, 18 Mar 2012 22:01:12 +0000 (15:01 -0700)
testsuite/tests/typecheck/should_compile/all.T
testsuite/tests/typecheck/should_compile/tc261.hs [new file with mode: 0644]
testsuite/tests/typecheck/should_fail/tcfail173.stderr

index ce6f95e..76708bb 100644 (file)
@@ -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/testsuite/tests/typecheck/should_compile/tc261.hs b/testsuite/tests/typecheck/should_compile/tc261.hs
new file mode 100644 (file)
index 0000000..3269c7e
--- /dev/null
@@ -0,0 +1,4 @@
+{-# LANGUAGE TypeOperators #-}
+module TcOK where
+
+newtype (f <.> g) a = Compose (f (g a))
index ee8f59b..4bda7d5 100644 (file)
@@ -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