summaryrefslogtreecommitdiff
path: root/src/Wasm/Expression/Values.agda
diff options
context:
space:
mode:
authorChloe Brown <chloe.brown.00@outlook.com>2021-07-28 16:55:28 +0100
committerChloe Brown <chloe.brown.00@outlook.com>2021-07-28 16:55:28 +0100
commit9812bb2ae394b59ae9fcb7cf9b78fd260aa3e92a (patch)
treecc6b1b3aac88450004b64853b774f43a91b26275 /src/Wasm/Expression/Values.agda
parentaacd555894fb559365774ddfa899656b95205e4e (diff)
Cleanup before working on 'Modules'
Diffstat (limited to 'src/Wasm/Expression/Values.agda')
-rw-r--r--src/Wasm/Expression/Values.agda6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Wasm/Expression/Values.agda b/src/Wasm/Expression/Values.agda
index d6bce60..283e325 100644
--- a/src/Wasm/Expression/Values.agda
+++ b/src/Wasm/Expression/Values.agda
@@ -9,6 +9,7 @@ open import Data.Char using (Char; toℕ)
open import Data.Empty using (⊥)
open import Data.Fin using (Fin)
open import Data.Nat using (ℕ; zero; suc; _^_; pred)
+open import Wasm.Constants
open import Wasm.Expression.Utilities using (BitWidth; 32Bit; 64Bit)
infix 8 +_ -_
@@ -115,4 +116,7 @@ module _ where
byteLength s = sum (map utf8Bytes (toList s))
data Name : Set where
- name : ∀ s → {len : byteLength s < 2 ^ 32} → Name
+ name : ∀ s → {len : byteLength s < 2^32} → Name
+
+ toString : Name → String
+ toString (name s) = s