Test Trac #10248
authorSimon Peyton Jones <simonpj@microsoft.com>
Wed, 13 May 2015 16:11:46 +0000 (17:11 +0100)
committerSimon Peyton Jones <simonpj@microsoft.com>
Wed, 13 May 2015 16:11:46 +0000 (17:11 +0100)
testsuite/tests/ghci/scripts/T10248.script [new file with mode: 0644]
testsuite/tests/ghci/scripts/T10248.stderr [new file with mode: 0644]
testsuite/tests/ghci/scripts/all.T

diff --git a/testsuite/tests/ghci/scripts/T10248.script b/testsuite/tests/ghci/scripts/T10248.script
new file mode 100644 (file)
index 0000000..6614044
--- /dev/null
@@ -0,0 +1,2 @@
+:set -fdefer-type-errors
+Just <$> _
diff --git a/testsuite/tests/ghci/scripts/T10248.stderr b/testsuite/tests/ghci/scripts/T10248.stderr
new file mode 100644 (file)
index 0000000..1245b99
--- /dev/null
@@ -0,0 +1,18 @@
+
+<interactive>:3:10: warning:
+    Found hole ‘_’ with type: IO ()
+    In the second argument of ‘(<$>)’, namely ‘_’
+    In the first argument of ‘ghciStepIO ::
+                                IO a_alT -> IO a_alT’, namely
+      ‘Just <$> _’
+    In a stmt of an interactive GHCi command:
+      it <- ghciStepIO :: IO a_alT -> IO a_alT (Just <$> _)
+*** Exception: <interactive>:3:10: error:
+    Found hole ‘_’ with type: IO ()
+    In the second argument of ‘(<$>)’, namely ‘_’
+    In the first argument of ‘ghciStepIO ::
+                                IO a_alT -> IO a_alT’, namely
+      ‘Just <$> _’
+    In a stmt of an interactive GHCi command:
+      it <- ghciStepIO :: IO a_alT -> IO a_alT (Just <$> _)
+(deferred type error)
index 1582344..85ba5af 100755 (executable)
@@ -216,3 +216,4 @@ test('T10408A', normal, run_command,
     ['$MAKE -s --no-print-directory T10408A'])
 test('T10408B', normal, run_command,
     ['$MAKE -s --no-print-directory T10408B'])
+test('T10248', normal, ghci_script, ['T10248.script'])