start of eval module but not really

This commit is contained in:
rhiannon morris 2021-09-09 23:56:29 +02:00
parent e0bf8fa795
commit 4da8aa6031
1 changed files with 30 additions and 0 deletions

30
src/Quox/Eval.idr Normal file
View File

@ -0,0 +1,30 @@
module Quox.Eval
-- todo list:
-- - understand nbe and use it
-- - take a proof of well-typedness as an argument
import Quox.Syntax
import Data.DPair
%default total
public export Exists2 : (ty1 -> ty2 -> Type) -> Type
Exists2 t = Exists (\a => Exists (\b => t a b))
public export SomeTerm : Type
SomeTerm = Exists2 Term
public export SomeElim : Type
SomeElim = Exists2 Elim
public export SomeDim : Type
SomeDim = Exists Dim
private some : {0 t : ty -> Type} -> t a -> Exists t
some t = Evidence ? t
private some2 : {0 t : ty1 -> ty2 -> Type} -> t a b -> Exists2 t
some2 t = some $ some t