Skip to content

Notes on cmx loading and saving in Lambda_to_flambda #558

Open
@lthls

Description

@lthls
  • Basic work: add a third kind of cmx files to cmx_format (in addition to the Closure and Flambda ones), save them in classic mode, and load them during Lambda_to_flambda in classic mode. This also means some saving and restoring of table entries, and dealing correctly with packs; the simplest way would make the Flambda_cmx_format.t type parametric, with one field containing either the approximations for Lambda_to_flambda or the full information from simplify. This introduces one extra indirection, but otherwise should allow us to reuse all of the tricky parts of Flambda_cmx_format. Overall, not a great deal of code to patch but without prior knowledge about which code needs to be used this could take several days at least.
  • One way compatibility: this means a function creating typing environments from approximations. This should not be too hard, one or two days for someone with a good knowledge of the type-related code, perhaps up to a week for someone less familiar with that part of the code.
  • Two way compatibility: generate approximations from typing environments. This could be done either on import, or systematically on export (to reduce the cost of loading in classic mode). This requires a deeper understanding of the types, but assuming that no unexpected problems show up it could be done in a week or so for someone already familiar with the code.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions