From 9a746a0b0e9f1143a8f3922473f91c47a3af665b Mon Sep 17 00:00:00 2001 From: Chloe Brown Date: Tue, 31 Aug 2021 10:28:46 +0100 Subject: Introduce type-safe instances and threads --- src/Wasm/Type.agda | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'src/Wasm/Type.agda') diff --git a/src/Wasm/Type.agda b/src/Wasm/Type.agda index 7a82aa8..6e94a71 100644 --- a/src/Wasm/Type.agda +++ b/src/Wasm/Type.agda @@ -2,9 +2,9 @@ module Wasm.Type where -open import Data.Fin using (Fin; Fin′) +open import Data.Fin using (Fin; Fin′; inject) open import Data.List using (List) -open import Data.Maybe using (Maybe; maybe) +open import Data.Maybe using (Maybe; nothing; just; maybe) open import Data.Nat using (ℕ) open import Wasm.Value using (I32) @@ -16,6 +16,11 @@ record Limits (k : ℕ) : Set where max : Maybe (Fin k) min : maybe Fin′ (Fin k) max + min′ : Fin k + min′ with max | min + ... | nothing | m = m + ... | just _ | m = inject m + data NumType : Set where i32 : NumType i64 : NumType -- cgit v1.2.3