Safe Haskell | None |
---|---|
Language | Haskell98 |
Documentation
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 letregion
s
If it succeeds, it should be true that >>> expOfCnf . right . cnfOfExp = id at least semantically, if not syntactically