Portability | GHC-only |
---|---|
Stability | experimental |
Maintainer | Fontaine@cs.uni-duesseldorf.de |
Safe Haskell | Safe-Infered |
Some utility functions for converting the AST
- removeSourceLocations :: Data a => a -> a
- removeParens :: Data a => a -> a
- removeModuleAsserts :: Module a -> Module a
- unUniqueIdent :: Data a => a -> a
- computeFreeNames :: Data a => a -> FreeNames
- getModuleAsserts :: Module a -> [LAssertDecl]
- setNodeIdsZero :: Data a => a -> a
Documentation
removeSourceLocations :: Data a => a -> aSource
removeSourceLocations
sets all locationsInfos to NoLocation
removeParens :: Data a => a -> aSource
removeParens
removes all occurences of of Parens,
i.e. explicit parentheses from the AST
removeModuleAsserts :: Module a -> Module aSource
Remove assert declarations from a module.
unUniqueIdent :: Data a => a -> aSource
unUniqueIdent replaces the all UIdent with the Ident of the the new name, thus forgetting additional information like the bindingside, etc. Usefull to get a smaller AST.
computeFreeNames :: Data a => a -> FreeNamesSource
Compute the FreeNames of an Expression. This function does only work after renaming has been done. This implementation is inefficient.
getModuleAsserts :: Module a -> [LAssertDecl]Source
Get the assert declarations of a module.
setNodeIdsZero :: Data a => a -> aSource
Set all NodeIds to zero.