Copyright | (C) 2012-2016, University of Twente |
---|---|

License | BSD2 (see the file LICENSE) |

Maintainer | Christiaan Baaij <christiaan.baaij@gmail.com> |

Safe Haskell | None |

Language | Haskell2010 |

Utility functions used by the normalisation transformations

- alreadyInlined :: TmName -> TmName -> NormalizeMonad (Maybe Int)
- addNewInline :: TmName -> TmName -> NormalizeMonad ()
- specializeNorm :: NormRewrite
- isClosed :: (Functor m, Fresh m) => HashMap TyConName TyCon -> Term -> m Bool
- isConstant :: Term -> Bool
- isRecursiveBndr :: TmName -> NormalizeSession Bool
- callGraph :: [TmName] -> HashMap TmName (Type, SrcSpan, Term) -> TmName -> [(TmName, [TmName])]
- mkRecursiveComponents :: [(TmName, [TmName])] -> [[TmName]]
- lambdaDropPrep :: HashMap TmName (Type, SrcSpan, Term) -> TmName -> HashMap TmName (Type, SrcSpan, Term)
- lambdaDrop :: HashMap TmName (Type, SrcSpan, Term) -> HashMap TmName [TmName] -> [TmName] -> (TmName, (Type, SrcSpan, Term))
- dominator :: HashMap TmName [TmName] -> [TmName] -> Gr TmName TmName
- blockSink :: HashMap TmName (Type, SrcSpan, Term) -> Gr TmName TmName -> LNode TmName -> (TmName, (Type, SrcSpan, Term))

# Documentation

:: TmName | Function we want to inline |

-> TmName | Function in which we want to perform the inlining |

-> NormalizeMonad (Maybe Int) |

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

:: TmName | Function we want to inline |

-> TmName | Function in which we want to perform the inlining |

-> NormalizeMonad () |

specializeNorm :: NormRewrite Source #

Specialize under the Normalization Monad

isClosed :: (Functor m, Fresh m) => HashMap TyConName TyCon -> Term -> m Bool Source #

Determine if a term is closed

isConstant :: Term -> Bool Source #

Determine if a term represents a constant

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

-> HashMap TmName (Type, SrcSpan, Term) | Global binders |

-> TmName | Root of the call graph |

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

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

mkRecursiveComponents Source #

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

lambdaDropPrep :: HashMap TmName (Type, SrcSpan, Term) -> TmName -> HashMap TmName (Type, SrcSpan, Term) Source #