summaryrefslogtreecommitdiff
path: root/src/Wasm/Type.agda
diff options
context:
space:
mode:
Diffstat (limited to 'src/Wasm/Type.agda')
-rw-r--r--src/Wasm/Type.agda9
1 files changed, 7 insertions, 2 deletions
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