Changed the replaceNames function so that it doesn't use everywhere
This commit is contained in:
parent
ae49d236d6
commit
147d799563
|
@ -82,11 +82,12 @@ freeNamesIn = doGeneric
|
|||
|
||||
-- | Replace names.
|
||||
replaceNames :: Data t => [(A.Name, A.Name)] -> t -> t
|
||||
replaceNames map p = everywhere (mkT doName
|
||||
`extT` (id :: String -> String)
|
||||
`extT` (id :: Meta -> Meta)
|
||||
) p
|
||||
replaceNames map = doGeneric `extT` doName
|
||||
where
|
||||
doGeneric :: Data t => t -> t
|
||||
doGeneric = (gmapT (replaceNames map))
|
||||
`extT` (id :: String -> String)
|
||||
`extT` (id :: Meta -> Meta)
|
||||
smap = [(A.nameName f, t) | (f, t) <- map]
|
||||
|
||||
doName :: A.Name -> A.Name
|
||||
|
|
Loading…
Reference in New Issue
Block a user