summaryrefslogtreecommitdiff
path: root/src/Wasm/Util/List/Map/Any.agda
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2021-08-31 10:28:46 +0100
committerChloe Brown <chloe.brown.00@outlook.com>2021-08-31 10:28:46 +0100
commit9a746a0b0e9f1143a8f3922473f91c47a3af665b (patch)
tree30fec9f0cec92be5265e8a5d4b54fc5db9cfa833 /src/Wasm/Util/List/Map/Any.agda
parentf1d1cb690e7e0487e18d235a919af1c147f39884 (diff)
Introduce type-safe instances and threadsHEADmaster
Diffstat (limited to 'src/Wasm/Util/List/Map/Any.agda')
-rw-r--r--src/Wasm/Util/List/Map/Any.agda12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Wasm/Util/List/Map/Any.agda b/src/Wasm/Util/List/Map/Any.agda
new file mode 100644
index 0000000..196ecc5
--- /dev/null
+++ b/src/Wasm/Util/List/Map/Any.agda
@@ -0,0 +1,12 @@
+{-# OPTIONS --safe --without-K #-}
+
+module Wasm.Util.List.Map.Any where
+
+open import Data.List using (_∷_)
+open import Level using (_⊔_)
+open import Relation.Unary using (Pred)
+open import Wasm.Util.List.Map
+
+data Any {a b p} {A : Set a} {B : A → Set b} (P : ∀ {x} → Pred (B x) p) : ∀ {xs} → Pred (Map B xs) (a ⊔ b ⊔ p) where
+ here : ∀ {x xs y ys} (py : P y) → Any P {x ∷ xs} (y ∷ ys)
+ there : ∀ {x xs y ys} (pys : Any P ys) → Any P {x ∷ xs} (y ∷ ys)