Skip to content

Separate Ast Types from real Type #152

Open
@Champii

Description

@Champii

We need a way to represent the types as written in the code, and another more concrete representation for the constaint/typechecking/generation phases

This will stop having unresolved Trait Foo for types we don't know of, early in the compilation process.

It will also remove the need to keep struct names globally in the parser for the same reason.

We could have a generic-purpose struct Type(String) that would be interpreted later on.

  • What about user-defined primitive types ? In Rust, the 'builtin' types (i64, str, usize, ...) are not builtin, but rather defined in the core lib via various macros. This is an interesting approach that we should lookout

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions