diff --git a/compiler/lcalc/to_ocaml.ml b/compiler/lcalc/to_ocaml.ml index 78923615..d8953060 100644 --- a/compiler/lcalc/to_ocaml.ml +++ b/compiler/lcalc/to_ocaml.ml @@ -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 "@[(%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) -> diff --git a/runtimes/ocaml/runtime.ml b/runtimes/ocaml/runtime.ml index df42e090..9c837886 100644 --- a/runtimes/ocaml/runtime.ml +++ b/runtimes/ocaml/runtime.ml @@ -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