From ed2811a42e70bf1e725d78854b193f46aee9aaf0 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft" Date: Fri, 24 Nov 2006 16:45:05 +0000 Subject: [PATCH] Add comments about argument order to the definitions of gmapQ and constrFields --- Data/Generics/Basics.hs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Data/Generics/Basics.hs b/Data/Generics/Basics.hs index 84e5838..e9c59f6 100644 --- a/Data/Generics/Basics.hs +++ b/Data/Generics/Basics.hs @@ -291,6 +291,8 @@ class Typeable a => Data a where -- | A generic query that processes the immediate subterms and returns a list + -- of results. The list is given in the same order as originally specified + -- in the declaratoin of the data constructors. gmapQ :: (forall a. Data a => a -> u) -> a -> [u] gmapQ f = gmapQr (:) [] f @@ -569,7 +571,9 @@ dataTypeConstrs dt = case datarep dt of _ -> error "dataTypeConstrs" --- | Gets the field labels of a constructor +-- | Gets the field labels of a constructor. The list of labels +-- is returned in the same order as they were given in the original +-- constructor declaration. constrFields :: Constr -> [String] constrFields = confields -- 1.7.10.4