summaryrefslogtreecommitdiff
path: root/libraries/base/Data/Data.hs
diff options
context:
space:
mode:
authorHerbert Valerio Riedel <hvr@gnu.org>2014-09-24 23:42:55 +0200
committerHerbert Valerio Riedel <hvr@gnu.org>2014-09-24 23:42:55 +0200
commit805ee118b823f271dfd8036d35b15eb3454a95ad (patch)
tree23a46454f15fe76789ed80b88f1a7cf723107047 /libraries/base/Data/Data.hs
parent4b648be19c75e6c6a8e6f9f93fa12c7a4176f0ae (diff)
downloadhaskell-805ee118b823f271dfd8036d35b15eb3454a95ad.tar.gz
`M-x delete-trailing-whitespace` & `M-x untabify`
...several modules in `base` recently touched by me
Diffstat (limited to 'libraries/base/Data/Data.hs')
-rw-r--r--libraries/base/Data/Data.hs18
1 files changed, 9 insertions, 9 deletions
diff --git a/libraries/base/Data/Data.hs b/libraries/base/Data/Data.hs
index c2ce58dd6a..4aa785b3b8 100644
--- a/libraries/base/Data/Data.hs
+++ b/libraries/base/Data/Data.hs
@@ -41,7 +41,7 @@ module Data.Data (
dataTypeOf,
dataCast1, -- mediate types and unary type constructors
dataCast2, -- mediate types and binary type constructors
- -- Generic maps defined in terms of gfoldl
+ -- Generic maps defined in terms of gfoldl
gmapT,
gmapQ,
gmapQl,
@@ -351,10 +351,10 @@ class Typeable a => Data a where
-- injection and projection using 'return' and '>>='.
gmapM :: forall m. Monad m => (forall d. Data d => d -> m d) -> a -> m a
- -- Use immediately the monad datatype constructor
+ -- Use immediately the monad datatype constructor
-- to instantiate the type constructor c in the type of gfoldl,
-- so injection and projection is done by return and >>=.
- --
+ --
gmapM f = gfoldl k return
where
k :: Data d => m (d -> b) -> d -> m b
@@ -391,8 +391,8 @@ this end, we couple the monadic computation with a Boolean.
{-
-We use the same pairing trick as for gmapMp,
-i.e., we use an extra Bool component to keep track of the
+We use the same pairing trick as for gmapMp,
+i.e., we use an extra Bool component to keep track of the
fact whether an immediate subterm was processed successfully.
However, we cut of mapping over subterms once a first subterm
was transformed successfully.
@@ -455,7 +455,7 @@ fromConstrB f = unID . gunfold k z
where
k :: forall b r. Data b => ID (b -> r) -> ID r
k c = ID (unID c f)
-
+
z :: forall r. r -> ID r
z = ID
@@ -625,7 +625,7 @@ dataTypeConstrs dt = case datarep dt of
-- | Gets the field labels of a constructor. The list of labels
--- is returned in the same order as they were given in the original
+-- is returned in the same order as they were given in the original
-- constructor declaration.
constrFields :: Constr -> [String]
constrFields = confields
@@ -640,7 +640,7 @@ constrFixity = confixity
------------------------------------------------------------------------------
--
-- From strings to constr's and vice versa: all data types
---
+--
------------------------------------------------------------------------------
@@ -1319,7 +1319,7 @@ instance (Data a, Typeable a) => Data (ForeignPtr a) where
dataCast1 x = gcast1 x
------------------------------------------------------------------------------
--- The Data instance for Array preserves data abstraction at the cost of
+-- The Data instance for Array preserves data abstraction at the cost of
-- inefficiency. We omit reflection services for the sake of data abstraction.
instance (Typeable a, Data a, Data b, Ix a) => Data (Array a b)
where