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

DDC.Core.Flow.Transform.Rates.CnfFromExp

Synopsis

# Documentation

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