diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-04-05 12:34:37 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-04-05 12:34:37 +0100 |
commit | ac8464ba51417e21f41d7b5fcfbf2124fc6179b9 (patch) | |
tree | 6beb85edd8bfadb3b6a0580944436054af42c227 | |
parent | f90a4e1abc80df73d4d6c1532ed8b6bc83f69142 (diff) | |
download | haskell-ac8464ba51417e21f41d7b5fcfbf2124fc6179b9.tar.gz |
Test Trac #5022
-rw-r--r-- | testsuite/tests/arrows/should_compile/T5022.hs | 19 | ||||
-rw-r--r-- | testsuite/tests/th/all.T | 1 |
2 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/tests/arrows/should_compile/T5022.hs b/testsuite/tests/arrows/should_compile/T5022.hs new file mode 100644 index 0000000000..d0213397e3 --- /dev/null +++ b/testsuite/tests/arrows/should_compile/T5022.hs @@ -0,0 +1,19 @@ +{-# LANGUAGE Arrows #-} +module T5022 ( pIterate ) where + +import Prelude hiding ( init ) + +returnA :: b -> b +returnA = id + +------------ +newtype State s a = State { unState :: [a] } + +------------ +pIterate :: a -> [a] +pIterate = + proc x -> do + rec + as <- unState -< s + let s = State (x:as) + returnA -< as diff --git a/testsuite/tests/th/all.T b/testsuite/tests/th/all.T index fbe54f987c..491bba9fcf 100644 --- a/testsuite/tests/th/all.T +++ b/testsuite/tests/th/all.T @@ -233,3 +233,4 @@ test('T5984', extra_clean(['T5984_Lib.hi', 'T5984_Lib.o']), test('T5555', extra_clean(['T5555_Lib.hi', 'T5555_Lib.o']), multimod_compile, ['T5555', '-v0']) test('T5976', normal, compile_fail, ['-v0']) +test('T5795', normal, compile_fail, ['-v0']) |