mirror of
https://github.com/anoma/juvix.git
synced 2024-12-13 11:16:48 +03:00
d6c1a74cec
This pr applies a number of fixes to the new typechecker. The fixes implemented are: 1. When guessing the arity of the body, we properly use the type information of the variables in the patterns. 2. When generating wildcards, we name them properly so that they align with the name in the type signature. 3. When compiling named applications, we inline all clauses of the form `fun : _ := body`. This is a workaround to https://github.com/anoma/juvix/issues/2247 and https://github.com/anoma/juvix/issues/2517 4. I've had to ignore test027 (Church numerals). While the typechecker passes and one can see that the types are correct, there is a lambda where its clauses have different number of patterns. Our goal is to support that in the near future (https://github.com/anoma/juvix/issues/1706). This is the conflicting lambda: ``` mutual num : Nat → Num := λ : Nat → Num {| (zero : Nat) := czero | ((suc n : Nat)) {A} := csuc (num n) {A}} ``` 5. I've added non-trivial a compilation test involving monad transformers. |
||
---|---|---|
.. | ||
Arity | ||
Asm | ||
BackendGeb | ||
BackendMarkdown | ||
Compilation | ||
Core | ||
Examples | ||
Formatter | ||
Internal | ||
Package | ||
Parsing | ||
Reachability | ||
Runtime | ||
Scope | ||
Termination | ||
Typecheck | ||
VampIR | ||
Arity.hs | ||
Asm.hs | ||
BackendGeb.hs | ||
BackendMarkdown.hs | ||
Base.hs | ||
Compilation.hs | ||
Core.hs | ||
Examples.hs | ||
Format.hs | ||
Formatter.hs | ||
Internal.hs | ||
Main.hs | ||
Package.hs | ||
Parsing.hs | ||
Reachability.hs | ||
Runtime.hs | ||
Scope.hs | ||
Termination.hs | ||
Typecheck.hs | ||
VampIR.hs |