Copyright | (C) 2015-2016 University of Twente 2021-2022 QBayLogic B.V. 2022 LumiGuide Fietsdetectie B.V. |
---|---|

License | BSD2 (see the file LICENSE) |

Maintainer | QBayLogic B.V. <devops@qbaylogic.com> |

Safe Haskell | None |

Language | Haskell2010 |

The `disjointExpressionConsolidation`

transformation lifts applications of
global binders out of alternatives of case-statements.

e.g. It converts:

case x of A -> f 3 y B -> f x x C -> h x

into:

let f_arg0 = case x of {A -> 3; B -> x} f_arg1 = case x of {A -> y; B -> x} f_out = f f_arg0 f_arg1 in case x of A -> f_out B -> f_out C -> h x

## Synopsis

# Documentation

disjointExpressionConsolidation :: HasCallStack => NormRewrite Source #

This transformation lifts applications of global binders out of alternatives of case-statements.

e.g. It converts:

case x of A -> f 3 y B -> f x x C -> h x

into:

let f_arg0 = case x of {A -> 3; B -> x} f_arg1 = case x of {A -> y; B -> x} f_out = f f_arg0 f_arg1 in case x of A -> f_out B -> f_out C -> h x