diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2011-06-30 18:00:10 +0100 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2011-06-30 18:00:10 +0100 |
commit | 5aab5caaa950f16c53ff706e2c396a03855bff79 (patch) | |
tree | d2c113110ea1d587d8381378372f52b5ac7834e5 /testsuite/tests/ghc-regress | |
parent | 7d672220abe43ee8e4688e8babbc1c70ba6bfe88 (diff) | |
download | haskell-5aab5caaa950f16c53ff706e2c396a03855bff79.tar.gz |
Test Trac #5283
Diffstat (limited to 'testsuite/tests/ghc-regress')
-rw-r--r-- | testsuite/tests/ghc-regress/arrows/should_compile/T5283.hs | 20 | ||||
-rw-r--r-- | testsuite/tests/ghc-regress/arrows/should_compile/all.T | 1 |
2 files changed, 21 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/arrows/should_compile/T5283.hs b/testsuite/tests/ghc-regress/arrows/should_compile/T5283.hs new file mode 100644 index 0000000000..9216d3cd67 --- /dev/null +++ b/testsuite/tests/ghc-regress/arrows/should_compile/T5283.hs @@ -0,0 +1,20 @@ +{-# LANGUAGE Arrows #-} +-- Failed in ghci + +module T where + +import Prelude +import Control.Arrow + +mapAC :: Arrow arr => Integer -> arr (env, b) c -> arr (env, [b]) [c] +mapAC n farr = go 1 + where + go i | i == succ n = arr (\(_env, []) -> []) + | otherwise = proc ~(env, b : bs) -> + do c <- farr -< (env, b) + cs <- go (succ i) -< (env, bs) + returnA -< c : cs + +t :: Arrow arr => arr [a] [a] +t = proc ys -> + (| (mapAC 3) (\y -> returnA -< y) |) ys diff --git a/testsuite/tests/ghc-regress/arrows/should_compile/all.T b/testsuite/tests/ghc-regress/arrows/should_compile/all.T index a3eadb0541..3351b9f4ba 100644 --- a/testsuite/tests/ghc-regress/arrows/should_compile/all.T +++ b/testsuite/tests/ghc-regress/arrows/should_compile/all.T @@ -15,3 +15,4 @@ test('arrowlet1', normal, compile, ['']) test('arrowrec1', normal, compile, ['']) test('arrowpat', normal, compile, ['']) test('T3964', normal, compile, ['']) +test('T5283', normal, compile, ['']) |