curry.backends.generic.currylib.prelude module

Builds a custom icurry.IModule holding the built-in parts of the Prelude.

This is merged into the real module compiled from Prelude.curry to resolve the external declarations.

class curry.backends.generic.currylib.prelude.PreludeSpecification[source]

Bases: ModuleSpecification

FUNCTIONS = [('$##', 2, {}), ('$!', 2, {}), ('$!!', 2, {}), ('?', 2, {}), ('&', 2, {}), ('apply', 2, {}), ('bindIO', 2, {'all.flags': 16}), ('catch', 2, {'all.flags': 16}), ('cond', 2, {}), ('constrEq', 2, {}), ('divInt', 2, {}), ('ensureNotFree', 1, {}), ('eqChar', 2, {}), ('eqFloat', 2, {}), ('eqInt', 3, {}), ('failed', 0, {}), ('getChar', 0, {'all.flags': 16}), ('ltEqChar', 2, {}), ('ltEqFloat', 2, {}), ('ltEqInt', 2, {}), ('minusInt', 2, {}), ('modInt', 2, {}), ('negateFloat', 1, {}), ('nonstrictEq', 2, {}), ('plusInt', 2, {}), ('prim_acosFloat', 1, {}), ('prim_acoshFloat', 1, {}), ('prim_appendFile', 2, {'all.flags': 16}), ('prim_asinFloat', 1, {}), ('prim_asinhFloat', 1, {}), ('prim_atanFloat', 1, {}), ('prim_atanhFloat', 1, {}), ('prim_chr', 1, {}), ('prim_cosFloat', 1, {}), ('prim_coshFloat', 1, {}), ('prim_divFloat', 2, {}), ('prim_error', 1, {}), ('prim_expFloat', 1, {}), ('prim_intToFloat', 1, {}), ('prim_ioError', 1, {'all.flags': 16}), ('prim_logFloat', 1, {}), ('prim_minusFloat', 2, {}), ('prim_ord', 1, {}), ('prim_plusFloat', 2, {}), ('prim_putChar', 1, {'all.flags': 16}), ('prim_readCharLiteral', 1, {}), ('prim_readFile', 1, {'all.flags': 16}), ('prim_readFloatLiteral', 1, {}), ('prim_readNatLiteral', 1, {}), ('prim_readStringLiteral', 1, {}), ('prim_roundFloat', 1, {}), ('prim_showCharLiteral', 1, {}), ('prim_showFloatLiteral', 1, {}), ('prim_showIntLiteral', 1, {}), ('prim_showStringLiteral', 1, {}), ('prim_sinFloat', 1, {}), ('prim_sinhFloat', 1, {}), ('prim_sqrtFloat', 1, {}), ('prim_tanFloat', 1, {}), ('prim_tanhFloat', 1, {}), ('prim_timesFloat', 2, {}), ('prim_truncateFloat', 1, {}), ('prim_writeFile', 2, {'all.flags': 16}), ('quotInt', 2, {}), ('remInt', 2, {}), ('returnIO', 1, {'all.flags': 16}), ('seqIO', 2, {'all.flags': 16}), ('timesInt', 2, {}), ('failure', 2, {}), ('ifVar', 2, {}), ('letrec', 2, {}), ('prim_readFileContents', 2, {}), ('unifEqLinear', 2, {}), ('_biGenerator', 1, {}), ('_biString', 1, {})]
IMPORTS = []
NAME = 'Prelude'
TYPES = [('Bool', [('False', 0, {'all.flags': 4}), ('True', 0, {'all.flags': 4})]), ('Char', [('Char', 1, {'all.flags': 2})]), ('Float', [('Float', 1, {'all.flags': 3})]), ('Int', [('Int', 1, {'all.flags': 1})]), ('IO', [('IO', 1, {'all.flags': 7})]), ('(->)', [('->', 2, {})]), ('[]', [(':', 2, {'all.flags': 5}), ('[]', 0, {'all.flags': 5})]), ('()', [('()', 0, {'all.flags': 6})]), ('(,)', [('(,)', 2, {'all.flags': 6})]), ('(,,)', [('(,,)', 3, {'all.flags': 6})]), ('(,,,)', [('(,,,)', 4, {'all.flags': 6})]), ('(,,,,)', [('(,,,,)', 5, {'all.flags': 6})]), ('(,,,,,)', [('(,,,,,)', 6, {'all.flags': 6})]), ('(,,,,,,)', [('(,,,,,,)', 7, {'all.flags': 6})]), ('(,,,,,,,)', [('(,,,,,,,)', 8, {'all.flags': 6})]), ('(,,,,,,,,)', [('(,,,,,,,,)', 9, {'all.flags': 6})]), ('(,,,,,,,,,)', [('(,,,,,,,,,)', 10, {'all.flags': 6})]), ('(,,,,,,,,,,)', [('(,,,,,,,,,,)', 11, {'all.flags': 6})]), ('(,,,,,,,,,,,)', [('(,,,,,,,,,,,)', 12, {'all.flags': 6})]), ('(,,,,,,,,,,,,)', [('(,,,,,,,,,,,,)', 13, {'all.flags': 6})]), ('(,,,,,,,,,,,,,)', [('(,,,,,,,,,,,,,)', 14, {'all.flags': 6})])]
aliases()[source]

Returns prelude aliases. Simply for convenience.

exports()[source]

Returns the name of each symbol that must be copied to the Prelude. This is allowed to clobber symbols defined in Prelude.curry.