This library provides transformation and update operations
on AbstractCurry programs.
Since the transformations are defined recursively on structured types,
they are useful to construct specific transformations on AbstractCurry
programs.
In particular, this library contains the transformation
renameCurryModule
            to rename an AbstractCurry module.
          
Author: Michael Hanus
Version: April 2016
| trCProg
                  :: (String -> [String] -> [CTypeDecl] -> [CFuncDecl] -> [COpDecl] -> a) -> CurryProg -> aTransforms an AbstractCurry program. | 
| updCProg
                  :: (String -> String) -> ([String] -> [String]) -> ([CTypeDecl] -> [CTypeDecl]) -> ([CFuncDecl] -> [CFuncDecl]) -> ([COpDecl] -> [COpDecl]) -> CurryProg -> CurryProgUpdates an AbstractCurry program. | 
| updCProgName
                  :: (String -> String) -> CurryProg -> CurryProgUpdates the name of a Curry program. | 
| trCTypeDecl
                  :: ((String,String) -> CVisibility -> [(Int,String)] -> [CConsDecl] -> a) -> ((String,String) -> CVisibility -> [(Int,String)] -> CTypeExpr -> a) -> ((String,String) -> CVisibility -> [(Int,String)] -> CConsDecl -> a) -> CTypeDecl -> aTransforms a type declaration. | 
| updCTypeDecl
                  :: ((String,String) -> (String,String)) -> (CVisibility -> CVisibility) -> ([(Int,String)] -> [(Int,String)]) -> ([CConsDecl] -> [CConsDecl]) -> (CTypeExpr -> CTypeExpr) -> (CConsDecl -> CConsDecl) -> CTypeDecl -> CTypeDeclupdate type declaration | 
| updCTypeDeclName
                  :: ((String,String) -> (String,String)) -> CTypeDecl -> CTypeDeclUpdates the name of a type declaration. | 
| trCConsDecl
                  :: ((String,String) -> CVisibility -> [CTypeExpr] -> a) -> ((String,String) -> CVisibility -> [CFieldDecl] -> a) -> CConsDecl -> aTransforms a constructor declaration. | 
| updCConsDecl
                  :: ((String,String) -> (String,String)) -> (CVisibility -> CVisibility) -> ([CTypeExpr] -> [CTypeExpr]) -> ([CFieldDecl] -> [CFieldDecl]) -> CConsDecl -> CConsDeclUpdates a constructor declaration. | 
| updCConsDeclName
                  :: ((String,String) -> (String,String)) -> CConsDecl -> CConsDeclUpdates the name of a constructor declaration. | 
| trCFieldDecl
                  :: ((String,String) -> CVisibility -> CTypeExpr -> a) -> CFieldDecl -> aTransforms a constructor declaration. | 
| updCFieldDecl
                  :: ((String,String) -> (String,String)) -> (CVisibility -> CVisibility) -> (CTypeExpr -> CTypeExpr) -> CFieldDecl -> CFieldDeclupdate constructor declaration | 
| updCFieldDeclName
                  :: ((String,String) -> (String,String)) -> CFieldDecl -> CFieldDeclUpdates the name of a constructor declaration. | 
| trCTypeExpr
                  :: ((Int,String) -> a) -> ((String,String) -> [a] -> a) -> (a -> a -> a) -> CTypeExpr -> aTransforms a type expression. | 
| updTConsApp
                  :: ((String,String) -> [CTypeExpr] -> CTypeExpr) -> CTypeExpr -> CTypeExprUpdates all type constructor applications in a type expression. | 
| trCOpDecl
                  :: ((String,String) -> CFixity -> Int -> a) -> COpDecl -> aTransforms an operator declaration. | 
| updCOpDecl
                  :: ((String,String) -> (String,String)) -> (CFixity -> CFixity) -> (Int -> Int) -> COpDecl -> COpDeclUpdates an operator declaration. | 
| updCOpName
                  :: ((String,String) -> (String,String)) -> COpDecl -> COpDeclUpdates the name of an operator declaration. | 
| trCFuncDecl
                  :: (String -> (String,String) -> Int -> CVisibility -> CTypeExpr -> [CRule] -> a) -> CFuncDecl -> aTransforms a function declaration | 
| updCFuncDecl
                  :: (String -> String) -> ((String,String) -> (String,String)) -> (Int -> Int) -> (CVisibility -> CVisibility) -> (CTypeExpr -> CTypeExpr) -> ([CRule] -> [CRule]) -> CFuncDecl -> CFuncDeclUpdates a function declaration. | 
| trCRule
                  :: ([CPattern] -> CRhs -> a) -> CRule -> aTransform a rule. | 
| updCRule
                  :: ([CPattern] -> [CPattern]) -> (CRhs -> CRhs) -> CRule -> CRuleUpdate a rule. | 
| trCRhs
                  :: (CExpr -> [CLocalDecl] -> a) -> ([(CExpr,CExpr)] -> [CLocalDecl] -> a) -> CRhs -> aTransforms a right-hand side (of a rule or case expression). | 
| updCRhs
                  :: (CExpr -> CExpr) -> ([(CExpr,CExpr)] -> [(CExpr,CExpr)]) -> ([CLocalDecl] -> [CLocalDecl]) -> CRhs -> CRhsUpdates right-hand side. | 
| trCLocalDecl
                  :: (CFuncDecl -> a) -> (CPattern -> CRhs -> a) -> ([(Int,String)] -> a) -> CLocalDecl -> aTransforms a local declaration. | 
| updCLocalDecl
                  :: (CFuncDecl -> CFuncDecl) -> (CPattern -> CPattern) -> (CRhs -> CRhs) -> ([(Int,String)] -> [(Int,String)]) -> CLocalDecl -> CLocalDeclUpdates a local declaration. | 
| trCPattern
                  :: ((Int,String) -> a) -> (CLiteral -> a) -> ((String,String) -> [a] -> a) -> ((Int,String) -> a -> a) -> ((String,String) -> [a] -> a) -> ((String,String) -> [((String,String),a)] -> a) -> CPattern -> aTransforms a pattern. | 
| updCPattern
                  :: ((Int,String) -> (Int,String)) -> (CLiteral -> CLiteral) -> ((String,String) -> (String,String)) -> CPattern -> CPatternUpdates a pattern. | 
| trExpr
                  :: ((Int,String) -> a) -> (CLiteral -> a) -> ((String,String) -> a) -> (a -> a -> a) -> ([CPattern] -> a -> a) -> ([CLocalDecl] -> a -> a) -> ([CStatement] -> a) -> (a -> [CStatement] -> a) -> (CCaseType -> a -> [(CPattern,CRhs)] -> a) -> (a -> CTypeExpr -> a) -> ((String,String) -> [((String,String),a)] -> a) -> (a -> [((String,String),a)] -> a) -> CExpr -> aTransforms an expression. | 
| trCStatement
                  :: (CExpr -> a) -> (CPattern -> CExpr -> a) -> ([CLocalDecl] -> a) -> CStatement -> aTransforms a statement (occuring in do expressions or list comprehensions). | 
| updCStatement
                  :: (CExpr -> CExpr) -> (CPattern -> CPattern) -> (CLocalDecl -> CLocalDecl) -> CStatement -> CStatementUpdates a statement (occuring in do expressions or list comprehensions). | 
| renameCurryModule
                  :: String -> CurryProg -> CurryProgRenames a Curry module, i.e., updates the module name and all qualified names in a program. | 
| updQNamesInCProg
                  :: ((String,String) -> (String,String)) -> CurryProg -> CurryProgUpdates all qualified names in a Curry program. | 
| updQNamesInCTypeDecl
                  :: ((String,String) -> (String,String)) -> CTypeDecl -> CTypeDeclUpdates all qualified names in a type declaration. | 
| updQNamesInCConsDecl
                  :: ((String,String) -> (String,String)) -> CConsDecl -> CConsDeclUpdates all qualified names in a constructor declaration. | 
| updQNamesInCFieldDecl
                  :: ((String,String) -> (String,String)) -> CFieldDecl -> CFieldDeclUpdates all qualified names in a record field declaration. | 
| updQNamesInCTypeExpr
                  :: ((String,String) -> (String,String)) -> CTypeExpr -> CTypeExprUpdates all qualified names in a type expression. | 
| updQNamesInCFuncDecl
                  :: ((String,String) -> (String,String)) -> CFuncDecl -> CFuncDeclUpdates all qualified names in a function declaration. | 
| updQNamesInCRule
                  :: ((String,String) -> (String,String)) -> CRule -> CRuleUpdates all qualified names in a function declaration. | 
| updQNamesInCRhs
                  :: ((String,String) -> (String,String)) -> CRhs -> CRhsUpdates all qualified names in a function declaration. | 
| updQNamesInCLocalDecl
                  :: ((String,String) -> (String,String)) -> CLocalDecl -> CLocalDeclUpdates all qualified names in a function declaration. | 
| updQNamesInCPattern
                  :: ((String,String) -> (String,String)) -> CPattern -> CPatternUpdates all qualified names in a function declaration. | 
| updQNamesInCStatement
                  :: ((String,String) -> (String,String)) -> CStatement -> CStatementUpdates all qualified names in a statement. | 
| updQNamesInCExpr
                  :: ((String,String) -> (String,String)) -> CExpr -> CExpr | 
| typesOfCurryProg
                  :: CurryProg -> [(String,String)]Extracts all type names occurring in a program. | 
| typesOfCTypeDecl
                  :: CTypeDecl -> [(String,String)]Extracts all type names occurring in a type declaration. | 
| typesOfConsDecl
                  :: CConsDecl -> [(String,String)] | 
| typesOfFieldDecl
                  :: CFieldDecl -> [(String,String)] | 
| typesOfTypeExpr
                  :: CTypeExpr -> [(String,String)] | 
| typesOfCFuncDecl
                  :: CFuncDecl -> [(String,String)] | 
| funcsOfCurryProg
                  :: CurryProg -> [(String,String)]Extracts all function (and constructor) names occurring in a program. | 
| funcsOfCTypeDecl
                  :: CTypeDecl -> [(String,String)] | 
| funcsOfConsDecl
                  :: CConsDecl -> [(String,String)] | 
| funcsOfFieldDecl
                  :: CFieldDecl -> [(String,String)] | 
| funcsOfCFuncDecl
                  :: CFuncDecl -> [(String,String)]Extracts all function (and constructor) names occurring in a function declaration. | 
| funcsOfCRule
                  :: CRule -> [(String,String)] | 
| funcsOfCRhs
                  :: CRhs -> [(String,String)] | 
| funcsOfLDecl
                  :: CLocalDecl -> [(String,String)] | 
| funcsOfExpr
                  :: CExpr -> [(String,String)] | 
| funcsOfStat
                  :: CStatement -> [(String,String)] | 
This type synonym is useful to denote the type of an update, where the first argument is the type of values which are updated by the local update (which acts on types described by the second argument).
              Type synonym: Update a b = (b -> b) -> a -> a
            
| 
                       Transforms an AbstractCurry program. | 
| 
                       Updates an AbstractCurry program. | 
| 
                       Updates the name of a Curry program. | 
| 
                       Transforms a type declaration. | 
| 
                       update type declaration | 
| 
                       Updates the name of a type declaration. | 
| 
                       Transforms a constructor declaration. | 
| 
                       Updates a constructor declaration. | 
| 
                       Updates the name of a constructor declaration. | 
| 
                       Transforms a constructor declaration. | 
| 
                       update constructor declaration | 
| 
                       Updates the name of a constructor declaration. | 
| 
                       Transforms a type expression. | 
| 
                       Updates all type constructor applications in a type expression. | 
| 
                       Transforms an operator declaration. | 
| 
                       Updates an operator declaration. | 
| 
                       Updates the name of an operator declaration. | 
| 
                       Transforms a function declaration | 
| 
                       Updates a function declaration. | 
| 
                       Transforms a right-hand side (of a rule or case expression). | 
| 
                       Updates right-hand side. | 
| 
                       Transforms a local declaration. | 
| 
                       Updates a local declaration. | 
| 
                       Transforms a pattern. | 
| 
                       Updates a pattern. | 
| 
                       Transforms an expression. | 
| 
                       Transforms a statement (occuring in do expressions or list comprehensions). | 
| 
                       Updates a statement (occuring in do expressions or list comprehensions). | 
| 
                       Renames a Curry module, i.e., updates the module name and all qualified names in a program. | 
| 
                       Updates all qualified names in a Curry program. | 
| 
                       Updates all qualified names in a type declaration. | 
| 
                       Updates all qualified names in a constructor declaration. | 
| 
                       Updates all qualified names in a record field declaration. | 
| 
                       Updates all qualified names in a type expression. | 
| 
                       Updates all qualified names in a function declaration. | 
| 
                       Updates all qualified names in a function declaration. | 
| 
                       Updates all qualified names in a function declaration. | 
| 
                       Updates all qualified names in a function declaration. | 
| 
                       Updates all qualified names in a function declaration. | 
| 
                       Updates all qualified names in a statement. | 
| 
                       | 
| 
                       Extracts all type names occurring in a program. | 
| 
                       Extracts all type names occurring in a type declaration. | 
| 
                       | 
| 
                       | 
| 
                       | 
| 
                       | 
| 
                       Extracts all function (and constructor) names occurring in a program. | 
| 
                       | 
| 
                       | 
| 
                       | 
| 
                       Extracts all function (and constructor) names occurring in a function declaration. | 
| 
                       | 
| 
                       | 
| 
                       | 
| 
                       | 
| 
                       |