ddc-core-flow- Disciplined Disciple Compiler data flow compiler.

Safe HaskellSafe




cnfOfExp :: ExpF -> Either ConversionError (Program Name Name) Source #

Convert a given expression function to CNF. For this to succeed, the function must: - be in A-normal form, *except* worker functions should also be inlined - all bindings are named, not de Bruijn indices - names must be unique - no recursive bindings - no letregions

If it succeeds, it should be true that >>> expOfCnf . right . cnfOfExp = id at least semantically, if not syntactically

takeXLamFlags_safe :: Exp a n -> ([(Bool, Bind n)], Exp a n) Source #

Peel the lambdas off, or leave it alone if there are none