Test case: GHCi uses UnicodeSyntax if the loaded file uses it.
authorJoachim Breitner <mail@joachim-breitner.de>
Fri, 6 Jun 2014 16:42:34 +0000 (18:42 +0200)
committerJoachim Breitner <mail@joachim-breitner.de>
Fri, 6 Jun 2014 16:55:34 +0000 (18:55 +0200)
Its marked as broken, as this does not work yet, but we are calling it a
day here soon, so I want this to be recorded (#8959).

testsuite/tests/ghci/scripts/T8959b.hs [new file with mode: 0644]
testsuite/tests/ghci/scripts/T8959b.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T8959b.stderr [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T

diff --git a/testsuite/tests/ghci/scripts/T8959b.hs b/testsuite/tests/ghci/scripts/T8959b.hs
new file mode 100644 (file)
index 0000000..064b267
--- /dev/null
@@ -0,0 +1,11 @@
+{-# LANGUAGE UnicodeSyntax, Arrows, RankNTypes #-}
+module T8959b where
+
+foo :: Int -> Int
+foo = ()
+
+bar :: ()
+bar = proc x -> do return -< x
+
+baz = () :: (forall a. a -> a) -> a
+
diff --git a/testsuite/tests/ghci/scripts/T8959b.script b/testsuite/tests/ghci/scripts/T8959b.script
new file mode 100644 (file)
index 0000000..f3c23c9
--- /dev/null
@@ -0,0 +1 @@
+:l T8959b.hs
diff --git a/testsuite/tests/ghci/scripts/T8959b.stderr b/testsuite/tests/ghci/scripts/T8959b.stderr
new file mode 100644 (file)
index 0000000..4f1ac7a
--- /dev/null
@@ -0,0 +1,16 @@
+
+T8959b.hs:5:7:
+    Couldn't match expected type ‘Int → Int’ with actual type ‘()’
+    In the expression: ()
+    In an equation for ‘foo’: foo = ()
+
+T8959b.hs:8:7:
+    Couldn't match expected type ‘()’ with actual type ‘t0 → m0 t0’
+    In the expression: proc x -> do { return ↢ x }
+    In an equation for ‘bar’: bar = proc x -> do { return ↢ x }
+
+T8959b.hs:10:7:
+    Couldn't match expected type ‘(∀ a2. a2 → a2) → a1’
+                with actual type ‘()’
+    In the expression: () ∷ (∀ a. a -> a) -> a
+    In an equation for ‘baz’: baz = () ∷ (∀ a. a -> a) -> a
index b0a9912..161e14b 100755 (executable)
@@ -173,3 +173,4 @@ test('T8831', normal, ghci_script, ['T8831.script'])
 test('T8917', normal, ghci_script, ['T8917.script'])
 test('T8931', normal, ghci_script, ['T8931.script'])
 test('T8959', normal, ghci_script, ['T8959.script'])
+test('T8959b', expect_broken(8959), ghci_script, ['T8959b.script'])