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)
| TOption 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
| TEnum e -> Format.fprintf fmt "%a.t" format_to_module_name (`Ename e)
| TArrow (t1, t2) ->

View File

@ -25,9 +25,11 @@ type decimal = Q.t
type date = Dates_calc.Dates.date
type date_rounding = Dates_calc.Dates.date_rounding
type duration = Dates_calc.Dates.period
module Eoption = struct
type 'a t = ENone of unit | ESome of 'a
end
type io_input = NoInput | OnlyInput | Reentrant [@@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
match except with
| 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