Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement base type-level interpreter and subtyping #641

Merged
merged 20 commits into from
Feb 6, 2024

Conversation

CohenArthur
Copy link
Member

  • [wip]: Start working on type var interpreter. Bring over UnionType from FIR
  • [wip]: Go further with the typelevel interpreter
  • [wip] it compiles
  • [wip]: Improve errors and API
  • wip: Add proper handling of Kind::UnionType
  • [wip] almost there
  • [wip] it fucken works ~ ! ! ~
  • typecheck: Start adding TypeMap data structure
  • typecheck: Start making TypeCtx generic

@CohenArthur
Copy link
Member Author

CohenArthur commented Dec 23, 2023

  • Make Actual transform the old typectx to the new one properly

Once this is done we can probably merge this

  • Once the first phase of flattening is done, add more flattening within each type and garbage collect? which will make comparisons easier
  • Or should that be done as we build the list?

@CohenArthur CohenArthur force-pushed the data-structure-type-interpreter branch from 4dd3690 to b2005dd Compare January 16, 2024 11:45
@CohenArthur
Copy link
Member Author

CohenArthur commented Jan 19, 2024

So what we actually want is to have something like the following API:

fn insert_type(key: OriginIdx, ty: Type) -> TypeReference {}
fn insert(key: OriginIdx, tyref: TypeReference) {}

@CohenArthur
Copy link
Member Author

{
  to_id -> ref int,
  x -> ref int,
  y -> ref int,
  z -> ref int,
}

+

{ ref int -> int }

@CohenArthur CohenArthur force-pushed the data-structure-type-interpreter branch 2 times, most recently from 9f9961f to 8e12321 Compare February 6, 2024 12:58
@CohenArthur CohenArthur changed the title data structure type interpreter Implement base type-level interpreter and subtyping Feb 6, 2024
@CohenArthur CohenArthur marked this pull request as ready for review February 6, 2024 13:55
@CohenArthur CohenArthur force-pushed the data-structure-type-interpreter branch from 00f48dd to 0256bb0 Compare February 6, 2024 21:42
@CohenArthur CohenArthur merged commit dd8c724 into master Feb 6, 2024
9 checks passed
@CohenArthur CohenArthur deleted the data-structure-type-interpreter branch February 6, 2024 22:04
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant