CSPM-Frontend-0.12.1.0: A CSP-M parser compatible with FDR-2.91

Copyright(c) Fontaine 2008 - 2011
LicenseBSD3
MaintainerFontaine@cs.uni-duesseldorf.de
Stabilityexperimental
PortabilityGHC-only
Safe HaskellNone
LanguageHaskell2010

Language.CSPM.AstUtils

Description

Some utility functions for converting the AST

Synopsis

Documentation

removeSourceLocations :: Data a => a -> a Source #

removeSourceLocations sets all locationsInfos to NoLocation

removeParens :: Data a => a -> a Source #

removeParens removes all occurences of of Parens, i.e. explicit parentheses from the AST

removeModuleAsserts :: Module a -> Module a Source #

Remove assert declarations from a module.

unUniqueIdent :: Data a => a -> a Source #

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 -> FreeNames Source #

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 -> a Source #

Set all NodeIds to zero.