summaryrefslogtreecommitdiff
path: root/testsuite/tests
diff options
context:
space:
mode:
Diffstat (limited to 'testsuite/tests')
-rw-r--r--testsuite/tests/module/T11432.hs9
-rw-r--r--testsuite/tests/module/T11432.stderr10
-rw-r--r--testsuite/tests/module/all.T1
-rw-r--r--testsuite/tests/module/mod89.stderr20
4 files changed, 30 insertions, 10 deletions
diff --git a/testsuite/tests/module/T11432.hs b/testsuite/tests/module/T11432.hs
new file mode 100644
index 0000000000..408935d4ec
--- /dev/null
+++ b/testsuite/tests/module/T11432.hs
@@ -0,0 +1,9 @@
+{-
+We expect to get a suggestion to add 'type' keyword
+and enable TypeOperators extension.
+-}
+
+{-# LANGUAGE TypeOperators #-}
+module T11432 ((-.->)(..)) where
+
+newtype (f -.-> g) a = Fn { apFn :: f a -> g a }
diff --git a/testsuite/tests/module/T11432.stderr b/testsuite/tests/module/T11432.stderr
new file mode 100644
index 0000000000..bf2a58b0a0
--- /dev/null
+++ b/testsuite/tests/module/T11432.stderr
@@ -0,0 +1,10 @@
+
+T11432.hs:7:16:
+ Not in scope: ‘-.->’
+ Note: use ‘type’ keyword to export type constructor ‘-.->’
+ defined at T11432.hs:9:1
+ (requires TypeOperators extension)
+
+T11432.hs:7:16:
+ The export item ‘(-.->)(..)’
+ attempts to export constructors or class methods that are not visible here
diff --git a/testsuite/tests/module/all.T b/testsuite/tests/module/all.T
index cd1bdac293..e6446fe480 100644
--- a/testsuite/tests/module/all.T
+++ b/testsuite/tests/module/all.T
@@ -347,3 +347,4 @@ test('T9061', normal, compile, [''])
test('T9997', normal, compile, [''])
test('T10233', extra_clean(['T01233a.hi', 'T01233a.o']),
multimod_compile, ['T10233', '-v0'])
+test('T11432', normal, compile_fail, [''])
diff --git a/testsuite/tests/module/mod89.stderr b/testsuite/tests/module/mod89.stderr
index b355f3050b..5b2f422455 100644
--- a/testsuite/tests/module/mod89.stderr
+++ b/testsuite/tests/module/mod89.stderr
@@ -1,10 +1,10 @@
-
-mod89.hs:5:1: warning:
- The import item ‘map(..)’ suggests that
- ‘map’ has (in-scope) constructors or class methods,
- but it has none
-
-mod89.hs:5:1: warning:
- The import of ‘Prelude’ is redundant
- except perhaps to import instances from ‘Prelude’
- To import instances alone, use: import Prelude()
+
+mod89.hs:5:1: warning:
+ The import item ‘map(..)’ suggests that
+ ‘map’ has (in-scope) constructors or class methods,
+ but it has none
+
+mod89.hs:5:1: warning:
+ The import of ‘Prelude’ is redundant
+ except perhaps to import instances from ‘Prelude’
+ To import instances alone, use: import Prelude()