This commit is contained in:
Louis Gesbert 2023-11-27 10:47:43 +01:00
parent 35b40785c7
commit cf89204a4b
2 changed files with 4 additions and 2 deletions

View File

@ -201,7 +201,7 @@ let rec format_typ (fmt : Format.formatter) (typ : typ) : unit =
| TStruct s -> Format.fprintf fmt "%a.t" format_to_module_name (`Sname s) | TStruct s -> Format.fprintf fmt "%a.t" format_to_module_name (`Sname s)
| TOption t -> | TOption t ->
Format.fprintf fmt "@[<hov 2>(%a)@] %a.t" format_typ_with_parens t Format.fprintf fmt "@[<hov 2>(%a)@] %a.t" format_typ_with_parens t
format_to_module_name (`Ename Expr.option_enum) format_to_module_name (`Ename Expr.option_enum)
| TDefault t -> format_typ fmt t | TDefault t -> format_typ fmt t
| TEnum e -> Format.fprintf fmt "%a.t" format_to_module_name (`Ename e) | TEnum e -> Format.fprintf fmt "%a.t" format_to_module_name (`Ename e)
| TArrow (t1, t2) -> | TArrow (t1, t2) ->

View File

@ -25,9 +25,11 @@ type decimal = Q.t
type date = Dates_calc.Dates.date type date = Dates_calc.Dates.date
type date_rounding = Dates_calc.Dates.date_rounding type date_rounding = Dates_calc.Dates.date_rounding
type duration = Dates_calc.Dates.period type duration = Dates_calc.Dates.period
module Eoption = struct module Eoption = struct
type 'a t = ENone of unit | ESome of 'a type 'a t = ENone of unit | ESome of 'a
end end
type io_input = NoInput | OnlyInput | Reentrant [@@deriving yojson_of] type io_input = NoInput | OnlyInput | Reentrant [@@deriving yojson_of]
type io_log = { io_input : io_input; io_output : bool } [@@deriving yojson_of] type io_log = { io_input : io_input; io_output : bool } [@@deriving yojson_of]
@ -607,7 +609,7 @@ let handle_default_opt
in in
match except with match except with
| Eoption.ESome _ -> except | Eoption.ESome _ -> except
| Eoption.ENone _ -> (if just () then cons () else Eoption.ENone ()) | Eoption.ENone _ -> if just () then cons () else Eoption.ENone ()
let no_input : unit -> 'a = fun _ -> raise EmptyError let no_input : unit -> 'a = fun _ -> raise EmptyError