Transform FlatCurry function definitions into a form where all the right-hand sides contain Case and Or only at the top-level and all case expressions have a variable argument (i.e., all rules are overlapping inductively sequential). Furthermore, non-recursive Let bindings are replaced by auxiliary functions.
Author: Michael Hanus
Version: February 2023
liftNestedOrCase
:: (String,String) -> [FuncDecl] -> [FuncDecl]
Lift nested or/case expressions by replacing them by auxiliary functions. |
Lift nested or/case expressions by replacing them by auxiliary functions. The names of the new auxiliary functions are prefixed by a string and a number (starting with 0).
|