yhccore-0.9.1: Yhc's Internal Core language.

Yhc.Core.RecursiveLet

Synopsis

Documentation

isCoreLetRec :: CoreExpr -> BoolSource

Is a CoreLet recursive, i.e. do any of the introduced variables (LHS of bind) also show up in the RHS of bind.

Returns False if the expression is not a CoreLet.

removeRecursiveLet :: Core -> CoreSource

Remove recursive lets

Let's are rearranged so a variable is not used in the defining block

reduceRecursiveLet :: Core -> CoreSource

Reduce the number of recursive lets, but splitting lets which have recursive bindings, but can be linearised