| Safe Haskell | Safe |
|---|---|
| Language | Haskell2010 |
ReWire.Eidos.Inline
Description
The INLINE-attribute inliner (the retired Crust pass's successor):
every occurrence of an INLINE-annotated definition is replaced by its
body (as a lambda telescope over its parameters — application sites
become beta redexes for the downstream partial evaluator), with every
inserted copy refreshed through the audited clone primitive. Runs on
monomorphic programs (after specialize): inlining
under a type-argument spine would strand the arguments on a
non-variable head.
INLINE definitions referencing other INLINE definitions are expanded to closed form first (depth-first, memoized); a reference cycle among them is rejected with the retired pass's diagnostic. The definitions themselves are kept (dead ones fall to the downstream purge).
Documentation
inlineAnnotated :: MonadError AstError m => Program -> m Program Source #