diff options
| author | Alasdair Armstrong | 2017-07-26 17:54:28 +0100 |
|---|---|---|
| committer | Alasdair Armstrong | 2017-07-26 17:54:28 +0100 |
| commit | c1a431aa50a65704a349174ecf7b9017ff87c570 (patch) | |
| tree | 42a7e04a432c24d68d69d0bd7367adfccf123633 | |
| parent | ce2b3391539fba834105923488f09475e3a1e25a (diff) | |
Add right shift to lib/prelude.sail, and add case for E_exit in Ast_util.string_of_exp
| -rw-r--r-- | lib/prelude.sail | 7 | ||||
| -rw-r--r-- | src/ast_util.ml | 1 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/prelude.sail b/lib/prelude.sail index bb19aa8d..bac9532c 100644 --- a/lib/prelude.sail +++ b/lib/prelude.sail @@ -181,6 +181,13 @@ overload (deinfix <<) [ shiftl ] +val forall Num 'n, Num 'o, Order 'ord. + (vector<'o, 'n, 'ord, bit>, int) -> vector<'o, 'n, 'ord, bit> effect pure shiftr + +overload (deinfix >>) [ + shiftr +] + (* Boolean operators *) val bool -> bool effect pure bool_not val (bool, bool) -> bool effect pure bool_or diff --git a/src/ast_util.ml b/src/ast_util.ml index 5bb4e0a6..b17371d8 100644 --- a/src/ast_util.ml +++ b/src/ast_util.ml @@ -293,6 +293,7 @@ let rec string_of_exp (E_aux (exp, _)) = ^ ") { " ^ string_of_exp body | E_assert (test, msg) -> "assert(" ^ string_of_exp test ^ ", " ^ string_of_exp msg ^ ")" + | E_exit exp -> "exit " ^ string_of_exp exp | _ -> "INTERNAL" and string_of_pexp (Pat_aux (pexp, _)) = match pexp with |
