Safe Haskell | None |
---|

Utility functions used by the normalisation transformations

- alreadyInlined :: TmName -> NormalizeMonad Bool
- commitNewInlined :: NormRewrite
- isClosed :: (Functor m, Fresh m) => Term -> m Bool
- isConstant :: Term -> Bool
- getWrappedF :: (Fresh m, Functor m) => Term -> m (Maybe Term)
- callGraph :: [TmName] -> HashMap TmName Term -> TmName -> [(TmName, [TmName])]
- recursiveComponents :: [(TmName, [TmName])] -> [[TmName]]

# Documentation

alreadyInlined :: TmName -> NormalizeMonad BoolSource

Determine if a function is already inlined in the context of the `NetlistMonad`

commitNewInlined :: NormRewriteSource

Move the names of inlined functions collected during a traversal into the permanent inlined function cache

isConstant :: Term -> BoolSource

Determine if a term represents a constant

getWrappedF :: (Fresh m, Functor m) => Term -> m (Maybe Term)Source

Get the "Wrapped" function out of a normalized Term. Returns `Nothing`

if
the normalized term is not actually a wrapper.

:: [TmName] | List of functions that should not be inspected |

-> HashMap TmName Term | Global binders |

-> TmName | Root of the call graph |

-> [(TmName, [TmName])] |

Create a call graph for a set of global binders, given a root

Determine the sets of recursive components given the edges of a callgraph