1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-11 08:25:46 +03:00
juvix/tests/negative/Termination/Ord.juvix
Jonathan Cubides 3b3ea45da9
Rename MiniJuvix to Juvix (#259)
* Renaming MiniJuvix to Juvix

* Make Ormolu happy

* Make Hlint happy

* Remove redundant imports

* Fix shell tests and add target ci to our Makefile

* Make pre-commit happy
2022-07-08 13:59:45 +02:00

21 lines
359 B
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

module Ord;
import Data.Nat;
open Data.Nat;
inductive Ord {
ZOrd : Ord;
SOrd : Ord -> Ord;
Lim : ( -> Ord) -> Ord;
};
addord : Ord -> Ord -> Ord;
aux-addord : ( -> Ord) -> Ord -> ( -> Ord);
addord (Zord) y := y;
addord (SOrd x) y := SOrd (addord x y);
addord (Lim f) y := Lim (aux-addord f y);
aux-addord f y z := addord (f z) y;
end;