diff options
author | Chloe Brown <chloe.brown.00@outlook.com> | 2024-02-26 13:19:53 +0000 |
---|---|---|
committer | Chloe Brown <chloe.brown.00@outlook.com> | 2024-02-26 13:19:53 +0000 |
commit | 7e0169f7b6b9cb4c4323c320982c93e622999943 (patch) | |
tree | a2abf2cb2eba0f5ec241351870c3f29a875133c1 /src/CBPV/Context.agda | |
parent | bf5fedb51726f62aa8f46505ebee87912ef10ce3 (diff) |
WIP: concrete families
Diffstat (limited to 'src/CBPV/Context.agda')
-rw-r--r-- | src/CBPV/Context.agda | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/src/CBPV/Context.agda b/src/CBPV/Context.agda new file mode 100644 index 0000000..d1aafc4 --- /dev/null +++ b/src/CBPV/Context.agda @@ -0,0 +1,37 @@ +module CBPV.Context where + +open import Data.Bool using (Bool) +open import Data.String using (String) +import Data.String.Properties as String + +open import Relation.Binary.Definitions using (DecidableEquality) + +open import CBPV.Type + +abstract + Name : Set + Name = String + + 𝔪 : Name + 𝔪 = "𝔪" + +record Named : Set where + constructor _:-_ + field + name : Name + ofType : ValType + +open Named public + +infixl 5 _:<_ _++_ + +data Context : Set where + [<] : Context + _:<_ : Context → (ex : Named) → Context + +pattern [<_:-_] x A = [<] :< (x :- A) +pattern [<_:-_,_:-_] x A y A′ = [<] :< (x :- A) :< (y :- A′) + +_++_ : Context → Context → Context +Γ ++ [<] = Γ +Γ ++ (Δ :< ex) = Γ ++ Δ :< ex |