From 8ea69e238a72db57873ad7b955075babebae9639 Mon Sep 17 00:00:00 2001 From: stolz Date: Tue, 20 May 2003 09:44:08 +0000 Subject: [PATCH] [project @ 2003-05-20 09:44:08 by stolz] Add missing 'Constr' for conOf/consOf in examples --- Data/Generics.hs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/Data/Generics.hs b/Data/Generics.hs index 9afb53c..4be13a7 100644 --- a/Data/Generics.hs +++ b/Data/Generics.hs @@ -477,9 +477,9 @@ instance Data a => Data [a] where gmapQ f (Wrap w) = [f w] gmapM f (Box a) = f a >>= return . Box gmapM f (Wrap w) = f w >>= return . Wrap - conOf (Box _) = "Box" - conOf (Wrap _) = "Wrap" - consOf _ = ["Box","Wrap"] + conOf (Box _) = Constr "Box" + conOf (Wrap _) = Constr "Wrap" + consOf _ = map Constr ["Box","Wrap"] gunfold f z e "Box" = f (z Box) gunfold f z e "Wrap" = f (z Wrap) gunfold _ _ e _ = e @@ -490,8 +490,8 @@ instance Data a => Data [a] where instance Data GenericT' where gmapT f (T' g) = (T' (f g)) - conOf _ = "T'" - consOf _ = ["T'"] + conOf _ = Constr "T'" + consOf _ = map Constr ["T'"] -- test code only @@ -507,8 +507,8 @@ instance Typeable (a -> b) => Data (a -> b) where gmapT f = id gmapQ f = const [] gmapM f = return - conOf _ = "->" - consOf _ = ["->"] + conOf _ = Constr "->" + consOf _ = [Constr "->"] -} -- 1.7.10.4