mirror of
https://github.com/CatalaLang/catala.git
synced 2024-09-20 00:41:05 +03:00
Adress @altgr's suggestion
This commit is contained in:
parent
ad5dd6f2f6
commit
c2c46c431e
@ -172,7 +172,7 @@ let rec format_typ ~inside_comment (fmt : Format.formatter) (typ : typ) : unit =
|
|||||||
~pp_sep:(fun fmt () -> Format.fprintf fmt ",@;")
|
~pp_sep:(fun fmt () -> Format.fprintf fmt ",@;")
|
||||||
(format_typ ~inside_comment:true))
|
(format_typ ~inside_comment:true))
|
||||||
ts
|
ts
|
||||||
(fun fmt -> if inside_comment then () else Format.fprintf fmt "@\n")
|
(fun fmt -> if inside_comment then () else Format.pp_force_newline fmt ())
|
||||||
| TStruct s -> Format.fprintf fmt "\"catala_struct_%a\"" format_struct_name s
|
| TStruct s -> Format.fprintf fmt "\"catala_struct_%a\"" format_struct_name s
|
||||||
| TOption some_typ | TDefault some_typ ->
|
| TOption some_typ | TDefault some_typ ->
|
||||||
(* We loose track of optional value as they're crammed into NULL *)
|
(* We loose track of optional value as they're crammed into NULL *)
|
||||||
@ -186,11 +186,11 @@ let rec format_typ ~inside_comment (fmt : Format.formatter) (typ : typ) : unit =
|
|||||||
t1
|
t1
|
||||||
(format_typ ~inside_comment:true)
|
(format_typ ~inside_comment:true)
|
||||||
t2
|
t2
|
||||||
(fun fmt -> if inside_comment then () else Format.fprintf fmt "@\n")
|
(fun fmt -> if inside_comment then () else Format.pp_force_newline fmt ())
|
||||||
| TArray t1 ->
|
| TArray t1 ->
|
||||||
Format.fprintf fmt "\"list\" # array(%a)%t"
|
Format.fprintf fmt "\"list\" # array(%a)%t"
|
||||||
(format_typ ~inside_comment:true) t1 (fun fmt ->
|
(format_typ ~inside_comment:true) t1 (fun fmt ->
|
||||||
if inside_comment then () else Format.fprintf fmt "@\n")
|
if inside_comment then () else Format.pp_force_newline fmt ())
|
||||||
| TAny -> Format.fprintf fmt "\"ANY\""
|
| TAny -> Format.fprintf fmt "\"ANY\""
|
||||||
| TClosureEnv -> failwith "unimplemented!"
|
| TClosureEnv -> failwith "unimplemented!"
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user