curry.toolchain.flat2icurry.compiler module
The name-to-index maps and the ICurry generation, the last two passes. They
follow ICurry.Compiler and the map functions of ICurry.Options of
the Curry package icurry.
Each ICurry name is a triple (module, name, index). A constructor’s
index is its position in its data type. A data type’s index is its position
in the type list of its module, type synonyms counted. The public functions
of a module are numbered from 0 in order of appearance. The private ones,
the lifted functions included, continue the numbering in the order of the
lifted program.
- class curry.toolchain.flat2icurry.compiler.NameMaps[source]
Bases:
objectMaps qualified names to their ICurry indices.
- curry.toolchain.flat2icurry.compiler.demand_of(rule, icurry_compat=True)[source]
The argument a rule demands: the one its root case scrutinizes. icurry 3.1.0 does not look through a type annotation around the case. Without
icurry_compatthe annotation is removed first.
- curry.toolchain.flat2icurry.compiler.flat2icurry(maps, prog, icurry_compat=True)[source]
Translates a completed and lifted FlatCurry program to ICurry.
icurry_compatkeeps the output of icurry 3.1.0 for a type annotation at the root of a rule. Seeto_iblock().