Skip to content

Commit

Permalink
[RFC007] Migrate the typechecker to the new AST - Part I (#2121)
Browse files Browse the repository at this point in the history
* Copy the code from typechecker, get rid of generic term env

* Switch to bytecode::ast::typ::*, add a whole cargaison of lifetimes

* Move Traverse in its own module

* [WIP] Pass missing allocator to conv functions

* Continue migration of the typechecker to the new AST

* More typecheck conversion, typecheck::operation conversion

* Introduce record-typechecking-related infrastructure

* Some fixes related to term environment populating

* End of first step for record typechecking

* Implement Traverse for various new AST components

* Fix various compiler errors

* Reset unintentional changes to mainline typecheck module

* Fix more compiler errors (remaining: tc::eq and tc::error)

* Migrate type equality to the new AST

* Fix compilation errors in bytecode::typecheck::error

* Fix compilation errors in bytecode::typecheck::subtyping

* Fix compilation errors in bytecode::typecheck::reporting

* Fix more compiler errors

* Update unif to use new TypeEq trait

* Fix compilation errors and warnings

* Fix typo in comment

* Fix clippy errors

* Fix cargo doc warnings

* Fix more clippy warnings
  • Loading branch information
yannham authored Dec 23, 2024
1 parent c412b24 commit 002f0fc
Show file tree
Hide file tree
Showing 34 changed files with 9,595 additions and 170 deletions.
6 changes: 2 additions & 4 deletions cli/src/doctest.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ use nickel_lang_core::{
label::Label,
match_sharedterm, mk_app, mk_fun,
program::Program,
term::{
make, record::RecordData, LabeledType, RichTerm, Term, Traverse as _, TraverseOrder,
TypeAnnotation,
},
term::{make, record::RecordData, LabeledType, RichTerm, Term, TypeAnnotation},
traverse::{Traverse as _, TraverseOrder},
typ::{Type, TypeF},
typecheck::TypecheckMode,
};
Expand Down
Loading

0 comments on commit 002f0fc

Please sign in to comment.