rewire-frontend-2.8: A Haskell-to-Verilog/VHDL compiler, front end (GHC driver, Eidos, Synolon)
Safe HaskellSafe
LanguageHaskell2010

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