Test Trac #10112
authorSimon Peyton Jones <simonpj@microsoft.com>
Thu, 26 Feb 2015 17:27:15 +0000 (17:27 +0000)
committerSimon Peyton Jones <simonpj@microsoft.com>
Mon, 2 Mar 2015 16:31:07 +0000 (16:31 +0000)
testsuite/tests/rebindable/T10112.hs [new file with mode: 0644]
testsuite/tests/rebindable/all.T

diff --git a/testsuite/tests/rebindable/T10112.hs b/testsuite/tests/rebindable/T10112.hs
new file mode 100644 (file)
index 0000000..1cfe49e
--- /dev/null
@@ -0,0 +1,16 @@
+{-# LANGUAGE RankNTypes, RebindableSyntax #-}
+module T10112 where
+
+import qualified Prelude as P
+
+(>>=) :: a -> ((forall b . b) -> c) -> c
+a >>= f = f P.undefined
+return a = a
+fail s = P.undefined
+
+t1 = 'd' >>= (\_ -> 'k')
+
+t2 = do { _ <- 'd'
+        ; 'k' }
+
+foo = P.putStrLn [t1, t2]
index 70628fa..6d7283e 100644 (file)
@@ -31,3 +31,4 @@ test('T5038', normal, compile_and_run, [''])
 test('T4851', normal, compile, [''])
 
 test('T5908', normal, compile, [''])
+test('T10112', normal, compile, [''])