diff options
author | Malte Voos <git@mal.tc> | 2024-06-17 17:41:38 +0200 |
---|---|---|
committer | Malte Voos <git@mal.tc> | 2024-06-17 17:41:38 +0200 |
commit | 04d62df9fdd42c603fad7bb1b5e3fb49bf8550c1 (patch) | |
tree | 0a11c38a9f7bfad5624f0821b3a7041a9d4ff4d8 /lib/Domain.ml | |
parent | edcd6c17b873b11b18016c9fe6efbe47576574ae (diff) | |
download | toytt-04d62df9fdd42c603fad7bb1b5e3fb49bf8550c1.tar.gz toytt-04d62df9fdd42c603fad7bb1b5e3fb49bf8550c1.zip |
implement typechecking
Diffstat (limited to 'lib/Domain.ml')
-rw-r--r-- | lib/Domain.ml | 34 |
1 files changed, 16 insertions, 18 deletions
diff --git a/lib/Domain.ml b/lib/Domain.ml index 88560c2..67ac4ae 100644 --- a/lib/Domain.ml +++ b/lib/Domain.ml @@ -1,31 +1,29 @@ open Bwd -type value = +type t = Data.value = | Neutral of ne - | Pi of value * clos - | Lam of clos - | Sg of value * clos - | Pair of value * value + | Pi of t * clo + | Lam of clo + | Sg of t * clo + | Pair of t * t | Type | Bool | True | False -and ne = ne_head * frame bwd -and ne_head = Var of int (* De Bruijn levels *) -and frame = - | BoolElim of { - cmot: clos; - vtrue: value; - vfalse: value; - } - | App of value +and ne = Data.ne +and ne_head = Data.ne_head = Var of int (* De Bruijn levels *) +and frm = Data.frm = + | App of t | Fst | Snd + | BoolElim of { + cmot: clo; + vtrue: t; + vfalse: t; + } -and env = value bwd -and clos = Clos of { body : Syntax.tm; env : env } - -type cell = { tm : value; tp : value } +and env = Data.env +and clo = Data.clo = Clo of { body : Data.syn; env : env } let var i = Neutral (Var i, Bwd.Emp) |