diff options
author | Malte Voos <git@mal.tc> | 2024-02-19 12:57:26 +0100 |
---|---|---|
committer | Malte Voos <git@mal.tc> | 2024-02-19 16:54:45 +0100 |
commit | 407a2a4a0a440c41adc19fbe8b67283b7b7c65ab (patch) | |
tree | c55ed80f1a90741e547c0b3fa102f5f709aa1836 /lib/Domain.ml | |
parent | 169ff6c0d196246e28c4413b43895ad5a377a2e5 (diff) | |
download | toytt-407a2a4a0a440c41adc19fbe8b67283b7b7c65ab.tar.gz toytt-407a2a4a0a440c41adc19fbe8b67283b7b7c65ab.zip |
core syntax, semantic domain, evaluation
Diffstat (limited to 'lib/Domain.ml')
-rw-r--r-- | lib/Domain.ml | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/lib/Domain.ml b/lib/Domain.ml new file mode 100644 index 0000000..cf07a4b --- /dev/null +++ b/lib/Domain.ml @@ -0,0 +1,27 @@ +open Bwd + +type value = + | Neutral of ne + | Pi of value * clos + | Lam of clos + | Sg of value * clos + | Pair of value * value + | 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 + | Fst + | Snd + +and env = value bwd +and clos = Clos of { body : Syntax.tm; env : env } |