From: simonpj@microsoft Date: Fri, 24 Nov 2006 16:45:05 +0000 (+0000) Subject: Add comments about argument order to the definitions of gmapQ and constrFields X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=ed2811a42e70bf1e725d78854b193f46aee9aaf0;p=haskell-directory.git Add comments about argument order to the definitions of gmapQ and constrFields --- 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