summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2023-04-14 17:33:55 +0100
committerChloe Brown <chloe.brown.00@outlook.com>2023-04-14 17:34:41 +0100
commit66ab04e0bff5b233060aa3e0b739d1184b4c2611 (patch)
treecaf791c03e7cf373ce511766bc191f2f7bc3e50c
parentd49d082775c8bfebcf5dae0f8030804938f70991 (diff)
Define Terms.
-rw-r--r--obs.ipkg5
-rw-r--r--src/Core/Term.idr17
2 files changed, 22 insertions, 0 deletions
diff --git a/obs.ipkg b/obs.ipkg
index 835638d..c225c40 100644
--- a/obs.ipkg
+++ b/obs.ipkg
@@ -2,4 +2,9 @@ package obs
authors = "Greg Brown"
sourcedir = "src"
+depends = contrib
+
options = "--total"
+
+modules
+ = Core.Term
diff --git a/src/Core/Term.idr b/src/Core/Term.idr
new file mode 100644
index 0000000..7fea482
--- /dev/null
+++ b/src/Core/Term.idr
@@ -0,0 +1,17 @@
+module Core.Term
+
+import public Data.Fin
+
+-- Definition ------------------------------------------------------------------
+
+public export
+data Term : Nat -> Type where
+ Var : Fin n -> Term n
+
+ Set : Term n
+
+ Pi : Term n -> Term (S n) -> Term n
+ Abs : Term (S n) -> Term n
+ App : Term n -> Term n -> Term n
+
+%name Term t, u, v