mirror of
https://github.com/anoma/juvix.git
synced 2025-01-05 22:46:08 +03:00
25 lines
359 B
Plaintext
25 lines
359 B
Plaintext
module Synonyms;
|
|
|
|
open import Stdlib.Prelude;
|
|
|
|
Ty1 : Type;
|
|
Ty1 := Bool → Bool;
|
|
|
|
Ty2 : Type;
|
|
Ty2 := Ty1;
|
|
|
|
k : Ty2;
|
|
k x := x;
|
|
|
|
Num : Type;
|
|
Num := {A : Type} → (A → A) → A → A;
|
|
|
|
-- we need the explicit `{_}` since we do not normalize types in the arity checker
|
|
czero : Num;
|
|
czero {_} f x := x;
|
|
|
|
csuc : Num → Num;
|
|
csuc n {_} f := f ∘ n {_} f;
|
|
|
|
end;
|