Skip to content

Add support for re-exports in codegen. #5

Description

@natefaubion

Currently we do not emit re-exports in codegen (purs does). This is because nothing is really private. Through inlining, we need to be able to refer to top-level bindings that were not explicitly exported. This conflicts with the naming scheme. used in the compiler's CoreFn CSE pass.

An example from Aff is try. It re-exports try, but the CSE pass also creates a top-level binding named try, which has a dictionary applied. We can't export both under the same, and this leads to a duplicate export error.

In order to fix this, we need to rename private top-level bindings during codegen, probably with a $priv suffix.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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