mirror of
https://github.com/anoma/juvix.git
synced 2024-12-01 00:04:58 +03:00
34719bbc4d
- Closes #2293. - Closes #2319 I've added an effect for termination. It keeps track of which functions failed the termination checker, which is run just after translating to Internal. During typechecking, non-terminating functions are not normalized. After typechecking, if there is at least one function which failed the termination checker, an error is reported. Additionally, we now properly check for termination of functions defined in a let expression in the repl.
8 lines
155 B
Plaintext
8 lines
155 B
Plaintext
module issue2293;
|
|
|
|
type List A := nil | cons A (List A);
|
|
|
|
map {A B} (f : A → B) : List A → List B
|
|
| nil := nil
|
|
| cons h t := cons (f h) (map f t);
|