summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--compiler/Driver.ml8
-rw-r--r--compiler/SymbolicToPure.ml3
2 files changed, 8 insertions, 3 deletions
diff --git a/compiler/Driver.ml b/compiler/Driver.ml
index 1dbd611a..149e2aad 100644
--- a/compiler/Driver.ml
+++ b/compiler/Driver.ml
@@ -134,7 +134,7 @@ let () =
match !opt_backend with
| Some b -> backend := b
| None ->
- print_string "Backend not specified (use the `-backend` argument)\n";
+ log#error "Backend not specified (use the `-backend` argument)";
fail ()
in
@@ -151,7 +151,11 @@ let () =
decompose_nested_let_patterns := true
| Lean ->
(* The Lean backend is experimental: print a warning *)
- log#lwarning (lazy "The Lean backend is experimental")
+ log#lwarning (lazy "The Lean backend is experimental");
+ (* We don't support fuel for the Lean backend *)
+ if !use_fuel then (
+ log#error "The Lean backend doesn't support the -use-fuel option";
+ fail ())
in
(* Retrieve and check the filename *)
diff --git a/compiler/SymbolicToPure.ml b/compiler/SymbolicToPure.ml
index f357f33b..2c103177 100644
--- a/compiler/SymbolicToPure.ml
+++ b/compiler/SymbolicToPure.ml
@@ -2616,7 +2616,8 @@ let wrap_in_match_fuel (fuel0 : VarId.id) (fuel : VarId.id) (body : texpression)
let match_e = Switch (fuel0, Match [ fail_branch; success_branch ]) in
{ e = match_e; ty = match_ty }
| Lean ->
- failwith "Not handling fuel in Lean"
+ (* We should have checked the command line arguments before *)
+ raise (Failure "Unexpected")
let translate_fun_decl (ctx : bs_ctx) (body : S.expression option) : fun_decl =
(* Translate *)