1
1
mirror of https://github.com/anoma/juvix.git synced 2024-12-01 00:04:58 +03:00
juvix/tests/negative/Termination/Ord.juvix

20 lines
354 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;
type 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;