Formatting

This commit is contained in:
Denis Merigoux 2023-06-15 10:51:31 +02:00
parent 10d147a8b1
commit 385e19b9e1
6 changed files with 10 additions and 16 deletions

View File

@ -958,8 +958,7 @@ let driver
(List.filter (( <> ) "") (String.split_on_char ' ' catala_opts));
0
| _ -> Message.raise_error "Please specify a single catala file to test")
| _ ->
Message.raise_error "The command \"%s\" is unknown to clerk." command
| _ -> Message.raise_error "The command \"%s\" is unknown to clerk." command
with Message.CompilerError content ->
let bt = Printexc.get_raw_backtrace () in
Message.emit_content content Error;

View File

@ -163,8 +163,7 @@ let disambiguate_constructor
with Not_found ->
Message.raise_spanned_error (Mark.get enum)
"Enum %s has not been defined before" (Mark.remove enum))
| _ ->
Message.raise_spanned_error pos "Qualified paths are not supported yet"
| _ -> Message.raise_spanned_error pos "Qualified paths are not supported yet"
let int100 = Runtime.integer_of_int 100
let rat100 = Runtime.decimal_of_integer int100

View File

@ -318,8 +318,7 @@ let driver source_file (options : Cli.options) : int =
try Shared_ast.Typing.program prgm ~leave_unresolved:false
with Message.CompilerError error_content ->
raise
(Message.CompilerError
(Message.to_internal_error error_content))
(Message.CompilerError (Message.to_internal_error error_content))
in
(* That's it! *)
Message.emit_result "Typechecking successful!"
@ -354,8 +353,7 @@ let driver source_file (options : Cli.options) : int =
try Shared_ast.Typing.program ~leave_unresolved:false prgm
with Message.CompilerError error_content ->
raise
(Message.CompilerError
(Message.to_internal_error error_content))
(Message.CompilerError (Message.to_internal_error error_content))
in
if !Cli.check_invariants_flag then (
Message.emit_debug "Checking invariants...";
@ -498,8 +496,8 @@ let driver source_file (options : Cli.options) : int =
let output_file, _ =
get_output_format ~ext:p.Plugin.extension ()
in
Message.emit_debug
"Compiling program through backend \"%s\"..." p.Plugin.name;
Message.emit_debug "Compiling program through backend \"%s\"..."
p.Plugin.name;
p.Plugin.apply ~source_file ~output_file
~scope:
(match options.ex_scope with

View File

@ -100,8 +100,7 @@ let wrap_html
(** Performs syntax highlighting on a piece of code by using Pygments and the
special Catala lexer. *)
let pygmentize_code (c : string Mark.pos) (lang : C.backend_lang) : string =
Message.emit_debug "Pygmenting the code chunk %s"
(Pos.to_string (Mark.get c));
Message.emit_debug "Pygmenting the code chunk %s" (Pos.to_string (Mark.get c));
let output =
File.with_temp_file "catala_html_pygments" "in" ~contents:(Mark.remove c)
@@ fun temp_file_in ->

View File

@ -61,8 +61,7 @@ let load_file f =
Dynlink.loadfile f;
Message.emit_debug "Plugin %S loaded" f
with e ->
Message.emit_warning "Could not load plugin %S: %s" f
(Printexc.to_string e)
Message.emit_warning "Could not load plugin %S: %s" f (Printexc.to_string e)
let rec load_dir d =
let dynlink_exts =

View File

@ -348,8 +348,8 @@ and typecheck_expr_top_down :
(a, m) A.gexpr ->
(a, unionfind_typ A.custom) A.boxed_gexpr =
fun ~leave_unresolved ctx env tau e ->
(* Message.emit_debug "Propagating type %a for naked_expr %a" (format_typ
ctx) tau (Expr.format ctx) e; *)
(* Message.emit_debug "Propagating type %a for naked_expr %a" (format_typ ctx)
tau (Expr.format ctx) e; *)
let pos_e = Expr.pos e in
let () =
(* If there already is a type annotation on the given expr, ensure it