[commit: testsuite] master: Include pairs in this test (18624e7)
git at git.haskell.org
git at git.haskell.org
Tue Nov 19 09:05:04 UTC 2013
Repository : ssh://git@git.haskell.org/testsuite
On branch : master
Link : http://ghc.haskell.org/trac/ghc/changeset/18624e7ac6e391d90963500e1fecf0affc551dbf/testsuite
>---------------------------------------------------------------
commit 18624e7ac6e391d90963500e1fecf0affc551dbf
Author: Jose Pedro Magalhaes <jpm at cs.ox.ac.uk>
Date: Tue Nov 19 09:04:48 2013 +0000
Include pairs in this test
>---------------------------------------------------------------
18624e7ac6e391d90963500e1fecf0affc551dbf
tests/generics/GFunctor/GFunctor.hs | 1 +
tests/generics/GFunctor/GFunctor1.stdout | 2 +-
tests/generics/GFunctor/Main.hs | 5 ++++-
3 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/tests/generics/GFunctor/GFunctor.hs b/tests/generics/GFunctor/GFunctor.hs
index 0044339..8dd33e5 100644
--- a/tests/generics/GFunctor/GFunctor.hs
+++ b/tests/generics/GFunctor/GFunctor.hs
@@ -52,3 +52,4 @@ class GFunctor f where
-- Base types instances
instance GFunctor Maybe
instance GFunctor []
+instance GFunctor ((,) a)
diff --git a/tests/generics/GFunctor/GFunctor1.stdout b/tests/generics/GFunctor/GFunctor1.stdout
index 966a020..f1b9ac2 100644
--- a/tests/generics/GFunctor/GFunctor1.stdout
+++ b/tests/generics/GFunctor/GFunctor1.stdout
@@ -1 +1 @@
-(D0,D1 {d11 = 'q', d12 = D0},D1 {d11 = 3.14, d12 = D0})
+(Just 3,[1,2,3],(0,1),D0,D1 {d11 = 'q', d12 = D0},D1 {d11 = 3.14, d12 = D0})
diff --git a/tests/generics/GFunctor/Main.hs b/tests/generics/GFunctor/Main.hs
index 7d0a3df..e017d94 100644
--- a/tests/generics/GFunctor/Main.hs
+++ b/tests/generics/GFunctor/Main.hs
@@ -21,6 +21,9 @@ d2 = D1 (3,0.14) D0
instance GFunctor D
-- Tests
-main = print ( gmap undefined d0 :: D ()
+main = print ( gmap (+1) (Just 2)
+ , gmap (+1) [0,1,2]
+ , gmap (+1) (0,0)
+ , gmap undefined d0 :: D ()
, gmap (const 'q') d1
, gmap (\(a,b) -> a + b) d2 :: D Float)
More information about the ghc-commits
mailing list