projects
/
haskell-directory.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[project @ 2004-02-26 18:06:51 by ralf]
[haskell-directory.git]
/
Data
/
Generics
/
Aliases.hs
diff --git
a/Data/Generics/Aliases.hs
b/Data/Generics/Aliases.hs
index
3c03f56
..
3c66298
100644
(file)
--- a/
Data/Generics/Aliases.hs
+++ b/
Data/Generics/Aliases.hs
@@
-336,6
+336,15
@@
gunfoldR c f = gmapM (const f) $ fromConstr c
------------------------------------------------------------------------------
------------------------------------------------------------------------------
+
+-- | Flexible type extension
+ext1 :: (Data a, Typeable1 t)
+ => c a
+ -> (forall a. Data a => c (t a))
+ -> c a
+ext1 def ext = maybe def id (cast0to1 ext)
+
+
-- | Type extension of transformations for unary type constructors
ext1T :: (Data d, Typeable1 t)
=> (forall d. Data d => d -> d)
-- | Type extension of transformations for unary type constructors
ext1T :: (Data d, Typeable1 t)
=> (forall d. Data d => d -> d)