CurryInfo: cpm-3.3.0 / CPM.AbstractCurry.applyModuleRenames

definition:
 
applyModuleRenames :: [(String, String)] -> CurryProg -> CurryProg
applyModuleRenames names prog =
  updCProg maybeRename (map maybeRename) id id id id id id
           (updQNamesInCProg rnm prog)
 where
  maybeRename n = case lookup n names of
    Just n' -> n'
    Nothing -> n
  rnm mn@(mod, n) = case lookup mod names of
    Just mod' -> (mod', n)
    Nothing   -> mn
demand:
 no demanded arguments
deterministic:
 deterministic operation
documentation:
 
Renames all references to some modules in a Curry program.

@param mods - a map from old to new module names
@param prog - the program to modify
failfree:
 (_, _)
indeterministic:
 referentially transparent operation
infix:
 no fixity defined
iotype:
 {(_,_) |-> _}
name:
 applyModuleRenames
precedence:
 no precedence defined
result-values:
 _
signature:
 [(String, String)] -> AbstractCurry.Types.CurryProg
-> AbstractCurry.Types.CurryProg
solution-complete:
 operation might suspend on free variables
terminating:
 possibly non-terminating
totally-defined:
 possibly non-reducible on same data term