diff options
| author | Thomas Bauereiss | 2017-08-10 17:42:27 +0100 |
|---|---|---|
| committer | Thomas Bauereiss | 2017-08-10 17:51:48 +0100 |
| commit | e4fce3ffd02b69e36b42ffe3c868570c45aef986 (patch) | |
| tree | 2f00e0c1bae4ef56eef4865ab4529425557e9086 /src/gen_lib/sail_values.lem | |
| parent | af1803ece80f4e278d2ff996bf9430a6a8551164 (diff) | |
Add support for early return to Lem backend
Implemented using the exception monad, by throwing and catching the return
value
Diffstat (limited to 'src/gen_lib/sail_values.lem')
| -rw-r--r-- | src/gen_lib/sail_values.lem | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/gen_lib/sail_values.lem b/src/gen_lib/sail_values.lem index f1541466..b4a15432 100644 --- a/src/gen_lib/sail_values.lem +++ b/src/gen_lib/sail_values.lem @@ -1028,7 +1028,7 @@ let assert' b msg_opt = | Just msg -> msg | Nothing -> "unspecified error" end in - if bitU_to_bool b then () else failwith msg + if b then () else failwith msg (* convert numbers unsafely to naturals *) |
