Commit 79034762 authored by jpm@cs.ox.ac.uk's avatar jpm@cs.ox.ac.uk

Include pairs in this test

parent e43a4124
......@@ -52,3 +52,4 @@ class GFunctor f where
-- Base types instances
instance GFunctor Maybe
instance GFunctor []
instance GFunctor ((,) a)
(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})
......@@ -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)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment