summaryrefslogtreecommitdiff
path: root/src/Total/Syntax.idr
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2023-06-06 15:13:22 +0100
committerChloe Brown <chloe.brown.00@outlook.com>2023-06-06 15:13:22 +0100
commit6590816a835110b8181472a5116dd4ecf67c957c (patch)
tree2404f330e6a114c20095dcaac2bc3bd3f2049665 /src/Total/Syntax.idr
parentbf07a9fe3ee4ff06fe186e33221f7f91871b9217 (diff)
Add a pretty printer.
Diffstat (limited to 'src/Total/Syntax.idr')
-rw-r--r--src/Total/Syntax.idr5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/Total/Syntax.idr b/src/Total/Syntax.idr
index 6a61cf5..084ae3e 100644
--- a/src/Total/Syntax.idr
+++ b/src/Total/Syntax.idr
@@ -21,6 +21,11 @@ data Len : SnocList Ty -> Type where
%name Len k, m, n
public export
+Cast (Len ctx) Nat where
+ cast Z = 0
+ cast (S k) = S (cast k)
+
+public export
0 Fun : Len tys -> (Ty -> Type) -> Type -> Type
Fun Z arg ret = ret
Fun (S {ty} k) arg ret = Fun k arg (arg ty -> ret)