mirror of
https://github.com/anoma/juvix.git
synced 2024-12-30 19:14:46 +03:00
90a7a5e7e0
Previously we were: * discarding the types table * discarding the name ids state after processing an expression in the REPL. For example evaluating: ``` let even : _; odd : _; odd zero := false; odd (suc n) := not (even n); even zero := true; even (suc n) := not (odd n) in even 10 ``` would loop in the REPL. We noticed that the `n` in `suc n` was being given type `Type` instead of `Nat`. This was because the name id given to n was incorrect, the REPL started using name ids from 0 again. We fixed this issue by storing information, including the types table and name ids state in the Artifacts data structure that is returned when we run the pipeline for the first time. This information is then used when we call functions to compile / type check REPL expressions. --------- Co-authored-by: Paul Cadman <git@paulcadman.dev> |
||
---|---|---|
.. | ||
Asm | ||
Compile | ||
Eval | ||
FromConcrete | ||
Read | ||
Repl | ||
Strip | ||
Asm.hs | ||
Compile.hs | ||
Eval.hs | ||
FromConcrete.hs | ||
Options.hs | ||
Read.hs | ||
Repl.hs | ||
Strip.hs |