mirror of
https://github.com/HigherOrderCO/Kind.git
synced 2024-09-11 20:47:25 +03:00
18 lines
380 B
Plaintext
18 lines
380 B
Plaintext
Kind.verify
|
|
: ∀(term: Kind.Term) ∀(type: Kind.Term) ∀(dep: Nat)
|
|
(Maybe Kind.Term)
|
|
= λterm λtype λdep
|
|
let bind = (Maybe.bind Kind.Term Kind.Term)
|
|
let pure = (Maybe.some Kind.Term)
|
|
let none = (Maybe.none Kind.Term)
|
|
(bind
|
|
(Kind.infer term dep)
|
|
λinfer
|
|
(Kind.report
|
|
(Kind.equal infer type dep)
|
|
infer
|
|
type
|
|
term
|
|
dep
|
|
)
|
|
) |