diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2015-02-26 17:27:15 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2015-03-02 16:31:07 +0000 |
commit | 104c0ad53d4d5b6ea5ee67e04eb7943f5f0d4899 (patch) | |
tree | 90b4e95e93cf87dac5d45795605c5f5ff6f78d66 /testsuite/tests/rebindable | |
parent | 9b3239f81261f05ee3285c1b9dcbe113635145ef (diff) | |
download | haskell-104c0ad53d4d5b6ea5ee67e04eb7943f5f0d4899.tar.gz |
Test Trac #10112
Diffstat (limited to 'testsuite/tests/rebindable')
-rw-r--r-- | testsuite/tests/rebindable/T10112.hs | 16 | ||||
-rw-r--r-- | testsuite/tests/rebindable/all.T | 1 |
2 files changed, 17 insertions, 0 deletions
diff --git a/testsuite/tests/rebindable/T10112.hs b/testsuite/tests/rebindable/T10112.hs new file mode 100644 index 0000000000..1cfe49ed51 --- /dev/null +++ b/testsuite/tests/rebindable/T10112.hs @@ -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] diff --git a/testsuite/tests/rebindable/all.T b/testsuite/tests/rebindable/all.T index 70628fa325..6d7283e4e9 100644 --- a/testsuite/tests/rebindable/all.T +++ b/testsuite/tests/rebindable/all.T @@ -31,3 +31,4 @@ test('T5038', normal, compile_and_run, ['']) test('T4851', normal, compile, ['']) test('T5908', normal, compile, ['']) +test('T10112', normal, compile, ['']) |