Skip to content

Language AST should only be parameterized by the parts that change. #42

Open

Description

@akuhlens

For instance

(struct (Arity Args Ret) Fn ([arity : Arity][args : Args][ret : Ret]))

Should be instantiated up to the expression parameterization, and should have unneeded fields removed extra fields can be added for some passes by sub typing on structs. This will likely lead
to longer form definitions at the cost of less verbose types and code elsewhere.

(struct (Expr) Fn ([args : (Listof Expr)][ret : Expr])

Here we make the args list always be an args list, make the return type always match the parameter type, and remove the arity since it can be derived by taking the length of the argument list.

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