summaryrefslogtreecommitdiff
path: root/src/gen_lib/vector.lem
diff options
context:
space:
mode:
authorChristopher Pulte2015-11-20 14:22:49 +0000
committerChristopher Pulte2015-11-20 14:22:49 +0000
commit978e8b3e42640a239ea6fa13ce3389794e5bf9df (patch)
treee881e658431a5f73cbfe0dc6d16f3ea4a0e1884a /src/gen_lib/vector.lem
parentf484bde292f34dbb808548e4fb45bcb7669893b3 (diff)
no more unecessary variables from removing vector-concatenation pattern matches, reset variable name counter for each function clause, fixes
Diffstat (limited to 'src/gen_lib/vector.lem')
-rw-r--r--src/gen_lib/vector.lem6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gen_lib/vector.lem b/src/gen_lib/vector.lem
index 5e78e010..9efae768 100644
--- a/src/gen_lib/vector.lem
+++ b/src/gen_lib/vector.lem
@@ -1,6 +1,6 @@
open import Pervasives
-type bit = O | I | U
+type bit = O | I | Undef
type vector 'a = V of list 'a * integer * bool
let rec nth xs (n : integer) = match (n,xs) with
@@ -28,11 +28,11 @@ let make_indexed_vector_reg entries default start length =
V (List.foldl replace (replicate length v) entries) start
let make_indexed_vector_bit entries default start length =
- let default = match default with Nothing -> U | Just v -> v end in
+ let default = match default with Nothing -> Undef | Just v -> v end in
V (List.foldl replace (replicate length default) entries) start
let make_bitvector_undef length =
- V (replicate length U) 0 true
+ V (replicate length Undef) 0 true
let vector_concat (V bs start is_inc) (V bs' _ _) =
V (bs ++ bs') start is_inc