diff options
| author | Kathy Gray | 2016-06-02 14:44:12 +0100 |
|---|---|---|
| committer | Kathy Gray | 2016-06-02 14:44:12 +0100 |
| commit | 79f3950f0e2a66eec756d7071bef2268a77c22b1 (patch) | |
| tree | d476d7b3f2383551ba8a860790873ca9cef0e87f /src | |
| parent | e5c45529500351f63a1b0f0e9b799377b5c64467 (diff) | |
Fix most_significant case omission
Diffstat (limited to 'src')
| -rw-r--r-- | src/lem_interp/interp_lib.lem | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lem_interp/interp_lib.lem b/src/lem_interp/interp_lib.lem index 8b390b8a..2922db67 100644 --- a/src/lem_interp/interp_lib.lem +++ b/src/lem_interp/interp_lib.lem @@ -120,6 +120,12 @@ let rec most_significant v = | V_vector_sparse _ _ _ _ _ -> most_significant (fill_in_sparse v) | V_lit (L_aux L_one _) -> v | V_lit (L_aux L_zero _) -> v + | V_lit (L_aux (L_num n) lt) -> + if n = 1 + then V_lit (L_aux L_one lt) + else if n = 0 + then V_lit (L_aux L_zero lt) + else Assert_extra.failwith ("most_significant given non-vector " ^ (string_of_value v)) | V_lit (L_aux L_undef _) -> v | V_unknown -> V_unknown | _ -> Assert_extra.failwith ("most_significant given non-vector " ^ (string_of_value v)) |
