diff options
author | simonpj <simonpj@microsoft.com> | 2010-03-04 13:06:19 +0000 |
---|---|---|
committer | simonpj <simonpj@microsoft.com> | 2010-03-04 13:06:19 +0000 |
commit | b8cad0590fdc2fbf74e56426b523f7fd71556a42 (patch) | |
tree | fb556ecb317a98a0aa2d3ac4dd0fbf45612748c6 /testsuite/tests | |
parent | 564bc417ac32905cbe338436bc178055955e4b31 (diff) | |
download | haskell-b8cad0590fdc2fbf74e56426b523f7fd71556a42.tar.gz |
Add test for Trac #3901
Diffstat (limited to 'testsuite/tests')
-rw-r--r-- | testsuite/tests/ghc-regress/rename/should_compile/T3901.hs | 14 | ||||
-rw-r--r-- | testsuite/tests/ghc-regress/rename/should_compile/all.T | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/testsuite/tests/ghc-regress/rename/should_compile/T3901.hs b/testsuite/tests/ghc-regress/rename/should_compile/T3901.hs new file mode 100644 index 0000000000..39b521977b --- /dev/null +++ b/testsuite/tests/ghc-regress/rename/should_compile/T3901.hs @@ -0,0 +1,14 @@ +{-# LANGUAGE RecordWildCards, TransformListComp, NamedFieldPuns #-} + +module T3901 where + +data Rec = Rec {a :: Int} deriving (Show) + +recs1 = [a | Rec {a=a} <- [Rec 1], then group by a] + +recs2 = [a | Rec {a} <- [Rec 1], then group by a] + +recs3 = [a | Rec {..} <- [Rec 1], then group by a] + +recs4 :: [[Int]] +recs4 = [a | Rec {..} <- [Rec 1], then group by a] diff --git a/testsuite/tests/ghc-regress/rename/should_compile/all.T b/testsuite/tests/ghc-regress/rename/should_compile/all.T index 2e040da73d..c213fab5bd 100644 --- a/testsuite/tests/ghc-regress/rename/should_compile/all.T +++ b/testsuite/tests/ghc-regress/rename/should_compile/all.T @@ -121,6 +121,7 @@ test('T3262', normal, compile, ['']) test('T3371', normal, compile, ['']) test('T1074b', normal, compile, ['-Wall']) test('T3640', normal, compile, ['']) +test('T3901', normal, compile, ['']) test('timing001', normal, compile, ['']) test('timing002', normal, compile, ['']) |