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

Zilch v1 #20

Open
2 of 10 tasks
Mesabloo opened this issue Aug 26, 2022 · 0 comments
Open
2 of 10 tasks

Zilch v1 #20

Mesabloo opened this issue Aug 26, 2022 · 0 comments
Labels
kind: discussion Discussing about something, waiting for opinions
Milestone

Comments

@Mesabloo
Copy link
Member

Mesabloo commented Aug 26, 2022

This is the story of the first version, currently being developed in the basics-dev branch.

Initially, I wanted to do every in small batches (see #7, #9, #15, #16, #17, #18, #19).
Things ended up another way.

Currently, in the development branch, there is an implementation for the following features:

  • QTT
  • Modules (with a very limited record-like type)
  • Basic integers (with widht-varying types) and booleans
  • Some control structures such as if-then-else
  • Dependent tuples (additive and multiplicative) alongside their eliminators
  • First-order functions and types
  • Forward declarations, mutual definitions and let/rec bindings
  • Term inference and implicit parameters

This has grown way more than it should have been.
However, type inference rules are for the most part already included in the source code. This means that we should be able to simply "copy/paste" them within the specification document.

The current implementation comprises:

  • A fully fledged lexer/parser/desugarer combo with early module resolution
  • A NbE (Normalisation by Evaluation) typechecker/elaborator with module support

Some steps/features are still missing as of today:

  • Metavariables are put in the global scope. We will want to inline them at their (unique) callsites
  • Terms may not be monomorphic
  • Closures lie everywhere and must be converted
  • N⋆ compilation
  • Missing enumerations, records (syntactic) and pattern matching with automatic instance record resolution
    See Type classes and named implementations #9
  • A foreign function interface (should be similar in treatment within the typechecker to val)
    See FFI targetting C #19
  • References and pointers (with region inference) with an unsafe emphasis
  • Characters and strings with templating (will see later how to desugar those)
  • Algebraic effects as a way to "enclose" impure operations
    See Add algebraic effects to Zilch #7
  • Some builtin operations (such as addition of integers, boolean negation, etc.)

There is still a lot of work to do before a minimal viable product for this compiler (moreso if we take in account the issues for N⋆ too, such as zilch-lang/nstar#62). I do not have an ETA for this, and I don't think that one should be such a great thing. I'd rather not put deadlines onto a personal project

@Mesabloo Mesabloo added the kind: discussion Discussing about something, waiting for opinions label Aug 26, 2022
@Mesabloo Mesabloo added this to the Zilch v1 milestone Aug 27, 2022
@Mesabloo Mesabloo moved this to Todo in Issue tracker Sep 20, 2022
@Mesabloo Mesabloo moved this from Todo to In Progress in Issue tracker Sep 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind: discussion Discussing about something, waiting for opinions
Projects
Status: In Progress
Development

No branches or pull requests

1 participant