This module contains operations to eliminate definitions and uses
of newtype
in a FlatCurry program.
If there is a declaration of the form
newtype NTYPE a1...an = NTCONS te
in a Curry program, the following transformations are preformed:
{a1 |-> t1,..., an |-> tn}(te)
except for occurrences in instance definitions, i.e., operations
named by _inst#...
.
(Prelude.id)
.
{y |-> x}(e)
.
Author: Michael Hanus
Version: March 2021
elimNewtypeInProg
:: Prog -> IO Prog
Eliminates all newtype
definitions/uses in a FlatCurry program.
|
elimNewtype
:: [Prog] -> Prog -> Prog
Eliminates all newtype
definitions/uses in a FlatCurry program.
|
Eliminates all |
Eliminates all |