summaryrefslogtreecommitdiff
path: root/src/Inky/Env.idr
diff options
context:
space:
mode:
authorGreg Brown <greg.brown01@ed.ac.uk>2024-09-09 11:33:45 +0100
committerGreg Brown <greg.brown01@ed.ac.uk>2024-09-09 11:33:45 +0100
commit3a23bd851fc1a5d6e161dabc8a13f06bc8544a1d (patch)
tree301955e4e32dc7d5edafb98e7e373d439168e420 /src/Inky/Env.idr
parent3da61a4ffb9cb2d535d518e70c6c90cd73cc3573 (diff)
Restart.
- use De Bruijn, as Namely, Painless had more pain than promised; - remove higher-kinded types; - provide ill-typing predicates; - prove substitution respects ill-typing;
Diffstat (limited to 'src/Inky/Env.idr')
-rw-r--r--src/Inky/Env.idr30
1 files changed, 0 insertions, 30 deletions
diff --git a/src/Inky/Env.idr b/src/Inky/Env.idr
deleted file mode 100644
index 174b681..0000000
--- a/src/Inky/Env.idr
+++ /dev/null
@@ -1,30 +0,0 @@
-module Inky.Env
-
-import Control.Relation
-import Inky.Binding
-
-infix 2 :~
-
-public export
-record Assoc (0 a : Type) where
- constructor (:~)
- binder : Binder
- value : a
-
-public export
-data PartialEnv : Type -> World -> World -> Type where
- Lin : PartialEnv a w w
- (:<) : PartialEnv a w v -> (x : Assoc a) -> PartialEnv a (w :< x.binder) v
-
-public export
-Env : Type -> World -> Type
-Env a w = PartialEnv a w [<]
-
-public export
-partialLookup : PartialEnv a w v -> Name w -> Either (Name v) a
-partialLookup [<] = Left
-partialLookup (env :< (x :~ v)) = stripWith (Right v) (partialLookup env)
-
-public export
-lookup : Env a w -> Name w -> a
-lookup = either absurd id .: partialLookup