diff --git a/CHANGES.md b/CHANGES.md index 6cb5bf928b..35497da123 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -7,6 +7,8 @@ - Support OxCaml 5.2.0minus39 (@jonludlam, #1469) - Support for OxCaml modes (@art-w, #1454) - Fix OxCaml with-bounds for arbitrary types (@art-w, #1466) +- Display items included via `include functor` as included via the functor + (@Leonidas-from-XIV, #1452) ### Fixed - Remove requirement for ppx_expect in tests (@jonludlam, #1445) diff --git a/src/document/generator.ml b/src/document/generator.ml index f8efd42ef8..35cbda85ba 100644 --- a/src/document/generator.ml +++ b/src/document/generator.ml @@ -1912,8 +1912,10 @@ module Make (Syntax : SYNTAX) = struct and include_ (t : Odoc_model.Lang.Include.t) = let decl_hidden = match t.decl with - | Alias p -> Paths.Path.(is_hidden (p :> t)) - | ModuleType mty -> umty_hidden mty + | Alias p | Functor { original_ref = Path p; _ } -> + Paths.Path.(is_hidden (p :> t)) + | Functor { original_ref = ModuleType mty; _ } -> mty_hidden mty + | ModuleType umty -> umty_hidden umty in let status = if decl_hidden then `Inline else t.status in @@ -1921,14 +1923,22 @@ module Make (Syntax : SYNTAX) = struct let summary = if decl_hidden then O.render (O.keyword "include" ++ O.txt " ...") else + let include_kw = + match t.decl with + | Odoc_model.Lang.Include.Alias _ | ModuleType _ -> + O.keyword "include" + | Functor _ -> O.keyword "include functor" + in let include_decl = match t.decl with - | Odoc_model.Lang.Include.Alias mod_path -> + | Odoc_model.Lang.Include.Alias mod_path + | Functor { original_ref = Path mod_path; _ } -> Link.from_path (mod_path :> Paths.Path.t) + | Functor { original_ref = ModuleType mt; _ } -> mty mt | ModuleType mt -> umty mt in O.render - (O.keyword "include" ++ O.txt " " ++ include_decl + (include_kw ++ O.txt " " ++ include_decl ++ if Syntax.Mod.include_semicolon then O.keyword ";" else O.noop) in let content = { Include.content; status; summary } in diff --git a/src/loader/cmt.ml b/src/loader/cmt.ml index 5c225a6c8b..f8b31f43cb 100644 --- a/src/loader/cmt.ml +++ b/src/loader/cmt.ml @@ -22,6 +22,7 @@ module OCamlPath = Path open Odoc_model.Paths open Odoc_model.Lang +module Names = Odoc_model.Names module Env = Ident_env @@ -579,16 +580,8 @@ and read_include env parent incl = let container = (parent : Identifier.Signature.t :> Identifier.LabelParent.t) in let doc, status = Doc_attr.attached ~warnings_tag:env.warnings_tag Odoc_model.Semantics.Expect_status container incl.incl_attributes in let decl_modty = -#if defined OXCAML - match unwrap_module_expr_desc incl.incl_mod.mod_desc, incl.incl_kind with - | _, (Tincl_functor _ | Tincl_gen_functor _) -> - (* TODO: Handle [include functor] *) - None - | Tmod_ident(p, _), Tincl_structure -> -#else match unwrap_module_expr_desc incl.incl_mod.mod_desc with | Tmod_ident(p, _) -> -#endif let p = Env.Path.read_module env.ident_env p in Some (ModuleType.U.TypeOf (ModuleType.StructInclude p, p)) | _ -> @@ -601,9 +594,37 @@ and read_include env parent incl = | Some m -> let decl = ModuleType m in [Include {parent; doc; decl; expansion; status; strengthened=None; loc }] - | _ -> + | None -> content.items +#if defined OXCAML +(* [include functor F] applies [F] to [wrapper], a synthetic module holding + everything defined before the include. [F] itself need not be a path -- it + can be an anonymous functor -- in which case it is bound to a module so that + there is something to apply. *) +and read_include_functor env parent wrapper incl = + let open Include in + let loc = Doc_attr.read_location incl.incl_loc in + let container = (parent : Identifier.Signature.t :> Identifier.LabelParent.t) in + let doc, status = Doc_attr.attached ~warnings_tag:env.warnings_tag Odoc_model.Semantics.Expect_status container incl.incl_attributes in + let content, shadowed = Cmi.read_signature_noenv env parent (Odoc_model.Compat.signature incl.incl_type) in + let expansion = { content; shadowed; } in + let bound, functor_path, original_ref = + match unwrap_module_expr_desc incl.incl_mod.mod_desc with + | Tmod_ident (p, _) -> + let p = Env.Path.read_module env.ident_env p in + ([], p, Path p) + | _ -> + let mty = read_module_expr env parent container incl.incl_mod in + let hidden = true in + let id, path = Cmti.generate_wrapper_module parent ~prefix:"INCLUDE" ~hidden in + let m : Module.t = {id; source_loc=None; doc; type_=ModuleType mty; canonical=None; hidden} in + ([Signature.Module (Ordinary, m)], path, ModuleType mty) + in + let decl = Functor {target = Path (`Apply (functor_path, wrapper)); original_ref} in + bound @ [Include {parent; doc; decl; expansion; status; strengthened=None; loc }] +#endif + and read_open env parent o = let container = (parent : Identifier.Signature.t :> Identifier.LabelParent.t) in let doc = Doc_attr.attached_no_tag ~warnings_tag:env.warnings_tag container o.open_attributes in @@ -611,6 +632,22 @@ and read_open env parent o = let expansion, _ = Cmi.read_signature_noenv env parent (Odoc_model.Compat.signature signature) in Open.{expansion; doc} +and read_items env parent items = + List.fold_left + (fun acc item -> + match item.str_desc with +#if defined OXCAML + | Tstr_include ({ incl_kind = (Tincl_functor _ | Tincl_gen_functor _); _ } as incl) -> + let hidden = true in + let wrapper = Cmti.generate_wrapper_module parent ~prefix:"BODY" ~hidden in + let wrapper_module = Cmti.wrapper_module wrapper ~hidden (List.rev acc) in + let items = read_include_functor env parent (snd wrapper) incl in + List.rev_append items (wrapper_module :: acc) +#endif + | _ -> List.rev_append (read_structure_item env parent item) acc) + [] items + |> List.rev + and read_structure : 'tags. 'tags Odoc_model.Semantics.handle_internal_tags -> _ -> _ -> _ -> _ * 'tags = @@ -626,13 +663,7 @@ and read_structure : in Doc_attr.extract_top_comment internal_tags ~warnings_tag:env.warnings_tag ~classify parent str.str_items in - let items = - List.fold_left - (fun items item -> - List.rev_append (read_structure_item env parent item) items) - [] items - |> List.rev - in + let items = read_items env parent items in match doc_post with | { elements = [] ; _} -> ({ Signature.items; compiled = false; removed = []; doc }, tags) diff --git a/src/loader/cmti.ml b/src/loader/cmti.ml index fba321a21e..c58e867204 100644 --- a/src/loader/cmti.ml +++ b/src/loader/cmti.ml @@ -38,6 +38,93 @@ let opt_map f = function | None -> None | Some x -> Some (f x) +let generate_wrapper_module = + let wrapper_counter = ref 0 in + fun parent ~prefix ~hidden -> + incr wrapper_counter; + let dummy_id = + let dummy_name = + let sep = match hidden with | true -> "__" | false -> "_" in + let name = Printf.sprintf "%s%s%d" prefix sep !wrapper_counter in + match hidden with + | false -> Odoc_model.Names.ModuleName.make_std name + | true -> Odoc_model.Names.ModuleName.hidden_of_string name + in + Identifier.Mk.module_ (parent, dummy_name) + in + let dummy_path = `Identifier (dummy_id, hidden) in + (dummy_id, dummy_path) + +let no_doc : Odoc_model.Comment.docs = { elements = []; warnings_tag = None } + +(* [include functor F] is modelled as the application of [F] to a synthetic, + hidden module holding the items that precede the include. + + That module's items are *aliases* of the real ones rather than copies: the + expansion of [F(BODY__n)] refers to the functor argument, so a copy would + leave the expansion mentioning [BODY__n.t], a hidden path, which the + generator renders as an abstract [type t]. With an alias, [BODY__n.t] + reduces to the enclosing signature's own [t] and is rendered, and linked, as + such. *) +let wrapper_items dummy_id items = + let module Id = Identifier in + let name id = Id.name id in + let parent = (dummy_id : Id.Module.t :> Id.Signature.t) in + (* Anonymous parameters ([_]) have to be named so that the alias can pass + them on to the item it aliases. *) + let alias_params params = + List.split + (List.mapi + (fun i (p : TypeDecl.param) -> + let v = match p.desc with Var v -> v | Any -> Printf.sprintf "a%d" i in + ({ p with TypeDecl.desc = TypeDecl.Var v }, TypeExpr.Var v)) + params) + in + let rec wrapper_item item acc = + match (item : Signature.item) with + | Type (rec_, td) -> + let params, args = alias_params td.equation.params in + let manifest = + Some (TypeExpr.Constr (`Identifier ((td.id :> Id.Path.Type.t), false), args)) + in + let equation = + { td.equation with TypeDecl.Equation.params; manifest; constraints = []; private_ = false } + in + let id = Id.Mk.type_ (parent, Odoc_model.Names.TypeName.make_std (name td.id)) in + Signature.Type (rec_, { td with TypeDecl.id; equation; representation = None; canonical = None; source_loc = None }) :: acc + | Module (rec_, m) -> + let id = Id.Mk.module_ (parent, Odoc_model.Names.ModuleName.make_std (name m.id)) in + let type_ = Module.Alias (`Identifier ((m.id :> Id.Path.Module.t), false), None) in + Signature.Module (rec_, { m with Module.id; type_; canonical = None; hidden = false; source_loc = None }) :: acc + | ModuleType mt -> + let id = Id.Mk.module_type (parent, Odoc_model.Names.ModuleTypeName.make_std (name mt.id)) in + let expr = + Some (ModuleType.Path { p_path = `Identifier ((mt.id :> Id.Path.ModuleType.t), false); p_expansion = None }) + in + Signature.ModuleType { mt with ModuleType.id; expr; canonical = None; source_loc = None } :: acc + | Include incl -> + (* The items an [include] brings in are visible to the functor too. *) + List.fold_left (fun acc item -> wrapper_item item acc) acc incl.Include.expansion.content.items + | Value _ | ModuleSubstitution _ | ModuleTypeSubstitution _ | Open _ + | TypeSubstitution _ | TypExt _ | Exception _ | Comment _ -> + (* Nothing in the expansion of [F(BODY__n)] can refer to these. *) + acc + | Class _ | ClassType _ -> + (* A class type of the argument can be referred to from the expansion, + but odoc does not chase class type aliases the way it chases type + manifests, so aliasing them here would not help: such a reference is + left printing the (hidden) name of the synthetic module. *) + acc + in + List.rev (List.fold_left (fun acc item -> wrapper_item item acc) [] items) + +let wrapper_module (dummy_id, _dummy_path) ~hidden items = + let items = wrapper_items dummy_id items in + let sig_ : Signature.t = { items; compiled = true; removed = []; doc = no_doc } in + let type_ : Module.decl = ModuleType (Signature sig_) in + let module_ : Module.t = {id=dummy_id; source_loc=None; doc=no_doc; type_; canonical=None; hidden} in + Signature.Module (Ordinary, module_) + let read_label = Cmi.read_label let rec read_core_type env container ctyp = @@ -907,21 +994,36 @@ and read_include env parent incl = let include_parent = Identifier.fresh_include_parent parent in let include_container = (include_parent :> Identifier.LabelParent.t) in let expr = read_module_type env include_parent include_container incl.incl_mod in - let umty = Odoc_model.Lang.umty_of_mty expr in let expansion = { content; shadowed; } in -#if defined OXCAML - match umty, incl.incl_kind with - | Some uexpr, Tincl_structure -> -#else - match umty with + match Odoc_model.Lang.umty_of_mty expr with | Some uexpr -> -#endif let decl = Include.ModuleType uexpr in [Include {parent; doc; decl; expansion; status; strengthened=None; loc }] - | _ -> - (* TODO: Handle [include functor] *) + | None -> content.items +#if defined OXCAML +(* [include functor F] applies [F] to [wrapper], a synthetic module holding + everything defined before the include. A signature never has a path to [F] + -- only its module type -- so [F] is bound to a module to obtain one. *) +and read_include_functor env parent wrapper incl = + let open Include in + let loc = Doc_attr.read_location incl.incl_loc in + let container = (parent : Identifier.Signature.t :> Identifier.LabelParent.t) in + let doc, status = Doc_attr.attached ~warnings_tag:env.warnings_tag Odoc_model.Semantics.Expect_status container incl.incl_attributes in + let content, shadowed = Cmi.read_signature_noenv env parent (Odoc_model.Compat.signature incl.incl_type) in + let include_parent = Identifier.fresh_include_parent parent in + let include_container = (include_parent :> Identifier.LabelParent.t) in + let expr = read_module_type env include_parent include_container incl.incl_mod in + let expansion = { content; shadowed; } in + let hidden = true in + let id, functor_path = generate_wrapper_module parent ~prefix:"INCLUDE" ~hidden in + let functor_ : Module.t = {id; source_loc=None; doc; type_=ModuleType expr; canonical=None; hidden} in + let decl = Functor {target = Path (`Apply (functor_path, wrapper)); original_ref = ModuleType expr} in + [ Signature.Module (Ordinary, functor_); + Include {parent; doc; decl; expansion; status; strengthened=None; loc } ] +#endif + and read_open env parent o = let container = (parent : Identifier.Signature.t :> Identifier.LabelParent.t) in let doc = Doc_attr.attached_no_tag container ~warnings_tag:env.warnings_tag o.open_attributes in @@ -929,6 +1031,23 @@ and read_open env parent o = let expansion, _ = Cmi.read_signature_noenv env parent (Odoc_model.Compat.signature signature) in { expansion; doc } +and read_items env parent items = + List.fold_left + (fun acc item -> + match item.sig_desc with +#if defined OXCAML + | Tsig_include ({ incl_kind = (Tincl_functor _ | Tincl_gen_functor _); + incl_mod = { mty_desc = (Tmty_typeof _ | Tmty_ident _); _ }; _ } as incl, _) -> + let hidden = true in + let wrapper = generate_wrapper_module parent ~prefix:"BODY" ~hidden in + let wrapper_module = wrapper_module wrapper ~hidden (List.rev acc) in + let items = read_include_functor env parent (snd wrapper) incl in + List.rev_append items (wrapper_module :: acc) +#endif + | _ -> List.rev_append (read_signature_item env parent item) acc) + [] items + |> List.rev + and read_signature : 'tags. 'tags Odoc_model.Semantics.handle_internal_tags -> _ -> _ -> _ -> _ * 'tags = @@ -944,13 +1063,7 @@ and read_signature : in Doc_attr.extract_top_comment internal_tags ~warnings_tag:env.warnings_tag ~classify parent sg.sig_items in - let items = - List.fold_left - (fun items item -> - List.rev_append (read_signature_item env parent item) items) - [] items - |> List.rev - in + let items = read_items env parent items in match doc_post with | {elements=[]; _} -> ({ Signature.items; compiled = false; removed = []; doc }, tags) diff --git a/src/loader/cmti.mli b/src/loader/cmti.mli index d2e5905a2d..2268a367c5 100644 --- a/src/loader/cmti.mli +++ b/src/loader/cmti.mli @@ -67,3 +67,20 @@ val read_class_type_declarations : Paths.Identifier.Signature.t -> Typedtree.class_type Typedtree.class_infos list -> Odoc_model.Lang.Signature.item list + +val generate_wrapper_module : + Paths.Identifier.Signature.t -> + prefix:string -> + hidden:bool -> + Paths.Identifier.Module.t * Paths.Path.Module.t + +val wrapper_module : + Paths.Identifier.Module.t * Paths.Path.Module.t -> + hidden:bool -> + Odoc_model.Lang.Signature.item list -> + Odoc_model.Lang.Signature.item +(** [wrapper_module w ~hidden items] is the synthetic module an + [include functor] applies its functor to. Its items are aliases of [items], + the items that precede the include, so that whatever the functor's expansion + inherits from its argument resolves back to them rather than to the (hidden) + name of the wrapper. *) diff --git a/src/model/lang.ml b/src/model/lang.ml index 9dabb70404..937d008064 100644 --- a/src/model/lang.ml +++ b/src/model/lang.ml @@ -195,8 +195,15 @@ and Include : sig type expansion = { shadowed : shadowed; content : Signature.t } + type functor_ref = Path of Path.Module.t | ModuleType of ModuleType.expr + + type functor_t = { target : functor_ref; original_ref : functor_ref } + (* Explicitly unexpanded decl *) - type decl = Alias of Path.Module.t | ModuleType of ModuleType.U.expr + type decl = + | Alias of Path.Module.t + | ModuleType of ModuleType.U.expr + | Functor of functor_t type t = { loc : Location_.span; @@ -639,7 +646,12 @@ let extract_signature_doc (s : Signature.t) = (* A signature that starts with an include may inherits the top-comment from the expansion. *) | { Include.status = `Inline; _ } -> true - | { decl = Alias p; _ } -> Paths.Path.is_hidden (p :> Path.t) + | { decl = Functor { original_ref = Path p }; _ } | { decl = Alias p; _ } -> + Paths.Path.is_hidden (p :> Path.t) + | { decl = Functor { original_ref = ModuleType _ }; _ } -> + (* [include functor module type of ...]: nothing to be hidden behind, + so the enclosing signature does not inherit the top comment. *) + false | { decl = ModuleType expr; _ } -> uexpr_considered_hidden expr in match (s.doc, s.items) with diff --git a/src/model_desc/lang_desc.ml b/src/model_desc/lang_desc.ml index f09fad15bb..9f71f2b794 100644 --- a/src/model_desc/lang_desc.ml +++ b/src/model_desc/lang_desc.ml @@ -288,11 +288,27 @@ and include_shadowed = F ("s_class_types", (fun t -> List.map fst t.s_class_types), List string); ] +and include_functor_ref = + let open Lang.Include in + Variant + (function + | Path p -> C ("Path", (p :> Paths.Path.t), path) + | ModuleType e -> C ("ModuleType", e, moduletype_expr)) + +and include_functor_t = + let open Lang.Include in + Record + [ + F ("target", (fun t -> t.target), include_functor_ref); + F ("original_ref", (fun t -> t.original_ref), include_functor_ref); + ] + and include_decl = let open Lang.Include in Variant (function | Alias p -> C ("Alias", (p :> Paths.Path.t), path) + | Functor f -> C ("Functor", f, include_functor_t) | ModuleType e -> C ("ModuleType", e, moduletype_u_expr)) and include_expansion = diff --git a/src/xref2/compile.ml b/src/xref2/compile.ml index 3c64d74b2b..7b8d961115 100644 --- a/src/xref2/compile.ml +++ b/src/xref2/compile.ml @@ -389,6 +389,19 @@ and include_decl : Env.t -> Id.Signature.t -> Include.decl -> Include.decl = | ModuleType expr -> if is_elidable_with_module_type_u expr then ModuleType expr else ModuleType (u_module_type_expr env id expr) + | Functor { target = Path target; original_ref = Path original_ref } -> + Functor + { + target = Path (module_path env target); + original_ref = Path (module_path env original_ref); + } + | Functor { target = Path p; original_ref = ModuleType mt } -> + Functor + { + target = Path (module_path env p); + original_ref = ModuleType (module_type_expr env id mt); + } + | Functor { target = ModuleType _ } -> assert false | Alias p -> Alias (module_path env p) and module_type : Env.t -> ModuleType.t -> ModuleType.t = @@ -410,7 +423,7 @@ and include_ : Env.t -> Include.t -> Include.t * Env.t = match let open Odoc_utils.ResultMonad in match decl with - | Alias p -> + | Alias p | Functor p -> Tools.expansion_of_module_path env ~strengthen:true p >>= fun exp -> Tools.assert_not_functor exp | ModuleType mty -> Tools.signature_of_u_module_type_expr env mty diff --git a/src/xref2/component.ml b/src/xref2/component.ml index f132b56729..ee645dd023 100644 --- a/src/xref2/component.ml +++ b/src/xref2/component.ml @@ -367,7 +367,10 @@ end = Open and Include : sig - type decl = Alias of Cpath.module_ | ModuleType of ModuleType.U.expr + type decl = + | Alias of Cpath.module_ + | ModuleType of ModuleType.U.expr + | Functor of Cpath.module_ type t = { parent : Odoc_model.Paths.Identifier.Signature.t; @@ -927,6 +930,7 @@ module Fmt = struct let open Include in function | Alias p -> Format.fprintf ppf "%a" (module_path c) p + | Functor p -> Format.fprintf ppf "functor %a" (module_path c) p | ModuleType mt -> Format.fprintf ppf "%a" (u_module_type_expr c) mt and value c ppf v = @@ -2416,6 +2420,9 @@ module Of_Lang = struct and include_decl ident_map m = match m with | Odoc_model.Lang.Include.Alias p -> Include.Alias (module_path ident_map p) + | Functor { target = Path p; _ } -> + Include.Functor (module_path ident_map p) + | Functor { target = ModuleType _ } -> assert false | ModuleType s -> ModuleType (u_module_type_expr ident_map s) and simple_expansion ident_map diff --git a/src/xref2/component.mli b/src/xref2/component.mli index d9e25394ff..f8395d9e81 100644 --- a/src/xref2/component.mli +++ b/src/xref2/component.mli @@ -339,7 +339,10 @@ and Open : sig end and Include : sig - type decl = Alias of Cpath.module_ | ModuleType of ModuleType.U.expr + type decl = + | Alias of Cpath.module_ + | ModuleType of ModuleType.U.expr + | Functor of Cpath.module_ type t = { parent : Odoc_model.Paths.Identifier.Signature.t; diff --git a/src/xref2/lang_of.ml b/src/xref2/lang_of.ml index 796bad42e3..8f0e92e60a 100644 --- a/src/xref2/lang_of.ml +++ b/src/xref2/lang_of.ml @@ -651,6 +651,9 @@ and include_decl : (* Don't start shadowing within any signatures *) match d with | Alias p -> Alias (Path.module_ map p) + | Functor p -> + let target = Lang.Include.Path (Path.module_ map p) in + Functor { target; original_ref = target } | ModuleType mty -> let include_parent = Identifier.fresh_include_parent identifier in ModuleType (u_module_type_expr map include_parent mty) diff --git a/src/xref2/link.ml b/src/xref2/link.ml index 2620a49065..a76d4a01d4 100644 --- a/src/xref2/link.ml +++ b/src/xref2/link.ml @@ -707,6 +707,10 @@ and include_decl : Env.t -> Id.Signature.t -> Include.decl -> Include.decl = match decl with | ModuleType expr when is_elidable_with_module_type_u expr -> ModuleType expr | ModuleType expr -> ModuleType (u_module_type_expr env id expr) + | Functor ({ target = Path p; _ } as f) -> + let target = Path (module_path env p) in + Functor { f with target } + | Functor mt -> Functor mt | Alias p -> Alias (module_path env p) and module_type : Env.t -> ModuleType.t -> ModuleType.t = diff --git a/src/xref2/subst.ml b/src/xref2/subst.ml index 5a90ef98cb..2358c36ac0 100644 --- a/src/xref2/subst.ml +++ b/src/xref2/subst.ml @@ -760,6 +760,7 @@ and module_decl s t = and include_decl s t = match t with | Include.Alias p -> Include.Alias (module_path s p) + | Functor p -> Functor (module_path s p) | ModuleType t -> ModuleType (u_module_type_expr s t) and module_ s t = diff --git a/src/xref2/tools.ml b/src/xref2/tools.ml index 8f3964c584..2c1b9d5f2f 100644 --- a/src/xref2/tools.ml +++ b/src/xref2/tools.ml @@ -1799,7 +1799,7 @@ and fragmap : let map_include_decl decl subst = let open Component.Include in match decl with - | Alias p -> + | Alias p | Functor p -> expansion_of_module_path env ~strengthen:true p >>= assert_not_functor >>= fun sg -> fragmap env subst sg >>= fun sg -> Ok (ModuleType (Signature sg)) diff --git a/test/generators/cases/oxcaml.mli b/test/generators/cases/oxcaml.mli index 3947f4e83a..0f6678709c 100644 --- a/test/generators/cases/oxcaml.mli +++ b/test/generators/cases/oxcaml.mli @@ -517,3 +517,187 @@ type mode_cstr = (** Nested arrow: higher-order with a mode on the inner argument. *) | Mc_gadt : ('a @ once -> 'a) -> mode_cstr (** GADT constructor *) + +(** {1 Include functor on signatures} *) + +module No_include_functor : sig +(** Module without any [include functor] features, this is how things are done + in plain OCaml at the moment. *) + module Make (T : sig type t end) : sig type included end + module T : sig + type t + end + + include module type of T + include module type of Make(T) +end + +module Include_functor : sig +(** Module which defines a functor and includes it via [module type of] *) + module Make (T : sig type t end) : sig type included = T.t end + type t + include functor module type of Make +end + +module Include_functor_argument_shapes : sig +(** Everything the expansion of the functor can inherit from its argument: + types, including parameterised and anonymously parameterised ones, + submodules, and module types. *) + module type Arg = sig + type t + type 'a p + type _ anon + module X : sig type v end + module type S + val via_module_type_include : unit + val via_module_include : unit + + class class_type : object + val content : int + end + + class class_ : class_type + end + + module Make (T : Arg) : sig + type included = T.t + (** No parameters, so the alias odoc puts in the synthetic module is a bare + [type t = t]. *) + + type applied = int T.p + (** A named parameter, which the alias threads through as + [type 'a p = 'a p]. *) + + type anonymous = bool T.anon + (** An anonymous parameter: [_] gives the alias no name to mention on the + right, so one is invented, as [type 'a0 anon = 'a0 anon]. *) + + type from_module = T.X.v + (** Reached through a submodule of the argument, aliased as + [module X = X]. *) + + module type Reexported = T.S + (** A module type of the argument, aliased as a path to it. *) + + class output_class_via_type : T.class_type + (** A class whose type comes from an explicitely named class type *) + + class output_class_via_name : T.class_ + (** A class whose type comes from the name of a class *) + + module Aliased = T + (** The input module itself. It should contain everything from the top + level module *) + end + + (**/**) + module type To_include_module_type = sig + val via_module_type_include : unit + end + + module To_include_module : sig + val via_module_include : unit + end + (**/**) + + class class_type : object + val content : int + end + + class class_ : class_type + + type t + type 'a p + type _ anon + module X : sig type v end + module type S = sig type u end + include To_include_module_type + include module type of To_include_module + + include functor module type of Make +end + +module Include_functor_desugared : sig +(** This module is the desugared version of {!Include_functor}: the synthetic + module aliases the preceding items rather than copying them, so that the + types the functor inherits from its argument resolve back to them. *) + module Make (T : sig type t end) : sig type included = T.t end + + type t + + module DUMMY__ : sig + type nonrec t = t + end + + include module type of Make(DUMMY__) +end + +module Include_functor_named_type_desugared : sig +(** This is the desugared version of {!Include_functor_named_type}. *) + module type MakeType = (X : sig type t end) -> sig type included = X.t end + + type t + + module DUMMY__ : sig + type nonrec t = t + end + + module STRUCT__MakeType : MakeType + include module type of STRUCT__MakeType(DUMMY__) +end + +module Include_functor_named_type : sig +(** This is a module where the functor is named and then included. *) + module type MakeType = (X : sig type t end) -> sig type included = X.t end + type t + include functor MakeType +end + +module Include_functor_inline : sig +(** This is a test case where the functor is named and included inline *) + module type Make = (_ : sig type t end) -> sig type included end + type t + include functor Make + (** @inline *) +end + +module Anonymous_functor : sig +(** In this test case the functor is defined inline *) + type t + include functor module type of functor (T : sig type t end) -> struct type included end +end + +module Anonymous_functor_desugared : sig +(** In this test case the functor is defined inline *) + module DUMMY__ : sig + type t + end + include module type of DUMMY__ + + include module type of (functor (T : sig type t end) -> struct type included end)(DUMMY__) +end + +module Multiple_include_functors : sig +(** Two [include functor]s in the same signature, with an item defined between + them. *) + module First (T : sig type t end) : sig type first = T.t end + + module Second (T : sig type t type first type between end) : sig + type second = T.first + type third = T.between + end + + type t + include functor module type of First + type between + include functor module type of Second +end + +module Include_functor_not_last : sig +(** An [include functor] that is not the last item of the signature. *) + module Make (T : sig type t end) : sig type included = T.t end + + type t + include functor module type of Make + type after +end diff --git a/test/generators/cases/oxcaml_impl.ml b/test/generators/cases/oxcaml_impl.ml index 3d605794d5..4789f12542 100644 --- a/test/generators/cases/oxcaml_impl.ml +++ b/test/generators/cases/oxcaml_impl.ml @@ -59,3 +59,68 @@ let mode_arg : int @ local -> int = fun x -> x let mode_multi : string @ local once -> string @ local once = fun x -> x (** Multiple modes on argument and return. *) + +(** {1 Include functor on structures} *) + +module Include_functor = struct +(** This module demonstrates the [include functor] functionality. [Make] uses + its argument, so [included] has to come out equal to [t] rather than + abstract. *) + module Make (T : sig type t end) = struct type included = T.t end + type t + include functor Make +end + +module Include_functor_desugared = struct +(** This module is the desugared version from above *) + module Make (T : sig type t end) = struct type included = T.t end + type t + module DUMMY__ = struct + type nonrec t = t + end + include Make(DUMMY__) +end + +module Resolve_functor = struct + module F ( I : sig type t end ) = struct + type myt = I.t + end + + module M = struct + type t = float + include functor F + end +end + +module Multiple_include_functors = struct +(** Two [include functor]s in the same structure, with an item defined between + them. *) + module First (T : sig type t end) = struct type first = T.t end + + module Second (T : sig type t type first type between end) = struct + type second = T.first + type third = T.between + end + + type t + include functor First + type between + include functor Second +end + +module Include_functor_not_last = struct +(** An [include functor] that is not the last item of the structure. *) + module Make (T : sig type t end) = struct type included = T.t end + + type t + include functor Make + type after = string +end + +module Anonymous_functor = struct +(** The functor is defined inline, so there is no path for odoc to apply: it + has to bind the functor to a module first, as it does for every + [include functor] in a signature. *) + type t + include functor (functor (T : sig type t end) -> struct type included = T.t end) +end diff --git a/test/generators/html/Oxcaml-Anonymous_functor.html b/test/generators/html/Oxcaml-Anonymous_functor.html new file mode 100644 index 0000000000..7179fdc3a4 --- /dev/null +++ b/test/generators/html/Oxcaml-Anonymous_functor.html @@ -0,0 +1,54 @@ + + + Anonymous_functor (Oxcaml.Anonymous_functor) + + + + + + + + +
+

Module Oxcaml.Anonymous_functor

+
+
+
+
+ + type t +
+
+

In this test case the functor is defined inline

+
+
+
+
+ + + include functor + functor + ( + T + : sig ... + end) + -> + sig ... + end + + + +
+
+ + type included +
+
+
+
+
+ + diff --git a/test/generators/html/Oxcaml-Anonymous_functor_desugared.html b/test/generators/html/Oxcaml-Anonymous_functor_desugared.html new file mode 100644 index 0000000000..292408d6fc --- /dev/null +++ b/test/generators/html/Oxcaml-Anonymous_functor_desugared.html @@ -0,0 +1,46 @@ + + + + Anonymous_functor_desugared (Oxcaml.Anonymous_functor_desugared) + + + + + + + + +
+

Module Oxcaml.Anonymous_functor_desugared +

+
+
+
+
+ + type t +
+
+
+
+ + + include + sig ... end + + + +
+
+ + type included +
+
+
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor-Make-argument-1-T.html b/test/generators/html/Oxcaml-Include_functor-Make-argument-1-T.html new file mode 100644 index 0000000000..4d5cabd316 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor-Make-argument-1-T.html @@ -0,0 +1,29 @@ + + + T (Oxcaml.Include_functor.Make.T) + + + + + + + + +
+

Parameter Make.T

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor-Make.html b/test/generators/html/Oxcaml-Include_functor-Make.html new file mode 100644 index 0000000000..09482467e9 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor-Make.html @@ -0,0 +1,57 @@ + + + Make (Oxcaml.Include_functor.Make) + + + + + + + + +
+

Module Include_functor.Make

+

Module which defines a functor and includes it via + module type of +

+
+
+ +
+
+

Parameters +

+
+
+ + module + T + + : sig ... + end + + +
+
+

Signature

+
+
+ + type included + = + T.t + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor.html b/test/generators/html/Oxcaml-Include_functor.html new file mode 100644 index 0000000000..a5fdf4f742 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor.html @@ -0,0 +1,68 @@ + + + Include_functor (Oxcaml.Include_functor) + + + + + + + + +
+

Module Oxcaml.Include_functor

+
+
+
+
+ + + module + Make + + (T + : sig ... + end) : sig + ... end + + +
+
+

Module which defines a functor and includes it via + module type of +

+
+
+
+
+ + type t +
+
+
+
+ + + include functor + module type + of + Make + + + +
+
+ + type included + = t + +
+
+
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.html new file mode 100644 index 0000000000..77fba13f18 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.html @@ -0,0 +1,38 @@ + + + + + To_include_module + (Oxcaml.Include_functor_argument_shapes.Aliased.To_include_module) + + + + + + + + +
+

Module Aliased.To_include_module

+
+
+
+
+ + + val via_module_include : unit + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.html new file mode 100644 index 0000000000..3bb9b9930f --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.html @@ -0,0 +1,40 @@ + + + + + To_include_module_type + (Oxcaml.Include_functor_argument_shapes.Aliased.To_include_module_type) + + + + + + + + +
+

Module type Aliased.To_include_module_type +

+
+
+
+
+ + + val via_module_type_include : unit + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-Aliased.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Aliased.html new file mode 100644 index 0000000000..cdb41b1535 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Aliased.html @@ -0,0 +1,155 @@ + + + + Aliased (Oxcaml.Include_functor_argument_shapes.Aliased) + + + + + + + + +
+

Module + Include_functor_argument_shapes.Aliased +

+

The input module itself. It should contain everything from the + top level module +

+
+
+
+
+ + + module + type Arg + + = + + Arg + + + +
+
+

Everything the expansion of the functor can inherit from its + argument: types, including parameterised and anonymously parameterised + ones, submodules, and module types. +

+
+
+
+
+ + module Make + = + Make + + +
+
+
+
+ + + module + type + To_include_module_type + + + = sig ... + end + + +
+
+
+
+ + + module + To_include_module + + + : sig ... + end + + +
+
+
+
+ + type t + = + t + + +
+
+
+
+ + type 'a p + = + 'a + p + + + +
+
+
+
+ + + type 'a0 anon + = + 'a0 + anon + + + + +
+
+
+
+ + module X + = X + + +
+
+
+
+ + + module + type S + + = + S + + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.html new file mode 100644 index 0000000000..978317b605 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.html @@ -0,0 +1,34 @@ + + + X (Oxcaml.Include_functor_argument_shapes.Make.T.X) + + + + + + + + +

Module T.X

+
+
+
+
+ + type v +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.html new file mode 100644 index 0000000000..ad1d96abc2 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.html @@ -0,0 +1,36 @@ + + + + class_ (Oxcaml.Include_functor_argument_shapes.Make.T.class_) + + + + + + + + +
+

Class T.class_

+
+
+
+
+ + val content : int +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.html new file mode 100644 index 0000000000..7290e46fb3 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.html @@ -0,0 +1,37 @@ + + + + + class_type (Oxcaml.Include_functor_argument_shapes.Make.T.class_type) + + + + + + + + +
+

Class T.class_type

+
+
+
+
+ + val content : int +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.html new file mode 100644 index 0000000000..cd538076ed --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.html @@ -0,0 +1,125 @@ + + + T (Oxcaml.Include_functor_argument_shapes.Make.T) + + + + + + + + +
+

Parameter Make.T

+
+
+
+
+ + type t +
+
+
+
+ + type 'a p + +
+
+
+
+ + type _ anon + +
+
+
+
+ + + module + + X + + + : sig ... + end + + +
+
+
+
+ + + module + type S + + +
+
+
+
+ + + val via_module_type_include : unit + + +
+
+
+
+ + + val via_module_include : unit + +
+
+
+
+ + class + + class_type + + + : object ... + end + + +
+
+
+
+ + class + + class_ + + + : + class_type + + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.html new file mode 100644 index 0000000000..6be92b13b7 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.html @@ -0,0 +1,37 @@ + + + + + output_class_via_name + (Oxcaml.Include_functor_argument_shapes.Make.output_class_via_name) + + + + + + + + +
+

Class Make.output_class_via_name

+

A class whose type comes from the name of a class

+
+
+
+
+ + val content : int +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.html new file mode 100644 index 0000000000..d51dc370c8 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.html @@ -0,0 +1,37 @@ + + + + + output_class_via_type + (Oxcaml.Include_functor_argument_shapes.Make.output_class_via_type) + + + + + + + + +
+

Class Make.output_class_via_type

+

A class whose type comes from an explicitely named class type

+
+
+
+
+ + val content : int +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make.html new file mode 100644 index 0000000000..eee39bd35c --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-Make.html @@ -0,0 +1,212 @@ + + + Make (Oxcaml.Include_functor_argument_shapes.Make) + + + + + + + + +
+

Module Include_functor_argument_shapes.Make +

+
+
+ +
+
+

Parameters +

+
+
+ + module + + + T + + + : + + Arg + + + +
+
+

Signature

+
+
+ + type included + = + T.t + + + +
+
+

No parameters, so the alias odoc puts in the synthetic module + is a bare type t = t. +

+
+
+
+
+ + type applied + = + int + T.p + + + + +
+
+

A named parameter, which the alias threads through as + type 'a p = 'a p. +

+
+
+
+
+ + type anonymous + = + bool + T.anon + + + + +
+
+

An anonymous parameter: _ gives the alias no name + to mention on the right, so one is invented, as + type 'a0 anon = 'a0 anon. +

+
+
+
+
+ + type from_module + = + T.X.v + + + +
+
+

Reached through a submodule of the argument, aliased as + module X = X. +

+
+
+
+
+ + + module + type Reexported + + = + T.S + + + +
+
+

A module type of the argument, aliased as a path to it.

+
+
+
+
+ + class + + output_class_via_type + + + : + T.class_type + + + +
+
+

A class whose type comes from an explicitely named class type

+
+
+
+
+ + class + + output_class_via_name + + + : + T.class_ + + + +
+
+

A class whose type comes from the name of a class

+
+
+
+
+ + module Aliased + = + + T + + + +
+
+

The input module itself. It should contain everything from the + top level module +

+
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-X.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-X.html new file mode 100644 index 0000000000..e70cb945ae --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-X.html @@ -0,0 +1,32 @@ + + + X (Oxcaml.Include_functor_argument_shapes.X) + + + + + + + + +
+

Module Include_functor_argument_shapes.X +

+
+
+
+
+ + type v +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-class_.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-class_.html new file mode 100644 index 0000000000..ceaeef0a11 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-class_.html @@ -0,0 +1,32 @@ + + + class_ (Oxcaml.Include_functor_argument_shapes.class_) + + + + + + + + +
+

Class Include_functor_argument_shapes.class_ +

+
+
+
+
+ + val content : int +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-class_type.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-class_type.html new file mode 100644 index 0000000000..a2d3ce88ee --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-class_type.html @@ -0,0 +1,34 @@ + + + + class_type (Oxcaml.Include_functor_argument_shapes.class_type) + + + + + + + + +
+

Class + Include_functor_argument_shapes.class_type +

+
+
+
+
+ + val content : int +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.html new file mode 100644 index 0000000000..e809b39110 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.html @@ -0,0 +1,37 @@ + + + + + output_class_via_name + (Oxcaml.Include_functor_argument_shapes.output_class_via_name) + + + + + + + + +
+

Class + Include_functor_argument_shapes.output_class_via_name + +

A class whose type comes from the name of a class

+
+
+
+
+ + val content : int +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.html new file mode 100644 index 0000000000..57fe346139 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.html @@ -0,0 +1,37 @@ + + + + + output_class_via_type + (Oxcaml.Include_functor_argument_shapes.output_class_via_type) + + + + + + + + +
+

Class + Include_functor_argument_shapes.output_class_via_type + +

A class whose type comes from an explicitely named class type

+
+
+
+
+ + val content : int +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.html new file mode 100644 index 0000000000..2e84724276 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.html @@ -0,0 +1,33 @@ + + + X (Oxcaml.Include_functor_argument_shapes.Arg.X) + + + + + + + + +
+

Module Arg.X

+
+
+
+
+ + type v +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.html new file mode 100644 index 0000000000..a28e56fbef --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.html @@ -0,0 +1,34 @@ + + + + class_ (Oxcaml.Include_functor_argument_shapes.Arg.class_) + + + + + + + + +
+

Class Arg.class_

+
+
+
+
+ + val content : int +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.html new file mode 100644 index 0000000000..32cd1096e0 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.html @@ -0,0 +1,34 @@ + + + + class_type (Oxcaml.Include_functor_argument_shapes.Arg.class_type) + + + + + + + + +
+

Class Arg.class_type

+
+
+
+
+ + val content : int +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg.html new file mode 100644 index 0000000000..838567de9a --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-Arg.html @@ -0,0 +1,129 @@ + + + Arg (Oxcaml.Include_functor_argument_shapes.Arg) + + + + + + + + +
+

Module type + Include_functor_argument_shapes.Arg +

+

Everything the expansion of the functor can inherit from its argument: + types, including parameterised and anonymously parameterised ones, + submodules, and module types. +

+
+
+
+
+ + type t +
+
+
+
+ + type 'a p + +
+
+
+
+ + type _ anon + +
+
+
+
+ + + module + + X + + + : sig ... + end + + +
+
+
+
+ + + module + type S + + +
+
+
+
+ + + val via_module_type_include : unit + + +
+
+
+
+ + + val via_module_include : unit + +
+
+
+
+ + class + + class_type + + + : object ... + end + + +
+
+
+
+ + class + + class_ + + + : + class_type + + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-S.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-S.html new file mode 100644 index 0000000000..054e43393a --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes-module-type-S.html @@ -0,0 +1,33 @@ + + + S (Oxcaml.Include_functor_argument_shapes.S) + + + + + + + + +
+

Module type + Include_functor_argument_shapes.S +

+
+
+
+
+ + type u +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_argument_shapes.html b/test/generators/html/Oxcaml-Include_functor_argument_shapes.html new file mode 100644 index 0000000000..f274508ce8 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_argument_shapes.html @@ -0,0 +1,306 @@ + + + + + Include_functor_argument_shapes (Oxcaml.Include_functor_argument_shapes) + + + + + + + + +
+

Module + Oxcaml.Include_functor_argument_shapes +

+
+
+
+
+ + + module + type + + Arg + + + = sig ... + end + + +
+
+

Everything the expansion of the functor can inherit from its + argument: types, including parameterised and anonymously parameterised + ones, submodules, and module types. +

+
+
+
+
+ + + module + Make + + ( + + T + : + + Arg + ) : sig ... + end + + +
+
+
+
+ + class + + + class_type + + + : object ... + end + + +
+
+
+
+ + class + + + class_ + + + : + + class_type + + + +
+
+
+
+ + type t +
+
+
+
+ + type 'a p + +
+
+
+
+ + type _ anon + +
+
+
+
+ + + module + X + + : sig ... + end + + +
+
+
+
+ + + module + type + S + + + = sig ... + end + + +
+
+
+
+ + + val via_module_type_include : unit + + +
+
+
+
+ + + val via_module_include : unit + +
+
+
+
+ + + include functor + module type + of + Make + + + +
+
+ + type included + = t + +
+
+

No parameters, so the alias odoc puts in the synthetic module + is a bare type t = t. +

+
+
+
+
+ + type applied + = int p + +
+
+

A named parameter, which the alias threads through as + type 'a p = 'a p. +

+
+
+
+
+ + type anonymous + = bool anon + +
+
+

An anonymous parameter: _ gives the alias no name + to mention on the right, so one is invented, as + type 'a0 anon = 'a0 anon. +

+
+
+
+
+ + type from_module + = + X.v + + + +
+
+

Reached through a submodule of the argument, aliased as + module X = X. +

+
+
+
+
+ + + module + type Reexported + + = + + S + + + +
+
+

A module type of the argument, aliased as a path to it.

+
+
+
+
+ + class + + output_class_via_type + + + : BODY__3.class_type + + +
+
+

A class whose type comes from an explicitely named class type

+
+
+
+
+ + class + + output_class_via_name + + + : BODY__3.class_ + +
+
+

A class whose type comes from the name of a class

+
+
+
+
+ + + module + + Aliased + + + : sig ... + end + + +
+
+

The input module itself. It should contain everything from + the top level module +

+
+
+
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_desugared-Make-argument-1-T.html b/test/generators/html/Oxcaml-Include_functor_desugared-Make-argument-1-T.html new file mode 100644 index 0000000000..80e3dddd2d --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_desugared-Make-argument-1-T.html @@ -0,0 +1,32 @@ + + + T (Oxcaml.Include_functor_desugared.Make.T) + + + + + + + + +
+

Parameter Make.T

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_desugared-Make.html b/test/generators/html/Oxcaml-Include_functor_desugared-Make.html new file mode 100644 index 0000000000..f18f65ab5a --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_desugared-Make.html @@ -0,0 +1,67 @@ + + + Make (Oxcaml.Include_functor_desugared.Make) + + + + + + + + +
+

Module Include_functor_desugared.Make

+

This module is the desugared version of + Include_functor + : the synthetic module aliases the preceding items rather than copying + them, so that the types the functor inherits from its argument resolve + back to them. +

+
+
+ +
+
+

Parameters +

+
+
+ + module + + T + + + : sig ... + end + + +
+
+

Signature

+
+
+ + type included + = + + T.t + + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_desugared.html b/test/generators/html/Oxcaml-Include_functor_desugared.html new file mode 100644 index 0000000000..f6cab44583 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_desugared.html @@ -0,0 +1,71 @@ + + + + Include_functor_desugared (Oxcaml.Include_functor_desugared) + + + + + + + + +
+

Module Oxcaml.Include_functor_desugared

+
+
+
+
+ + + module + Make + + ( + T + : sig ... + end) : sig + ... end + + +
+
+

This module is the desugared version of + Include_functor + : the synthetic module aliases the preceding items rather than + copying them, so that the types the functor inherits from its argument + resolve back to them. +

+
+
+
+
+ + type t +
+
+
+
+ + + include + sig ... end + + + +
+
+ + type included + = t + +
+
+
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.html b/test/generators/html/Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.html new file mode 100644 index 0000000000..1887553dcf --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.html @@ -0,0 +1,32 @@ + + + _ (Oxcaml.Include_functor_inline.Make._) + + + + + + + + +
+

Parameter Make._

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_inline-module-type-Make.html b/test/generators/html/Oxcaml-Include_functor_inline-module-type-Make.html new file mode 100644 index 0000000000..b2fb83be6e --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_inline-module-type-Make.html @@ -0,0 +1,56 @@ + + + Make (Oxcaml.Include_functor_inline.Make) + + + + + + + + +
+

Module type Include_functor_inline.Make

+

This is a test case where the functor is named and included inline

+
+
+ +
+
+

Parameters +

+
+
+ + module + + _ + + + : sig ... + end + + +
+
+

Signature

+
+
+ + type included +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_inline.html b/test/generators/html/Oxcaml-Include_functor_inline.html new file mode 100644 index 0000000000..eb52658574 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_inline.html @@ -0,0 +1,59 @@ + + + Include_functor_inline (Oxcaml.Include_functor_inline) + + + + + + + + +
+

Module Oxcaml.Include_functor_inline

+
+
+
+
+ + + module + type + Make + + = functor + ( + _ + : sig ... + end) + -> + sig ... + end + + +
+
+

This is a test case where the functor is named and included inline +

+
+
+
+
+ + type t +
+
+
+
+ + type included +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.html b/test/generators/html/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.html new file mode 100644 index 0000000000..697c474b77 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.html @@ -0,0 +1,34 @@ + + + X (Oxcaml.Include_functor_named_type.MakeType.X) + + + + + + + + +
+

Parameter MakeType.X

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-_.html b/test/generators/html/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-_.html new file mode 100644 index 0000000000..9adeaff039 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-_.html @@ -0,0 +1,34 @@ + + + _ (Oxcaml.Include_functor_named_type.MakeType._) + + + + + + + + +
+

Parameter MakeType._

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_named_type-module-type-MakeType.html b/test/generators/html/Oxcaml-Include_functor_named_type-module-type-MakeType.html new file mode 100644 index 0000000000..d827a15d13 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_named_type-module-type-MakeType.html @@ -0,0 +1,66 @@ + + + MakeType (Oxcaml.Include_functor_named_type.MakeType) + + + + + + + + +
+

Module type + Include_functor_named_type.MakeType +

This is a module where the functor is named and then included.

+
+
+ +
+
+

Parameters +

+
+
+ + module + + X + + + : sig ... + end + + +
+
+

Signature

+
+
+ + type included + = + X.t + + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_named_type.html b/test/generators/html/Oxcaml-Include_functor_named_type.html new file mode 100644 index 0000000000..6dfd6f4792 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_named_type.html @@ -0,0 +1,77 @@ + + + + Include_functor_named_type (Oxcaml.Include_functor_named_type) + + + + + + + + +
+

Module Oxcaml.Include_functor_named_type +

+
+
+
+
+ + + module + type + + MakeType + + + = functor + ( + X + : sig ... + end) + -> + sig ... + end + + +
+
+

This is a module where the functor is named and then included.

+
+
+
+
+ + type t +
+
+
+
+ + + include functor + + MakeType + + + + +
+
+ + type included + = t + +
+
+
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.html b/test/generators/html/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.html new file mode 100644 index 0000000000..b082b8ca2d --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.html @@ -0,0 +1,38 @@ + + + + X (Oxcaml.Include_functor_named_type_desugared.MakeType.X) + + + + + + + + +
+

Parameter MakeType.X

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-_.html b/test/generators/html/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-_.html new file mode 100644 index 0000000000..51c3bd22aa --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-_.html @@ -0,0 +1,38 @@ + + + + _ (Oxcaml.Include_functor_named_type_desugared.MakeType._) + + + + + + + + +
+

Parameter MakeType._

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.html b/test/generators/html/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.html new file mode 100644 index 0000000000..9187fb35fa --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.html @@ -0,0 +1,72 @@ + + + + MakeType (Oxcaml.Include_functor_named_type_desugared.MakeType) + + + + + + + + +
+

Module type + Include_functor_named_type_desugared.MakeType +

+

This is the desugared version of + + Include_functor_named_type + . +

+
+
+ +
+
+

Parameters +

+
+
+ + module + + X + + + : sig ... + end + + +
+
+

Signature

+
+
+ + type included + = + X.t + + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_named_type_desugared.html b/test/generators/html/Oxcaml-Include_functor_named_type_desugared.html new file mode 100644 index 0000000000..9a2ed18f99 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_named_type_desugared.html @@ -0,0 +1,83 @@ + + + + + Include_functor_named_type_desugared + (Oxcaml.Include_functor_named_type_desugared) + + + + + + + + +
+

Module + Oxcaml.Include_functor_named_type_desugared +

+
+
+
+
+ + + module + type + MakeType + + + = functor + ( + X + : sig ... + end) + -> + sig ... + end + + +
+
+

This is the desugared version of + + Include_functor_named_type + . +

+
+
+
+
+ + type t +
+
+
+
+ + + include + sig ... end + + + +
+
+ + type included + = t + +
+
+
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_not_last-Make-argument-1-T.html b/test/generators/html/Oxcaml-Include_functor_not_last-Make-argument-1-T.html new file mode 100644 index 0000000000..a8be5c256b --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_not_last-Make-argument-1-T.html @@ -0,0 +1,31 @@ + + + T (Oxcaml.Include_functor_not_last.Make.T) + + + + + + + + +
+

Parameter Make.T

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_not_last-Make.html b/test/generators/html/Oxcaml-Include_functor_not_last-Make.html new file mode 100644 index 0000000000..072a97dede --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_not_last-Make.html @@ -0,0 +1,62 @@ + + + Make (Oxcaml.Include_functor_not_last.Make) + + + + + + + + +
+

Module Include_functor_not_last.Make

+

An include functor that is not the last item of the + signature. +

+
+
+ +
+
+

Parameters +

+
+
+ + module + + T + + : sig ... + end + + +
+
+

Signature

+
+
+ + type included + = + + T.t + + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Include_functor_not_last.html b/test/generators/html/Oxcaml-Include_functor_not_last.html new file mode 100644 index 0000000000..7e67651495 --- /dev/null +++ b/test/generators/html/Oxcaml-Include_functor_not_last.html @@ -0,0 +1,76 @@ + + + + Include_functor_not_last (Oxcaml.Include_functor_not_last) + + + + + + + + +
+

Module Oxcaml.Include_functor_not_last

+
+
+
+
+ + + module + Make + + ( + T + : sig ... + end) : sig + ... end + + +
+
+

An include functor that is not the last item of + the signature. +

+
+
+
+
+ + type t +
+
+
+
+ + + include functor + module type + of + Make + + + +
+
+ + type included + = t + +
+
+
+
+
+
+ + type after +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Multiple_include_functors-First-argument-1-T.html b/test/generators/html/Oxcaml-Multiple_include_functors-First-argument-1-T.html new file mode 100644 index 0000000000..43ea50981c --- /dev/null +++ b/test/generators/html/Oxcaml-Multiple_include_functors-First-argument-1-T.html @@ -0,0 +1,32 @@ + + + T (Oxcaml.Multiple_include_functors.First.T) + + + + + + + + +
+

Parameter First.T

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Multiple_include_functors-First.html b/test/generators/html/Oxcaml-Multiple_include_functors-First.html new file mode 100644 index 0000000000..bfb1596231 --- /dev/null +++ b/test/generators/html/Oxcaml-Multiple_include_functors-First.html @@ -0,0 +1,64 @@ + + + First (Oxcaml.Multiple_include_functors.First) + + + + + + + + +
+

Module Multiple_include_functors.First

+

Two include functors in the same signature, with an + item defined between them. +

+
+
+ +
+
+

Parameters +

+
+
+ + module + + T + + + : sig ... + end + + +
+
+

Signature

+
+
+ + type first + = + + T.t + + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Multiple_include_functors-Second-argument-1-T.html b/test/generators/html/Oxcaml-Multiple_include_functors-Second-argument-1-T.html new file mode 100644 index 0000000000..8c2580bf90 --- /dev/null +++ b/test/generators/html/Oxcaml-Multiple_include_functors-Second-argument-1-T.html @@ -0,0 +1,44 @@ + + + T (Oxcaml.Multiple_include_functors.Second.T) + + + + + + + + +
+

Parameter Second.T

+
+
+
+
+ + type t +
+
+
+
+ + type first +
+
+
+
+ + type between +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Multiple_include_functors-Second.html b/test/generators/html/Oxcaml-Multiple_include_functors-Second.html new file mode 100644 index 0000000000..2e8bd6e79f --- /dev/null +++ b/test/generators/html/Oxcaml-Multiple_include_functors-Second.html @@ -0,0 +1,74 @@ + + + Second (Oxcaml.Multiple_include_functors.Second) + + + + + + + + +
+

Module Multiple_include_functors.Second

+
+
+ +
+
+

Parameters +

+
+
+ + module + + T + + + : sig ... + end + + +
+
+

Signature

+
+
+ + type second + = + T.first + + + +
+
+
+
+ + type third + = + T.between + + + +
+
+
+ + diff --git a/test/generators/html/Oxcaml-Multiple_include_functors.html b/test/generators/html/Oxcaml-Multiple_include_functors.html new file mode 100644 index 0000000000..db22b07e2b --- /dev/null +++ b/test/generators/html/Oxcaml-Multiple_include_functors.html @@ -0,0 +1,121 @@ + + + + Multiple_include_functors (Oxcaml.Multiple_include_functors) + + + + + + + + +
+

Module Oxcaml.Multiple_include_functors

+
+
+
+
+ + + module + First + + ( + T + : sig ... + end) : sig + ... end + + +
+
+

Two include functors in the same signature, with + an item defined between them. +

+
+
+
+
+ + + module + Second + + ( + T + : sig ... + end) : sig + ... end + + +
+
+
+
+ + type t +
+
+
+
+ + + include functor + module type + of + First + + + +
+
+ + type first + = t + +
+
+
+
+
+
+ + type between +
+
+
+
+ + + include functor + module type + of + Second + + + +
+
+ + type second + = first + +
+
+
+
+ + type third + = between + +
+
+
+
+
+ + diff --git a/test/generators/html/Oxcaml-No_include_functor-Make-argument-1-T.html b/test/generators/html/Oxcaml-No_include_functor-Make-argument-1-T.html new file mode 100644 index 0000000000..e0f179c914 --- /dev/null +++ b/test/generators/html/Oxcaml-No_include_functor-Make-argument-1-T.html @@ -0,0 +1,29 @@ + + + T (Oxcaml.No_include_functor.Make.T) + + + + + + + + +
+

Parameter Make.T

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-No_include_functor-Make.html b/test/generators/html/Oxcaml-No_include_functor-Make.html new file mode 100644 index 0000000000..d8e38c5788 --- /dev/null +++ b/test/generators/html/Oxcaml-No_include_functor-Make.html @@ -0,0 +1,54 @@ + + + Make (Oxcaml.No_include_functor.Make) + + + + + + + + +
+

Module No_include_functor.Make

+

Module without any include functor features, this + is how things are done in plain OCaml at the moment. +

+
+
+ +
+
+

Parameters +

+
+
+ + module + T + + : sig ... + end + + +
+
+

Signature

+
+
+ + type included +
+
+
+ + diff --git a/test/generators/html/Oxcaml-No_include_functor-T.html b/test/generators/html/Oxcaml-No_include_functor-T.html new file mode 100644 index 0000000000..f7336627ac --- /dev/null +++ b/test/generators/html/Oxcaml-No_include_functor-T.html @@ -0,0 +1,29 @@ + + + T (Oxcaml.No_include_functor.T) + + + + + + + + +
+

Module No_include_functor.T

+
+
+
+
+ + type t +
+
+
+ + diff --git a/test/generators/html/Oxcaml-No_include_functor.html b/test/generators/html/Oxcaml-No_include_functor.html new file mode 100644 index 0000000000..48419ca689 --- /dev/null +++ b/test/generators/html/Oxcaml-No_include_functor.html @@ -0,0 +1,97 @@ + + + No_include_functor (Oxcaml.No_include_functor) + + + + + + + + +
+

Module Oxcaml.No_include_functor

+
+
+
+
+ + + module + Make + + ( + T + : sig ... + end) : sig + ... end + + +
+
+

Module without any include functor features, this + is how things are done in plain OCaml at the moment. +

+
+
+
+
+ + + module + T + + : sig ... + end + + +
+
+
+
+ + + include + module type + of + T + + + +
+
+ + type t +
+
+
+
+
+
+ + + include + sig ... end + + + +
+
+ + type included + = + + Make(T).included + + + +
+
+
+
+
+ + diff --git a/test/generators/html/Oxcaml.html b/test/generators/html/Oxcaml.html index 91cd5aaf5e..daeb5a4373 100644 --- a/test/generators/html/Oxcaml.html +++ b/test/generators/html/Oxcaml.html @@ -85,6 +85,10 @@

Module Oxcaml

+
  • + Include functor on signatures + +
  • @@ -2254,6 +2258,171 @@

    +

    + Include + functor on signatures +

    +
    +
    + + + module + No_include_functor + + : sig ... + end + + +
    +
    +
    +
    + + + module + Include_functor + + : sig ... + end + + +
    +
    +
    +
    + + + module + + Include_functor_argument_shapes + + + : sig ... + end + + +
    +
    +
    +
    + + + module + + Include_functor_desugared + + + : sig ... + end + + +
    +
    +
    +
    + + + + module + + Include_functor_named_type_desugared + + + : sig ... + end + + +
    +
    +
    +
    + + + module + + Include_functor_named_type + + + : sig ... + end + + +
    +
    +
    +
    + + + module + Include_functor_inline + + + : sig ... + end + + +
    +
    +
    +
    + + + module + Anonymous_functor + + : sig ... + end + + +
    +
    +
    +
    + + + module + + Anonymous_functor_desugared + + + : sig ... + end + + +
    +
    +
    +
    + + + module + + Multiple_include_functors + + + : sig ... + end + + +
    +
    +
    +
    + + + module + + Include_functor_not_last + + + : sig ... + end + + +
    +
    diff --git a/test/generators/html/Oxcaml_impl-Anonymous_functor.html b/test/generators/html/Oxcaml_impl-Anonymous_functor.html new file mode 100644 index 0000000000..441c2f315c --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Anonymous_functor.html @@ -0,0 +1,59 @@ + + + Anonymous_functor (Oxcaml_impl.Anonymous_functor) + + + + + + + + +
    +

    Module Oxcaml_impl.Anonymous_functor

    +
    +
    +
    +
    + + type t +
    +
    +

    The functor is defined inline, so there is no path for odoc to + apply: it has to bind the functor to a module first, as it does + for every include functor in a signature. +

    +
    +
    +
    +
    + + + include functor + functor + ( + T + : sig ... + end) + -> + sig ... + end + + + +
    +
    + + type included + = t + +
    +
    +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Include_functor-Make-argument-1-T.html b/test/generators/html/Oxcaml_impl-Include_functor-Make-argument-1-T.html new file mode 100644 index 0000000000..89b5389e1f --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Include_functor-Make-argument-1-T.html @@ -0,0 +1,31 @@ + + + T (Oxcaml_impl.Include_functor.Make.T) + + + + + + + + +
    +

    Parameter Make.T

    +
    +
    +
    +
    + + type t +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Include_functor-Make.html b/test/generators/html/Oxcaml_impl-Include_functor-Make.html new file mode 100644 index 0000000000..037ce33f5a --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Include_functor-Make.html @@ -0,0 +1,63 @@ + + + Make (Oxcaml_impl.Include_functor.Make) + + + + + + + + +
    +

    Module Include_functor.Make

    +

    This module demonstrates the include functor + functionality. Make uses its argument, so + included has to come out equal to t rather + than abstract. +

    +
    +
    + +
    +
    +

    Parameters +

    +
    +
    + + module + + T + + : sig ... + end + + +
    +
    +

    Signature

    +
    +
    + + type included + = + + T.t + + + +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Include_functor.html b/test/generators/html/Oxcaml_impl-Include_functor.html new file mode 100644 index 0000000000..ca8eeeda76 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Include_functor.html @@ -0,0 +1,69 @@ + + + Include_functor (Oxcaml_impl.Include_functor) + + + + + + + + +
    +

    Module Oxcaml_impl.Include_functor

    +
    +
    +
    +
    + + + module + Make + + ( + T + : sig ... + end) : sig + ... end + + +
    +
    +

    This module demonstrates the include functor + functionality. Make uses its argument, so + included has to come out equal to t rather + than abstract. +

    +
    +
    +
    +
    + + type t +
    +
    +
    +
    + + + include functor + Make + + + +
    +
    + + type included + = t + +
    +
    +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.html b/test/generators/html/Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.html new file mode 100644 index 0000000000..14793c7f83 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.html @@ -0,0 +1,33 @@ + + + T (Oxcaml_impl.Include_functor_desugared.Make.T) + + + + + + + + +
    +

    Parameter Make.T

    +
    +
    +
    +
    + + type t +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Include_functor_desugared-Make.html b/test/generators/html/Oxcaml_impl-Include_functor_desugared-Make.html new file mode 100644 index 0000000000..6ceb4a91b6 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Include_functor_desugared-Make.html @@ -0,0 +1,64 @@ + + + Make (Oxcaml_impl.Include_functor_desugared.Make) + + + + + + + + +
    +

    Module Include_functor_desugared.Make

    +

    This module is the desugared version from above

    +
    +
    + +
    +
    +

    Parameters +

    +
    +
    + + module + + + T + + + : sig ... + end + + +
    +
    +

    Signature

    +
    +
    + + type included + = + T.t + + + +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Include_functor_desugared.html b/test/generators/html/Oxcaml_impl-Include_functor_desugared.html new file mode 100644 index 0000000000..d63261b967 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Include_functor_desugared.html @@ -0,0 +1,69 @@ + + + + Include_functor_desugared (Oxcaml_impl.Include_functor_desugared) + + + + + + + + +
    +

    Module Oxcaml_impl.Include_functor_desugared +

    +
    +
    +
    +
    + + + module + Make + + ( + + T + : sig ... + end) : sig + ... end + + +
    +
    +

    This module is the desugared version from above

    +
    +
    +
    +
    + + type t +
    +
    +
    +
    + + + include + sig ... end + + + +
    +
    + + type included + = t + +
    +
    +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.html b/test/generators/html/Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.html new file mode 100644 index 0000000000..766bf59fe7 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.html @@ -0,0 +1,33 @@ + + + T (Oxcaml_impl.Include_functor_not_last.Make.T) + + + + + + + + +
    +

    Parameter Make.T

    +
    +
    +
    +
    + + type t +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Include_functor_not_last-Make.html b/test/generators/html/Oxcaml_impl-Include_functor_not_last-Make.html new file mode 100644 index 0000000000..72554f8ea7 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Include_functor_not_last-Make.html @@ -0,0 +1,66 @@ + + + Make (Oxcaml_impl.Include_functor_not_last.Make) + + + + + + + + +
    +

    Module Include_functor_not_last.Make

    +

    An include functor that is not the last item of the + structure. +

    +
    +
    + +
    +
    +

    Parameters +

    +
    +
    + + module + + + T + + + : sig ... + end + + +
    +
    +

    Signature

    +
    +
    + + type included + = + T.t + + + +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Include_functor_not_last.html b/test/generators/html/Oxcaml_impl-Include_functor_not_last.html new file mode 100644 index 0000000000..8f73144085 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Include_functor_not_last.html @@ -0,0 +1,79 @@ + + + + Include_functor_not_last (Oxcaml_impl.Include_functor_not_last) + + + + + + + + +
    +

    Module Oxcaml_impl.Include_functor_not_last +

    +
    +
    +
    +
    + + + module + Make + + ( + + T + : sig ... + end) : sig + ... end + + +
    +
    +

    An include functor that is not the last item of + the structure. +

    +
    +
    +
    +
    + + type t +
    +
    +
    +
    + + + include functor + Make + + + +
    +
    + + type included + = t + +
    +
    +
    +
    +
    +
    + + type after + = string + +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Multiple_include_functors-First-argument-1-T.html b/test/generators/html/Oxcaml_impl-Multiple_include_functors-First-argument-1-T.html new file mode 100644 index 0000000000..e49035ad12 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Multiple_include_functors-First-argument-1-T.html @@ -0,0 +1,33 @@ + + + T (Oxcaml_impl.Multiple_include_functors.First.T) + + + + + + + + +
    +

    Parameter First.T

    +
    +
    +
    +
    + + type t +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Multiple_include_functors-First.html b/test/generators/html/Oxcaml_impl-Multiple_include_functors-First.html new file mode 100644 index 0000000000..1aa9b69939 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Multiple_include_functors-First.html @@ -0,0 +1,67 @@ + + + First (Oxcaml_impl.Multiple_include_functors.First) + + + + + + + + +
    +

    Module Multiple_include_functors.First

    +

    Two include functors in the same structure, with an + item defined between them. +

    +
    +
    + +
    +
    +

    Parameters +

    +
    +
    + + module + + + T + + + : sig ... + end + + +
    +
    +

    Signature

    +
    +
    + + type first + = + T.t + + + +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.html b/test/generators/html/Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.html new file mode 100644 index 0000000000..4df3209f1a --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.html @@ -0,0 +1,45 @@ + + + T (Oxcaml_impl.Multiple_include_functors.Second.T) + + + + + + + + +
    +

    Parameter Second.T

    +
    +
    +
    +
    + + type t +
    +
    +
    +
    + + type first +
    +
    +
    +
    + + type between +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Multiple_include_functors-Second.html b/test/generators/html/Oxcaml_impl-Multiple_include_functors-Second.html new file mode 100644 index 0000000000..c462a9f8e8 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Multiple_include_functors-Second.html @@ -0,0 +1,77 @@ + + + Second (Oxcaml_impl.Multiple_include_functors.Second) + + + + + + + + +
    +

    Module Multiple_include_functors.Second

    +
    +
    + +
    +
    +

    Parameters +

    +
    +
    + + module + + + T + + + : sig ... + end + + +
    +
    +

    Signature

    +
    +
    + + type second + = + T.first + + + +
    +
    +
    +
    + + type third + = + T.between + + + +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Multiple_include_functors.html b/test/generators/html/Oxcaml_impl-Multiple_include_functors.html new file mode 100644 index 0000000000..86390cc038 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Multiple_include_functors.html @@ -0,0 +1,124 @@ + + + + Multiple_include_functors (Oxcaml_impl.Multiple_include_functors) + + + + + + + + +
    +

    Module Oxcaml_impl.Multiple_include_functors +

    +
    +
    +
    +
    + + + module + First + + ( + + T + : sig ... + end) : sig + ... end + + +
    +
    +

    Two include functors in the same structure, with + an item defined between them. +

    +
    +
    +
    +
    + + + module + Second + + ( + + T + : sig ... + end) : sig + ... end + + +
    +
    +
    +
    + + type t +
    +
    +
    +
    + + + include functor + First + + + +
    +
    + + type first + = t + +
    +
    +
    +
    +
    +
    + + type between +
    +
    +
    +
    + + + include functor + Second + + + + +
    +
    + + type second + = first + +
    +
    +
    +
    + + type third + = between + +
    +
    +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Resolve_functor-F-argument-1-I.html b/test/generators/html/Oxcaml_impl-Resolve_functor-F-argument-1-I.html new file mode 100644 index 0000000000..fee0609c82 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Resolve_functor-F-argument-1-I.html @@ -0,0 +1,29 @@ + + + I (Oxcaml_impl.Resolve_functor.F.I) + + + + + + + + +
    +

    Parameter F.I

    +
    +
    +
    +
    + + type t +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Resolve_functor-F.html b/test/generators/html/Oxcaml_impl-Resolve_functor-F.html new file mode 100644 index 0000000000..5aacdac125 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Resolve_functor-F.html @@ -0,0 +1,56 @@ + + + F (Oxcaml_impl.Resolve_functor.F) + + + + + + + + +
    +

    Module Resolve_functor.F

    +
    +
    + +
    +
    +

    Parameters +

    +
    +
    + + module + I + + : sig ... + end + + +
    +
    +

    Signature

    +
    +
    + + type myt + = + I.t + + + +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Resolve_functor-M.html b/test/generators/html/Oxcaml_impl-Resolve_functor-M.html new file mode 100644 index 0000000000..ddbee83d88 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Resolve_functor-M.html @@ -0,0 +1,50 @@ + + + M (Oxcaml_impl.Resolve_functor.M) + + + + + + + + +
    +

    Module Resolve_functor.M

    +
    +
    +
    +
    + + type t + = float + +
    +
    +
    +
    + + + include functor + F + + + +
    +
    + + type myt + = t + +
    +
    +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl-Resolve_functor.html b/test/generators/html/Oxcaml_impl-Resolve_functor.html new file mode 100644 index 0000000000..adcf9dceb8 --- /dev/null +++ b/test/generators/html/Oxcaml_impl-Resolve_functor.html @@ -0,0 +1,49 @@ + + + Resolve_functor (Oxcaml_impl.Resolve_functor) + + + + + + + + +
    +

    Module Oxcaml_impl.Resolve_functor

    +
    +
    +
    +
    + + + module + F + + (I + : sig ... + end) : sig + ... end + + +
    +
    +
    +
    + + + module + M + + : sig ... + end + + +
    +
    +
    + + diff --git a/test/generators/html/Oxcaml_impl.html b/test/generators/html/Oxcaml_impl.html index 9fde4ca6d5..4f7d1fbf25 100644 --- a/test/generators/html/Oxcaml_impl.html +++ b/test/generators/html/Oxcaml_impl.html @@ -36,6 +36,10 @@

    Module Oxcaml_impl

  • Modes on values
  • +
  • + Include functor on structures + +
  • @@ -318,6 +322,94 @@

    Multiple modes on argument and return.

    +

    + Include + functor on structures +

    +
    +
    + + + module + Include_functor + + : sig ... + end + + +
    +
    +
    +
    + + + module + + Include_functor_desugared + + + : sig ... + end + + +
    +
    +
    +
    + + + module + Resolve_functor + + : sig ... + end + + +
    +
    +
    +
    + + + module + + Multiple_include_functors + + + : sig ... + end + + +
    +
    +
    +
    + + + module + + Include_functor_not_last + + + : sig ... + end + + +
    +
    +
    +
    + + + module + Anonymous_functor + + : sig ... + end + + +
    +
    diff --git a/test/generators/html/Oxcaml_impl.md b/test/generators/html/Oxcaml_impl.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/generators/html/oxcaml.targets b/test/generators/html/oxcaml.targets index 5d69622d32..ace7794ba2 100644 --- a/test/generators/html/oxcaml.targets +++ b/test/generators/html/oxcaml.targets @@ -8,3 +8,53 @@ Oxcaml-module-type-S.html Oxcaml-M1.html Oxcaml-M2.html Oxcaml-M3.html +Oxcaml-No_include_functor.html +Oxcaml-No_include_functor-Make.html +Oxcaml-No_include_functor-Make-argument-1-T.html +Oxcaml-No_include_functor-T.html +Oxcaml-Include_functor.html +Oxcaml-Include_functor-Make.html +Oxcaml-Include_functor-Make-argument-1-T.html +Oxcaml-Include_functor_argument_shapes.html +Oxcaml-Include_functor_argument_shapes-module-type-Arg.html +Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.html +Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.html +Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.html +Oxcaml-Include_functor_argument_shapes-Make.html +Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.html +Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.html +Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.html +Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.html +Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.html +Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.html +Oxcaml-Include_functor_argument_shapes-class-class_type.html +Oxcaml-Include_functor_argument_shapes-class-class_.html +Oxcaml-Include_functor_argument_shapes-X.html +Oxcaml-Include_functor_argument_shapes-module-type-S.html +Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.html +Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.html +Oxcaml-Include_functor_argument_shapes-Aliased.html +Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.html +Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.html +Oxcaml-Include_functor_desugared.html +Oxcaml-Include_functor_desugared-Make.html +Oxcaml-Include_functor_desugared-Make-argument-1-T.html +Oxcaml-Include_functor_named_type_desugared.html +Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.html +Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.html +Oxcaml-Include_functor_named_type.html +Oxcaml-Include_functor_named_type-module-type-MakeType.html +Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.html +Oxcaml-Include_functor_inline.html +Oxcaml-Include_functor_inline-module-type-Make.html +Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.html +Oxcaml-Anonymous_functor.html +Oxcaml-Anonymous_functor_desugared.html +Oxcaml-Multiple_include_functors.html +Oxcaml-Multiple_include_functors-First.html +Oxcaml-Multiple_include_functors-First-argument-1-T.html +Oxcaml-Multiple_include_functors-Second.html +Oxcaml-Multiple_include_functors-Second-argument-1-T.html +Oxcaml-Include_functor_not_last.html +Oxcaml-Include_functor_not_last-Make.html +Oxcaml-Include_functor_not_last-Make-argument-1-T.html diff --git a/test/generators/html/oxcaml_impl.targets b/test/generators/html/oxcaml_impl.targets index 0b5d029cba..1489a68778 100644 --- a/test/generators/html/oxcaml_impl.targets +++ b/test/generators/html/oxcaml_impl.targets @@ -1,3 +1,22 @@ Oxcaml_impl.html Oxcaml_impl-To_be_included.html Oxcaml_impl-Including.html +Oxcaml_impl-Include_functor.html +Oxcaml_impl-Include_functor-Make.html +Oxcaml_impl-Include_functor-Make-argument-1-T.html +Oxcaml_impl-Include_functor_desugared.html +Oxcaml_impl-Include_functor_desugared-Make.html +Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.html +Oxcaml_impl-Resolve_functor.html +Oxcaml_impl-Resolve_functor-F.html +Oxcaml_impl-Resolve_functor-F-argument-1-I.html +Oxcaml_impl-Resolve_functor-M.html +Oxcaml_impl-Multiple_include_functors.html +Oxcaml_impl-Multiple_include_functors-First.html +Oxcaml_impl-Multiple_include_functors-First-argument-1-T.html +Oxcaml_impl-Multiple_include_functors-Second.html +Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.html +Oxcaml_impl-Include_functor_not_last.html +Oxcaml_impl-Include_functor_not_last-Make.html +Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.html +Oxcaml_impl-Anonymous_functor.html diff --git a/test/generators/latex/Oxcaml.M2.tex b/test/generators/latex/Oxcaml.M2.tex deleted file mode 100644 index 9897a40b9d..0000000000 --- a/test/generators/latex/Oxcaml.M2.tex +++ /dev/null @@ -1,12 +0,0 @@ -\section{Module \ocamlinlinecode{Oxcaml.\allowbreak{}M2}}\label{Oxcaml-M2}% -Module with \ocamlinlinecode{portable} modality. The modality is applied to all value members of \ocamlinlinecode{M2}. - -\label{Oxcaml-M2--val-x}\ocamlcodefragment{\ocamltag{keyword}{val} x : int}\\ -\label{Oxcaml-M2--val-f}\ocamlcodefragment{\ocamltag{keyword}{val} f : string \ocamltag{arrow}{$\rightarrow$} bool}\\ -\label{Oxcaml-M2--type-s}\ocamlcodefragment{\ocamltag{keyword}{type} s = \{}\\ -\begin{ocamltabular}{p{1.000\textwidth}}\ocamlinlinecode{a : int;\allowbreak{}}\label{Oxcaml-M2--type-s.a}\\ -\end{ocamltabular}% -\\ -\ocamlcodefragment{\}}\\ - - diff --git a/test/generators/latex/Oxcaml.M3.tex b/test/generators/latex/Oxcaml.M3.tex deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/generators/latex/Oxcaml.tex b/test/generators/latex/Oxcaml.tex index 2fd47c8b7f..9055b076e9 100644 --- a/test/generators/latex/Oxcaml.tex +++ b/test/generators/latex/Oxcaml.tex @@ -394,6 +394,139 @@ \subsubsection{Modes in type definitions\label{Oxcaml--modes-in-type-definitions \ocamlcodefragment{| \ocamltag{constructor}{Mc\_\allowbreak{}gadt} : (\ocamltag{type-var}{'a} @ once \ocamltag{arrow}{$\rightarrow$} \ocamltag{type-var}{'a}) \ocamltag{arrow}{$\rightarrow$} \hyperref[Oxcaml--type-mode_cstr]{\ocamlinlinecode{mode\_\allowbreak{}cstr}}}\label{Oxcaml--type-mode_cstr.Mc_gadt}& GADT constructor\\ \end{ocamltabular}% \\ +\subsection{Include functor on signatures\label{Oxcaml--include-functor-on-signatures}}% +\label{Oxcaml--module-No_include_functor}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-No_include_functor]{\ocamlinlinecode{No\_\allowbreak{}include\_\allowbreak{}functor}}}\label{Oxcaml-No_include_functor}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-No_include_functor--module-Make}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-No_include_functor-Make]{\ocamlinlinecode{Make}}}\ocamlcodefragment{ (\hyperref[Oxcaml-No_include_functor-Make-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}Module without any \ocamlinlinecode{include functor} features, this is how things are done in plain OCaml at the moment.\end{ocamlindent}% +\medbreak +\label{Oxcaml-No_include_functor--module-T}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-No_include_functor-T]{\ocamlinlinecode{T}}}\label{Oxcaml-No_include_functor-T}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-No_include_functor-T--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\ocamltag{keyword}{include} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \hyperref[Oxcaml-No_include_functor-T]{\ocamlinlinecode{T}}\label{Oxcaml-No_include_functor--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include} \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}\label{Oxcaml-No_include_functor--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml-No_include_functor-Make--type-included]{\ocamlinlinecode{Make(T).\allowbreak{}included}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml--module-Include_functor}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor]{\ocamlinlinecode{Include\_\allowbreak{}functor}}}\label{Oxcaml-Include_functor}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor--module-Make}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor-Make]{\ocamlinlinecode{Make}}}\ocamlcodefragment{ (\hyperref[Oxcaml-Include_functor-Make-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}Module which defines a functor and includes it via \ocamlinlinecode{module type of}\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include functor} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \hyperref[Oxcaml-Include_functor-Make]{\ocamlinlinecode{Make}}\label{Oxcaml-Include_functor--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml-Include_functor--type-t]{\ocamlinlinecode{t}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml--module-Include_functor_argument_shapes}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_argument_shapes]{\ocamlinlinecode{Include\_\allowbreak{}functor\_\allowbreak{}argument\_\allowbreak{}shapes}}}\label{Oxcaml-Include_functor_argument_shapes}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_argument_shapes--module-type-Arg}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Oxcaml-Include_functor_argument_shapes-module-type-Arg]{\ocamlinlinecode{Arg}}}\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg--type-p}\ocamlcodefragment{\ocamltag{keyword}{type} 'a p}\\ +\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg--type-anon}\ocamlcodefragment{\ocamltag{keyword}{type} \_\allowbreak{} anon}\\ +\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg--module-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_argument_shapes-module-type-Arg-X]{\ocamlinlinecode{X}}}\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg-X}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg-X--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} v}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg--module-type-S}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} S}\\ +\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg--val-via_module_type_include}\ocamlcodefragment{\ocamltag{keyword}{val} via\_\allowbreak{}module\_\allowbreak{}type\_\allowbreak{}include : unit}\\ +\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg--val-via_module_include}\ocamlcodefragment{\ocamltag{keyword}{val} via\_\allowbreak{}module\_\allowbreak{}include : unit}\\ +\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg--class-class_type}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type]{\ocamlinlinecode{class\_\allowbreak{}type}}}\ocamlcodefragment{ : \ocamltag{keyword}{object} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\ +\label{Oxcaml-Include_functor_argument_shapes-module-type-Arg--class-class_}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_]{\ocamlinlinecode{class\_\allowbreak{}}}}\ocamlcodefragment{ : \hyperref[Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type]{\ocamlinlinecode{class\_\allowbreak{}type}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}Everything the expansion of the functor can inherit from its argument: types, including parameterised and anonymously parameterised ones, submodules, and module types.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_argument_shapes--module-Make}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_argument_shapes-Make]{\ocamlinlinecode{Make}}}\ocamlcodefragment{ (\hyperref[Oxcaml-Include_functor_argument_shapes-Make-argument-1-T]{\ocamlinlinecode{T}} : \hyperref[Oxcaml-Include_functor_argument_shapes-module-type-Arg]{\ocamlinlinecode{Arg}}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\ +\label{Oxcaml-Include_functor_argument_shapes--class-class_type}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Oxcaml-Include_functor_argument_shapes-class-class_type]{\ocamlinlinecode{class\_\allowbreak{}type}}}\ocamlcodefragment{ : \ocamltag{keyword}{object} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\ +\label{Oxcaml-Include_functor_argument_shapes--class-class_}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Oxcaml-Include_functor_argument_shapes-class-class_]{\ocamlinlinecode{class\_\allowbreak{}}}}\ocamlcodefragment{ : \hyperref[Oxcaml-Include_functor_argument_shapes-class-class_type]{\ocamlinlinecode{class\_\allowbreak{}type}}}\\ +\label{Oxcaml-Include_functor_argument_shapes--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\label{Oxcaml-Include_functor_argument_shapes--type-p}\ocamlcodefragment{\ocamltag{keyword}{type} 'a p}\\ +\label{Oxcaml-Include_functor_argument_shapes--type-anon}\ocamlcodefragment{\ocamltag{keyword}{type} \_\allowbreak{} anon}\\ +\label{Oxcaml-Include_functor_argument_shapes--module-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_argument_shapes-X]{\ocamlinlinecode{X}}}\label{Oxcaml-Include_functor_argument_shapes-X}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_argument_shapes-X--type-v}\ocamlcodefragment{\ocamltag{keyword}{type} v}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml-Include_functor_argument_shapes--module-type-S}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Oxcaml-Include_functor_argument_shapes-module-type-S]{\ocamlinlinecode{S}}}\label{Oxcaml-Include_functor_argument_shapes-module-type-S}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_argument_shapes-module-type-S--type-u}\ocamlcodefragment{\ocamltag{keyword}{type} u}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\ocamltag{keyword}{include} .\allowbreak{}.\allowbreak{}.\allowbreak{}\label{Oxcaml-Include_functor_argument_shapes--val-via_module_type_include}\ocamlcodefragment{\ocamltag{keyword}{val} via\_\allowbreak{}module\_\allowbreak{}type\_\allowbreak{}include : unit}\\ +\ocamltag{keyword}{include} .\allowbreak{}.\allowbreak{}.\allowbreak{}\label{Oxcaml-Include_functor_argument_shapes--val-via_module_include}\ocamlcodefragment{\ocamltag{keyword}{val} via\_\allowbreak{}module\_\allowbreak{}include : unit}\\ +\ocamltag{keyword}{include functor} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \hyperref[Oxcaml-Include_functor_argument_shapes-Make]{\ocamlinlinecode{Make}}\label{Oxcaml-Include_functor_argument_shapes--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml-Include_functor_argument_shapes--type-t]{\ocamlinlinecode{t}}}\begin{ocamlindent}No parameters, so the alias odoc puts in the synthetic module is a bare \ocamlinlinecode{type t = t}.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_argument_shapes--type-applied}\ocamlcodefragment{\ocamltag{keyword}{type} applied = int \hyperref[Oxcaml-Include_functor_argument_shapes--type-p]{\ocamlinlinecode{p}}}\begin{ocamlindent}A named parameter, which the alias threads through as \ocamlinlinecode{type 'a p = 'a p}.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_argument_shapes--type-anonymous}\ocamlcodefragment{\ocamltag{keyword}{type} anonymous = bool \hyperref[Oxcaml-Include_functor_argument_shapes--type-anon]{\ocamlinlinecode{anon}}}\begin{ocamlindent}An anonymous parameter: \ocamlinlinecode{\_\allowbreak{}} gives the alias no name to mention on the right, so one is invented, as \ocamlinlinecode{type 'a0 anon = 'a0 anon}.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_argument_shapes--type-from_module}\ocamlcodefragment{\ocamltag{keyword}{type} from\_\allowbreak{}module = \hyperref[Oxcaml-Include_functor_argument_shapes-X--type-v]{\ocamlinlinecode{X.\allowbreak{}v}}}\begin{ocamlindent}Reached through a submodule of the argument, aliased as \ocamlinlinecode{module X = X}.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_argument_shapes--module-type-Reexported}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} Reexported = \hyperref[Oxcaml-Include_functor_argument_shapes-module-type-S]{\ocamlinlinecode{S}}}\begin{ocamlindent}A module type of the argument, aliased as a path to it.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_argument_shapes--class-output_class_via_type}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Oxcaml-Include_functor_argument_shapes-class-output_class_via_type]{\ocamlinlinecode{output\_\allowbreak{}class\_\allowbreak{}via\_\allowbreak{}type}}}\ocamlcodefragment{ : \hyperref[xref-unresolved]{\ocamlinlinecode{BODY\_\allowbreak{}\_\allowbreak{}3.\allowbreak{}class\_\allowbreak{}type}}}\begin{ocamlindent}A class whose type comes from an explicitely named class type\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_argument_shapes--class-output_class_via_name}\ocamlcodefragment{\ocamltag{keyword}{class} \hyperref[Oxcaml-Include_functor_argument_shapes-class-output_class_via_name]{\ocamlinlinecode{output\_\allowbreak{}class\_\allowbreak{}via\_\allowbreak{}name}}}\ocamlcodefragment{ : \hyperref[xref-unresolved]{\ocamlinlinecode{BODY\_\allowbreak{}\_\allowbreak{}3.\allowbreak{}class\_\allowbreak{}}}}\begin{ocamlindent}A class whose type comes from the name of a class\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_argument_shapes--module-Aliased}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_argument_shapes-Aliased]{\ocamlinlinecode{Aliased}}}\ocamlcodefragment{ : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}The input module itself. It should contain everything from the top level module\end{ocamlindent}% +\medbreak +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml--module-Include_functor_desugared}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_desugared]{\ocamlinlinecode{Include\_\allowbreak{}functor\_\allowbreak{}desugared}}}\label{Oxcaml-Include_functor_desugared}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_desugared--module-Make}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_desugared-Make]{\ocamlinlinecode{Make}}}\ocamlcodefragment{ (\hyperref[Oxcaml-Include_functor_desugared-Make-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}This module is the desugared version of \hyperref[Oxcaml-Include_functor]{\ocamlinlinecode{\ocamlinlinecode{Include\_\allowbreak{}functor}}[p\pageref*{Oxcaml-Include_functor}]}: the synthetic module aliases the preceding items rather than copying them, so that the types the functor inherits from its argument resolve back to them.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_desugared--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include} \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}\label{Oxcaml-Include_functor_desugared--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml-Include_functor_desugared--type-t]{\ocamlinlinecode{t}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml--module-Include_functor_named_type_desugared}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_named_type_desugared]{\ocamlinlinecode{Include\_\allowbreak{}functor\_\allowbreak{}named\_\allowbreak{}type\_\allowbreak{}desugared}}}\label{Oxcaml-Include_functor_named_type_desugared}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_named_type_desugared--module-type-MakeType}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Oxcaml-Include_functor_named_type_desugared-module-type-MakeType]{\ocamlinlinecode{MakeType}}}\label{Oxcaml-Include_functor_named_type_desugared-module-type-MakeType}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Parameters\label{Oxcaml-Include_functor_named_type_desugared-module-type-MakeType--parameters_6}}% +\label{Oxcaml-Include_functor_named_type_desugared-module-type-MakeType--argument-1-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X]{\ocamlinlinecode{X}}}\label{Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\subsubsection{Signature\label{Oxcaml-Include_functor_named_type_desugared-module-type-MakeType--signature_6}}% +\label{Oxcaml-Include_functor_named_type_desugared-module-type-MakeType--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X--type-t]{\ocamlinlinecode{X.\allowbreak{}t}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This is the desugared version of \hyperref[Oxcaml-Include_functor_named_type]{\ocamlinlinecode{\ocamlinlinecode{Include\_\allowbreak{}functor\_\allowbreak{}named\_\allowbreak{}type}}[p\pageref*{Oxcaml-Include_functor_named_type}]}.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_named_type_desugared--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include} \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}\label{Oxcaml-Include_functor_named_type_desugared--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml-Include_functor_named_type_desugared--type-t]{\ocamlinlinecode{t}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml--module-Include_functor_named_type}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_named_type]{\ocamlinlinecode{Include\_\allowbreak{}functor\_\allowbreak{}named\_\allowbreak{}type}}}\label{Oxcaml-Include_functor_named_type}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_named_type--module-type-MakeType}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Oxcaml-Include_functor_named_type-module-type-MakeType]{\ocamlinlinecode{MakeType}}}\label{Oxcaml-Include_functor_named_type-module-type-MakeType}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Parameters\label{Oxcaml-Include_functor_named_type-module-type-MakeType--parameters_7}}% +\label{Oxcaml-Include_functor_named_type-module-type-MakeType--argument-1-X}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X]{\ocamlinlinecode{X}}}\label{Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\subsubsection{Signature\label{Oxcaml-Include_functor_named_type-module-type-MakeType--signature_7}}% +\label{Oxcaml-Include_functor_named_type-module-type-MakeType--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X--type-t]{\ocamlinlinecode{X.\allowbreak{}t}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This is a module where the functor is named and then included.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_named_type--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include functor} \hyperref[Oxcaml-Include_functor_named_type-module-type-MakeType]{\ocamlinlinecode{MakeType}}\label{Oxcaml-Include_functor_named_type--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml-Include_functor_named_type--type-t]{\ocamlinlinecode{t}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml--module-Include_functor_inline}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_inline]{\ocamlinlinecode{Include\_\allowbreak{}functor\_\allowbreak{}inline}}}\label{Oxcaml-Include_functor_inline}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_inline--module-type-Make}\ocamlcodefragment{\ocamltag{keyword}{module} \ocamltag{keyword}{type} \hyperref[Oxcaml-Include_functor_inline-module-type-Make]{\ocamlinlinecode{Make}}}\label{Oxcaml-Include_functor_inline-module-type-Make}\ocamlcodefragment{ = \ocamltag{keyword}{sig}}\begin{ocamlindent}\subsubsection{Parameters\label{Oxcaml-Include_functor_inline-module-type-Make--parameters_8}}% +\label{Oxcaml-Include_functor_inline-module-type-Make--argument-1-_}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_inline-module-type-Make-argument-1-_]{\ocamlinlinecode{\_\allowbreak{}}}}\label{Oxcaml-Include_functor_inline-module-type-Make-argument-1-_}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_inline-module-type-Make-argument-1-_--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\subsubsection{Signature\label{Oxcaml-Include_functor_inline-module-type-Make--signature_8}}% +\label{Oxcaml-Include_functor_inline-module-type-Make--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\begin{ocamlindent}This is a test case where the functor is named and included inline\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_inline--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include functor} \hyperref[Oxcaml-Include_functor_inline-module-type-Make]{\ocamlinlinecode{Make}}\label{Oxcaml-Include_functor_inline--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml--module-Anonymous_functor}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Anonymous_functor]{\ocamlinlinecode{Anonymous\_\allowbreak{}functor}}}\label{Oxcaml-Anonymous_functor}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Anonymous_functor--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}In this test case the functor is defined inline\end{ocamlindent}% +\medbreak +\ocamltag{keyword}{include functor} \ocamltag{keyword}{functor} (\hyperref[Oxcaml-Anonymous_functor-include11_-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) \ocamltag{arrow}{$\rightarrow$} \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}\label{Oxcaml-Anonymous_functor--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml--module-Anonymous_functor_desugared}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Anonymous_functor_desugared]{\ocamlinlinecode{Anonymous\_\allowbreak{}functor\_\allowbreak{}desugared}}}\label{Oxcaml-Anonymous_functor_desugared}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\ocamltag{keyword}{include} .\allowbreak{}.\allowbreak{}.\allowbreak{}\label{Oxcaml-Anonymous_functor_desugared--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include} \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}\label{Oxcaml-Anonymous_functor_desugared--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml--module-Multiple_include_functors}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Multiple_include_functors]{\ocamlinlinecode{Multiple\_\allowbreak{}include\_\allowbreak{}functors}}}\label{Oxcaml-Multiple_include_functors}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Multiple_include_functors--module-First}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Multiple_include_functors-First]{\ocamlinlinecode{First}}}\ocamlcodefragment{ (\hyperref[Oxcaml-Multiple_include_functors-First-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}Two \ocamlinlinecode{include functor}s in the same signature, with an item defined between them.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Multiple_include_functors--module-Second}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Multiple_include_functors-Second]{\ocamlinlinecode{Second}}}\ocamlcodefragment{ (\hyperref[Oxcaml-Multiple_include_functors-Second-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\ +\label{Oxcaml-Multiple_include_functors--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include functor} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \hyperref[Oxcaml-Multiple_include_functors-First]{\ocamlinlinecode{First}}\label{Oxcaml-Multiple_include_functors--type-first}\ocamlcodefragment{\ocamltag{keyword}{type} first = \hyperref[Oxcaml-Multiple_include_functors--type-t]{\ocamlinlinecode{t}}}\\ +\label{Oxcaml-Multiple_include_functors--type-between}\ocamlcodefragment{\ocamltag{keyword}{type} between}\\ +\ocamltag{keyword}{include functor} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \hyperref[Oxcaml-Multiple_include_functors-Second]{\ocamlinlinecode{Second}}\label{Oxcaml-Multiple_include_functors--type-second}\ocamlcodefragment{\ocamltag{keyword}{type} second = \hyperref[Oxcaml-Multiple_include_functors--type-first]{\ocamlinlinecode{first}}}\\ +\label{Oxcaml-Multiple_include_functors--type-third}\ocamlcodefragment{\ocamltag{keyword}{type} third = \hyperref[Oxcaml-Multiple_include_functors--type-between]{\ocamlinlinecode{between}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml--module-Include_functor_not_last}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_not_last]{\ocamlinlinecode{Include\_\allowbreak{}functor\_\allowbreak{}not\_\allowbreak{}last}}}\label{Oxcaml-Include_functor_not_last}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml-Include_functor_not_last--module-Make}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml-Include_functor_not_last-Make]{\ocamlinlinecode{Make}}}\ocamlcodefragment{ (\hyperref[Oxcaml-Include_functor_not_last-Make-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}An \ocamlinlinecode{include functor} that is not the last item of the signature.\end{ocamlindent}% +\medbreak +\label{Oxcaml-Include_functor_not_last--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include functor} \ocamltag{keyword}{module} \ocamltag{keyword}{type} \ocamltag{keyword}{of} \hyperref[Oxcaml-Include_functor_not_last-Make]{\ocamlinlinecode{Make}}\label{Oxcaml-Include_functor_not_last--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml-Include_functor_not_last--type-t]{\ocamlinlinecode{t}}}\\ +\label{Oxcaml-Include_functor_not_last--type-after}\ocamlcodefragment{\ocamltag{keyword}{type} after}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ \input{Oxcaml.F_with.tex} \input{Oxcaml.X_with.tex} diff --git a/test/generators/latex/Oxcaml_impl.md b/test/generators/latex/Oxcaml_impl.md deleted file mode 100644 index e69de29bb2..0000000000 diff --git a/test/generators/latex/Oxcaml_impl.tex b/test/generators/latex/Oxcaml_impl.tex index ef632140c6..2d6d75e5dd 100644 --- a/test/generators/latex/Oxcaml_impl.tex +++ b/test/generators/latex/Oxcaml_impl.tex @@ -44,5 +44,47 @@ \subsubsection{Modes on values\label{Oxcaml_impl--modes-on-values}}% \medbreak \label{Oxcaml_impl--val-mode_multi}\ocamlcodefragment{\ocamltag{keyword}{val} mode\_\allowbreak{}multi : string @ local once \ocamltag{arrow}{$\rightarrow$} string @ local once}\begin{ocamlindent}Multiple modes on argument and return.\end{ocamlindent}% \medbreak +\subsection{Include functor on structures\label{Oxcaml_impl--include-functor-on-structures}}% +\label{Oxcaml_impl--module-Include_functor}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Include_functor]{\ocamlinlinecode{Include\_\allowbreak{}functor}}}\label{Oxcaml_impl-Include_functor}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml_impl-Include_functor--module-Make}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Include_functor-Make]{\ocamlinlinecode{Make}}}\ocamlcodefragment{ (\hyperref[Oxcaml_impl-Include_functor-Make-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}This module demonstrates the \ocamlinlinecode{include functor} functionality. \ocamlinlinecode{Make} uses its argument, so \ocamlinlinecode{included} has to come out equal to \ocamlinlinecode{t} rather than abstract.\end{ocamlindent}% +\medbreak +\label{Oxcaml_impl-Include_functor--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include functor} \hyperref[Oxcaml_impl-Include_functor-Make]{\ocamlinlinecode{Make}}\label{Oxcaml_impl-Include_functor--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml_impl-Include_functor--type-t]{\ocamlinlinecode{t}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml_impl--module-Include_functor_desugared}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Include_functor_desugared]{\ocamlinlinecode{Include\_\allowbreak{}functor\_\allowbreak{}desugared}}}\label{Oxcaml_impl-Include_functor_desugared}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml_impl-Include_functor_desugared--module-Make}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Include_functor_desugared-Make]{\ocamlinlinecode{Make}}}\ocamlcodefragment{ (\hyperref[Oxcaml_impl-Include_functor_desugared-Make-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}This module is the desugared version from above\end{ocamlindent}% +\medbreak +\label{Oxcaml_impl-Include_functor_desugared--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include} \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}\label{Oxcaml_impl-Include_functor_desugared--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml_impl-Include_functor_desugared--type-t]{\ocamlinlinecode{t}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml_impl--module-Resolve_functor}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Resolve_functor]{\ocamlinlinecode{Resolve\_\allowbreak{}functor}}}\label{Oxcaml_impl-Resolve_functor}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml_impl-Resolve_functor--module-F}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Resolve_functor-F]{\ocamlinlinecode{F}}}\ocamlcodefragment{ (\hyperref[Oxcaml_impl-Resolve_functor-F-argument-1-I]{\ocamlinlinecode{I}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\ +\label{Oxcaml_impl-Resolve_functor--module-M}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Resolve_functor-M]{\ocamlinlinecode{M}}}\label{Oxcaml_impl-Resolve_functor-M}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml_impl-Resolve_functor-M--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t = float}\\ +\ocamltag{keyword}{include functor} \hyperref[Oxcaml_impl-Resolve_functor-F]{\ocamlinlinecode{F}}\label{Oxcaml_impl-Resolve_functor-M--type-myt}\ocamlcodefragment{\ocamltag{keyword}{type} myt = \hyperref[Oxcaml_impl-Resolve_functor-M--type-t]{\ocamlinlinecode{t}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml_impl--module-Multiple_include_functors}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Multiple_include_functors]{\ocamlinlinecode{Multiple\_\allowbreak{}include\_\allowbreak{}functors}}}\label{Oxcaml_impl-Multiple_include_functors}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml_impl-Multiple_include_functors--module-First}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Multiple_include_functors-First]{\ocamlinlinecode{First}}}\ocamlcodefragment{ (\hyperref[Oxcaml_impl-Multiple_include_functors-First-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}Two \ocamlinlinecode{include functor}s in the same structure, with an item defined between them.\end{ocamlindent}% +\medbreak +\label{Oxcaml_impl-Multiple_include_functors--module-Second}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Multiple_include_functors-Second]{\ocamlinlinecode{Second}}}\ocamlcodefragment{ (\hyperref[Oxcaml_impl-Multiple_include_functors-Second-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\\ +\label{Oxcaml_impl-Multiple_include_functors--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include functor} \hyperref[Oxcaml_impl-Multiple_include_functors-First]{\ocamlinlinecode{First}}\label{Oxcaml_impl-Multiple_include_functors--type-first}\ocamlcodefragment{\ocamltag{keyword}{type} first = \hyperref[Oxcaml_impl-Multiple_include_functors--type-t]{\ocamlinlinecode{t}}}\\ +\label{Oxcaml_impl-Multiple_include_functors--type-between}\ocamlcodefragment{\ocamltag{keyword}{type} between}\\ +\ocamltag{keyword}{include functor} \hyperref[Oxcaml_impl-Multiple_include_functors-Second]{\ocamlinlinecode{Second}}\label{Oxcaml_impl-Multiple_include_functors--type-second}\ocamlcodefragment{\ocamltag{keyword}{type} second = \hyperref[Oxcaml_impl-Multiple_include_functors--type-first]{\ocamlinlinecode{first}}}\\ +\label{Oxcaml_impl-Multiple_include_functors--type-third}\ocamlcodefragment{\ocamltag{keyword}{type} third = \hyperref[Oxcaml_impl-Multiple_include_functors--type-between]{\ocamlinlinecode{between}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml_impl--module-Include_functor_not_last}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Include_functor_not_last]{\ocamlinlinecode{Include\_\allowbreak{}functor\_\allowbreak{}not\_\allowbreak{}last}}}\label{Oxcaml_impl-Include_functor_not_last}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml_impl-Include_functor_not_last--module-Make}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Include_functor_not_last-Make]{\ocamlinlinecode{Make}}}\ocamlcodefragment{ (\hyperref[Oxcaml_impl-Include_functor_not_last-Make-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}}\begin{ocamlindent}An \ocamlinlinecode{include functor} that is not the last item of the structure.\end{ocamlindent}% +\medbreak +\label{Oxcaml_impl-Include_functor_not_last--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\\ +\ocamltag{keyword}{include functor} \hyperref[Oxcaml_impl-Include_functor_not_last-Make]{\ocamlinlinecode{Make}}\label{Oxcaml_impl-Include_functor_not_last--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml_impl-Include_functor_not_last--type-t]{\ocamlinlinecode{t}}}\\ +\label{Oxcaml_impl-Include_functor_not_last--type-after}\ocamlcodefragment{\ocamltag{keyword}{type} after = string}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ +\label{Oxcaml_impl--module-Anonymous_functor}\ocamlcodefragment{\ocamltag{keyword}{module} \hyperref[Oxcaml_impl-Anonymous_functor]{\ocamlinlinecode{Anonymous\_\allowbreak{}functor}}}\label{Oxcaml_impl-Anonymous_functor}\ocamlcodefragment{ : \ocamltag{keyword}{sig}}\begin{ocamlindent}\label{Oxcaml_impl-Anonymous_functor--type-t}\ocamlcodefragment{\ocamltag{keyword}{type} t}\begin{ocamlindent}The functor is defined inline, so there is no path for odoc to apply: it has to bind the functor to a module first, as it does for every \ocamlinlinecode{include functor} in a signature.\end{ocamlindent}% +\medbreak +\ocamltag{keyword}{include functor} \ocamltag{keyword}{functor} (\hyperref[Oxcaml_impl-Anonymous_functor-argument-1-T]{\ocamlinlinecode{T}} : \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}) \ocamltag{arrow}{$\rightarrow$} \ocamltag{keyword}{sig} .\allowbreak{}.\allowbreak{}.\allowbreak{} \ocamltag{keyword}{end}\label{Oxcaml_impl-Anonymous_functor--type-included}\ocamlcodefragment{\ocamltag{keyword}{type} included = \hyperref[Oxcaml_impl-Anonymous_functor--type-t]{\ocamlinlinecode{t}}}\\ +\end{ocamlindent}% +\ocamlcodefragment{\ocamltag{keyword}{end}}\\ diff --git a/test/generators/link.dune.inc b/test/generators/link.dune.inc index 52ec09429d..f1f4b3dee7 100644 --- a/test/generators/link.dune.inc +++ b/test/generators/link.dune.inc @@ -11956,7 +11956,57 @@ Oxcaml-module-type-S.html.gen Oxcaml-M1.html.gen Oxcaml-M2.html.gen - Oxcaml-M3.html.gen) + Oxcaml-M3.html.gen + Oxcaml-No_include_functor.html.gen + Oxcaml-No_include_functor-Make.html.gen + Oxcaml-No_include_functor-Make-argument-1-T.html.gen + Oxcaml-No_include_functor-T.html.gen + Oxcaml-Include_functor.html.gen + Oxcaml-Include_functor-Make.html.gen + Oxcaml-Include_functor-Make-argument-1-T.html.gen + Oxcaml-Include_functor_argument_shapes.html.gen + Oxcaml-Include_functor_argument_shapes-module-type-Arg.html.gen + Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.html.gen + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.html.gen + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.html.gen + Oxcaml-Include_functor_argument_shapes-Make.html.gen + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.html.gen + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.html.gen + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.html.gen + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.html.gen + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.html.gen + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.html.gen + Oxcaml-Include_functor_argument_shapes-class-class_type.html.gen + Oxcaml-Include_functor_argument_shapes-class-class_.html.gen + Oxcaml-Include_functor_argument_shapes-X.html.gen + Oxcaml-Include_functor_argument_shapes-module-type-S.html.gen + Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.html.gen + Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.html.gen + Oxcaml-Include_functor_argument_shapes-Aliased.html.gen + Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.html.gen + Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.html.gen + Oxcaml-Include_functor_desugared.html.gen + Oxcaml-Include_functor_desugared-Make.html.gen + Oxcaml-Include_functor_desugared-Make-argument-1-T.html.gen + Oxcaml-Include_functor_named_type_desugared.html.gen + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.html.gen + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.html.gen + Oxcaml-Include_functor_named_type.html.gen + Oxcaml-Include_functor_named_type-module-type-MakeType.html.gen + Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.html.gen + Oxcaml-Include_functor_inline.html.gen + Oxcaml-Include_functor_inline-module-type-Make.html.gen + Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.html.gen + Oxcaml-Anonymous_functor.html.gen + Oxcaml-Anonymous_functor_desugared.html.gen + Oxcaml-Multiple_include_functors.html.gen + Oxcaml-Multiple_include_functors-First.html.gen + Oxcaml-Multiple_include_functors-First-argument-1-T.html.gen + Oxcaml-Multiple_include_functors-Second.html.gen + Oxcaml-Multiple_include_functors-Second-argument-1-T.html.gen + Oxcaml-Include_functor_not_last.html.gen + Oxcaml-Include_functor_not_last-Make.html.gen + Oxcaml-Include_functor_not_last-Make-argument-1-T.html.gen) (package odoc) (action (run @@ -12031,146 +12081,1325 @@ (package odoc) (action (diff Oxcaml-M3.html Oxcaml-M3.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-No_include_functor.html Oxcaml-No_include_functor.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-No_include_functor-Make.html + Oxcaml-No_include_functor-Make.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-No_include_functor-Make-argument-1-T.html + Oxcaml-No_include_functor-Make-argument-1-T.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-No_include_functor-T.html + Oxcaml-No_include_functor-T.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-Include_functor.html Oxcaml-Include_functor.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor-Make.html + Oxcaml-Include_functor-Make.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor-Make-argument-1-T.html + Oxcaml-Include_functor-Make-argument-1-T.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes.html + Oxcaml-Include_functor_argument_shapes.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-module-type-Arg.html + Oxcaml-Include_functor_argument_shapes-module-type-Arg.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.html + Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.html + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.html + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Make.html + Oxcaml-Include_functor_argument_shapes-Make.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.html + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.html + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.html + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.html + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.html + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.html + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-class-class_type.html + Oxcaml-Include_functor_argument_shapes-class-class_type.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-class-class_.html + Oxcaml-Include_functor_argument_shapes-class-class_.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-X.html + Oxcaml-Include_functor_argument_shapes-X.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-module-type-S.html + Oxcaml-Include_functor_argument_shapes-module-type-S.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.html + Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.html + Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Aliased.html + Oxcaml-Include_functor_argument_shapes-Aliased.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.html + Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.html + Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_desugared.html + Oxcaml-Include_functor_desugared.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_desugared-Make.html + Oxcaml-Include_functor_desugared-Make.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_desugared-Make-argument-1-T.html + Oxcaml-Include_functor_desugared-Make-argument-1-T.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type_desugared.html + Oxcaml-Include_functor_named_type_desugared.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.html + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.html + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type.html + Oxcaml-Include_functor_named_type.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type-module-type-MakeType.html + Oxcaml-Include_functor_named_type-module-type-MakeType.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.html + Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_inline.html + Oxcaml-Include_functor_inline.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_inline-module-type-Make.html + Oxcaml-Include_functor_inline-module-type-Make.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.html + Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-Anonymous_functor.html Oxcaml-Anonymous_functor.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Anonymous_functor_desugared.html + Oxcaml-Anonymous_functor_desugared.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Multiple_include_functors.html + Oxcaml-Multiple_include_functors.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Multiple_include_functors-First.html + Oxcaml-Multiple_include_functors-First.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Multiple_include_functors-First-argument-1-T.html + Oxcaml-Multiple_include_functors-First-argument-1-T.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Multiple_include_functors-Second.html + Oxcaml-Multiple_include_functors-Second.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Multiple_include_functors-Second-argument-1-T.html + Oxcaml-Multiple_include_functors-Second-argument-1-T.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_not_last.html + Oxcaml-Include_functor_not_last.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_not_last-Make.html + Oxcaml-Include_functor_not_last-Make.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_not_last-Make-argument-1-T.html + Oxcaml-Include_functor_not_last-Make-argument-1-T.html.gen)) + (enabled_if %{ocaml-config:ox}))) + +(subdir + html + (rule + (target oxcaml.targets.gen) + (package odoc) + (action + (with-outputs-to + oxcaml.targets.gen + (run odoc html-targets -o . %{dep:../oxcaml.odocl} --flat))) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff oxcaml.targets oxcaml.targets.gen)) + (enabled_if %{ocaml-config:ox}))) + +(subdir + latex + (rule + (targets + Oxcaml.tex.gen + Oxcaml.F_with.tex.gen + Oxcaml.X_with.tex.gen + Oxcaml.M1.tex.gen) + (package odoc) + (action + (run odoc latex-generate -o . --extra-suffix gen %{dep:../oxcaml.odocl})) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.tex Oxcaml.tex.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.F_with.tex Oxcaml.F_with.tex.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.X_with.tex Oxcaml.X_with.tex.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.M1.tex Oxcaml.M1.tex.gen)) + (enabled_if %{ocaml-config:ox}))) + +(subdir + latex + (rule + (target oxcaml.targets.gen) + (package odoc) + (action + (with-outputs-to + oxcaml.targets.gen + (run odoc latex-targets -o . %{dep:../oxcaml.odocl}))) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff oxcaml.targets oxcaml.targets.gen)) + (enabled_if %{ocaml-config:ox}))) + +(subdir + man + (rule + (targets + Oxcaml.3o.gen + Oxcaml.M_with.3o.gen + Oxcaml.F_with.3o.gen + Oxcaml.X_with.3o.gen + Oxcaml.M1.3o.gen + Oxcaml.M2.3o.gen + Oxcaml.M3.3o.gen + Oxcaml.No_include_functor.3o.gen + Oxcaml.No_include_functor.Make.3o.gen + Oxcaml.No_include_functor.T.3o.gen + Oxcaml.Include_functor.3o.gen + Oxcaml.Include_functor.Make.3o.gen + Oxcaml.Include_functor_argument_shapes.3o.gen + Oxcaml.Include_functor_argument_shapes.Make.3o.gen + Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_type.3o.gen + Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_name.3o.gen + Oxcaml.Include_functor_argument_shapes.class-class_type.3o.gen + Oxcaml.Include_functor_argument_shapes.class-class_.3o.gen + Oxcaml.Include_functor_argument_shapes.X.3o.gen + Oxcaml.Include_functor_argument_shapes.class-output_class_via_type.3o.gen + Oxcaml.Include_functor_argument_shapes.class-output_class_via_name.3o.gen + Oxcaml.Include_functor_argument_shapes.Aliased.3o.gen + Oxcaml.Include_functor_argument_shapes.Aliased.To_include_module.3o.gen + Oxcaml.Include_functor_desugared.3o.gen + Oxcaml.Include_functor_desugared.Make.3o.gen + Oxcaml.Include_functor_named_type_desugared.3o.gen + Oxcaml.Include_functor_named_type.3o.gen + Oxcaml.Include_functor_inline.3o.gen + Oxcaml.Anonymous_functor.3o.gen + Oxcaml.Anonymous_functor_desugared.3o.gen + Oxcaml.Multiple_include_functors.3o.gen + Oxcaml.Multiple_include_functors.First.3o.gen + Oxcaml.Multiple_include_functors.Second.3o.gen + Oxcaml.Include_functor_not_last.3o.gen + Oxcaml.Include_functor_not_last.Make.3o.gen) + (package odoc) + (action + (run odoc man-generate -o . --extra-suffix gen %{dep:../oxcaml.odocl})) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.3o Oxcaml.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.M_with.3o Oxcaml.M_with.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.F_with.3o Oxcaml.F_with.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.X_with.3o Oxcaml.X_with.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.M1.3o Oxcaml.M1.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.M2.3o Oxcaml.M2.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.M3.3o Oxcaml.M3.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.No_include_functor.3o Oxcaml.No_include_functor.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.No_include_functor.Make.3o + Oxcaml.No_include_functor.Make.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.No_include_functor.T.3o Oxcaml.No_include_functor.T.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.Include_functor.3o Oxcaml.Include_functor.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.Include_functor.Make.3o Oxcaml.Include_functor.Make.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.3o + Oxcaml.Include_functor_argument_shapes.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.Make.3o + Oxcaml.Include_functor_argument_shapes.Make.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_type.3o + Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_type.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_name.3o + Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_name.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.class-class_type.3o + Oxcaml.Include_functor_argument_shapes.class-class_type.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.class-class_.3o + Oxcaml.Include_functor_argument_shapes.class-class_.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.X.3o + Oxcaml.Include_functor_argument_shapes.X.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.class-output_class_via_type.3o + Oxcaml.Include_functor_argument_shapes.class-output_class_via_type.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.class-output_class_via_name.3o + Oxcaml.Include_functor_argument_shapes.class-output_class_via_name.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.Aliased.3o + Oxcaml.Include_functor_argument_shapes.Aliased.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_argument_shapes.Aliased.To_include_module.3o + Oxcaml.Include_functor_argument_shapes.Aliased.To_include_module.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_desugared.3o + Oxcaml.Include_functor_desugared.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_desugared.Make.3o + Oxcaml.Include_functor_desugared.Make.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_named_type_desugared.3o + Oxcaml.Include_functor_named_type_desugared.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_named_type.3o + Oxcaml.Include_functor_named_type.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_inline.3o + Oxcaml.Include_functor_inline.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.Anonymous_functor.3o Oxcaml.Anonymous_functor.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Anonymous_functor_desugared.3o + Oxcaml.Anonymous_functor_desugared.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Multiple_include_functors.3o + Oxcaml.Multiple_include_functors.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Multiple_include_functors.First.3o + Oxcaml.Multiple_include_functors.First.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Multiple_include_functors.Second.3o + Oxcaml.Multiple_include_functors.Second.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_not_last.3o + Oxcaml.Include_functor_not_last.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml.Include_functor_not_last.Make.3o + Oxcaml.Include_functor_not_last.Make.3o.gen)) (enabled_if %{ocaml-config:ox}))) (subdir - html + man + (rule + (target oxcaml.targets.gen) + (package odoc) + (action + (with-outputs-to + oxcaml.targets.gen + (run odoc man-targets -o . %{dep:../oxcaml.odocl}))) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff oxcaml.targets oxcaml.targets.gen)) + (enabled_if %{ocaml-config:ox}))) + +(subdir + markdown + (rule + (targets + Oxcaml.md.gen + Oxcaml-M_with.md.gen + Oxcaml-module-type-Arg_with.md.gen + Oxcaml-F_with.md.gen + Oxcaml-F_with-argument-1-X.md.gen + Oxcaml-X_with.md.gen + Oxcaml-module-type-S.md.gen + Oxcaml-M1.md.gen + Oxcaml-M2.md.gen + Oxcaml-M3.md.gen + Oxcaml-No_include_functor.md.gen + Oxcaml-No_include_functor-Make.md.gen + Oxcaml-No_include_functor-Make-argument-1-T.md.gen + Oxcaml-No_include_functor-T.md.gen + Oxcaml-Include_functor.md.gen + Oxcaml-Include_functor-Make.md.gen + Oxcaml-Include_functor-Make-argument-1-T.md.gen + Oxcaml-Include_functor_argument_shapes.md.gen + Oxcaml-Include_functor_argument_shapes-module-type-Arg.md.gen + Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.md.gen + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.md.gen + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.md.gen + Oxcaml-Include_functor_argument_shapes-Make.md.gen + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.md.gen + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.md.gen + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.md.gen + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.md.gen + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.md.gen + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.md.gen + Oxcaml-Include_functor_argument_shapes-class-class_type.md.gen + Oxcaml-Include_functor_argument_shapes-class-class_.md.gen + Oxcaml-Include_functor_argument_shapes-X.md.gen + Oxcaml-Include_functor_argument_shapes-module-type-S.md.gen + Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.md.gen + Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.md.gen + Oxcaml-Include_functor_argument_shapes-Aliased.md.gen + Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.md.gen + Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.md.gen + Oxcaml-Include_functor_desugared.md.gen + Oxcaml-Include_functor_desugared-Make.md.gen + Oxcaml-Include_functor_desugared-Make-argument-1-T.md.gen + Oxcaml-Include_functor_named_type_desugared.md.gen + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.md.gen + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.md.gen + Oxcaml-Include_functor_named_type.md.gen + Oxcaml-Include_functor_named_type-module-type-MakeType.md.gen + Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.md.gen + Oxcaml-Include_functor_inline.md.gen + Oxcaml-Include_functor_inline-module-type-Make.md.gen + Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.md.gen + Oxcaml-Anonymous_functor.md.gen + Oxcaml-Anonymous_functor_desugared.md.gen + Oxcaml-Multiple_include_functors.md.gen + Oxcaml-Multiple_include_functors-First.md.gen + Oxcaml-Multiple_include_functors-First-argument-1-T.md.gen + Oxcaml-Multiple_include_functors-Second.md.gen + Oxcaml-Multiple_include_functors-Second-argument-1-T.md.gen + Oxcaml-Include_functor_not_last.md.gen + Oxcaml-Include_functor_not_last-Make.md.gen + Oxcaml-Include_functor_not_last-Make-argument-1-T.md.gen) + (package odoc) + (action + (run + odoc + markdown-generate + -o + . + --extra-suffix + gen + %{dep:../oxcaml.odocl})) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml.md Oxcaml.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-M_with.md Oxcaml-M_with.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-module-type-Arg_with.md Oxcaml-module-type-Arg_with.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-F_with.md Oxcaml-F_with.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-F_with-argument-1-X.md Oxcaml-F_with-argument-1-X.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-X_with.md Oxcaml-X_with.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-module-type-S.md Oxcaml-module-type-S.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-M1.md Oxcaml-M1.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-M2.md Oxcaml-M2.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-M3.md Oxcaml-M3.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-No_include_functor.md Oxcaml-No_include_functor.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-No_include_functor-Make.md + Oxcaml-No_include_functor-Make.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-No_include_functor-Make-argument-1-T.md + Oxcaml-No_include_functor-Make-argument-1-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-No_include_functor-T.md Oxcaml-No_include_functor-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-Include_functor.md Oxcaml-Include_functor.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-Include_functor-Make.md Oxcaml-Include_functor-Make.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor-Make-argument-1-T.md + Oxcaml-Include_functor-Make-argument-1-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes.md + Oxcaml-Include_functor_argument_shapes.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-module-type-Arg.md + Oxcaml-Include_functor_argument_shapes-module-type-Arg.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.md + Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.md + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.md + Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_argument_shapes-Make.md + Oxcaml-Include_functor_argument_shapes-Make.md.gen)) + (enabled_if %{ocaml-config:ox})) (rule - (target oxcaml.targets.gen) + (alias runtest) (package odoc) (action - (with-outputs-to - oxcaml.targets.gen - (run odoc html-targets -o . %{dep:../oxcaml.odocl} --flat))) + (diff + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.md + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff oxcaml.targets oxcaml.targets.gen)) - (enabled_if %{ocaml-config:ox}))) - -(subdir - latex + (diff + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.md + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.md.gen)) + (enabled_if %{ocaml-config:ox})) (rule - (targets - Oxcaml.tex.gen - Oxcaml.F_with.tex.gen - Oxcaml.X_with.tex.gen - Oxcaml.M1.tex.gen) + (alias runtest) (package odoc) (action - (run odoc latex-generate -o . --extra-suffix gen %{dep:../oxcaml.odocl})) + (diff + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.md + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.tex Oxcaml.tex.gen)) + (diff + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.md + Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.F_with.tex Oxcaml.F_with.tex.gen)) + (diff + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.md + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.X_with.tex Oxcaml.X_with.tex.gen)) + (diff + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.md + Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.M1.tex Oxcaml.M1.tex.gen)) - (enabled_if %{ocaml-config:ox}))) - -(subdir - latex + (diff + Oxcaml-Include_functor_argument_shapes-class-class_type.md + Oxcaml-Include_functor_argument_shapes-class-class_type.md.gen)) + (enabled_if %{ocaml-config:ox})) (rule - (target oxcaml.targets.gen) + (alias runtest) (package odoc) (action - (with-outputs-to - oxcaml.targets.gen - (run odoc latex-targets -o . %{dep:../oxcaml.odocl}))) + (diff + Oxcaml-Include_functor_argument_shapes-class-class_.md + Oxcaml-Include_functor_argument_shapes-class-class_.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff oxcaml.targets oxcaml.targets.gen)) - (enabled_if %{ocaml-config:ox}))) - -(subdir - man + (diff + Oxcaml-Include_functor_argument_shapes-X.md + Oxcaml-Include_functor_argument_shapes-X.md.gen)) + (enabled_if %{ocaml-config:ox})) (rule - (targets - Oxcaml.3o.gen - Oxcaml.M_with.3o.gen - Oxcaml.F_with.3o.gen - Oxcaml.X_with.3o.gen - Oxcaml.M1.3o.gen - Oxcaml.M2.3o.gen - Oxcaml.M3.3o.gen) + (alias runtest) (package odoc) (action - (run odoc man-generate -o . --extra-suffix gen %{dep:../oxcaml.odocl})) + (diff + Oxcaml-Include_functor_argument_shapes-module-type-S.md + Oxcaml-Include_functor_argument_shapes-module-type-S.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.3o Oxcaml.3o.gen)) + (diff + Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.md + Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.M_with.3o Oxcaml.M_with.3o.gen)) + (diff + Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.md + Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.F_with.3o Oxcaml.F_with.3o.gen)) + (diff + Oxcaml-Include_functor_argument_shapes-Aliased.md + Oxcaml-Include_functor_argument_shapes-Aliased.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.X_with.3o Oxcaml.X_with.3o.gen)) + (diff + Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.md + Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.M1.3o Oxcaml.M1.3o.gen)) + (diff + Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.md + Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.M2.3o Oxcaml.M2.3o.gen)) + (diff + Oxcaml-Include_functor_desugared.md + Oxcaml-Include_functor_desugared.md.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.M3.3o Oxcaml.M3.3o.gen)) + (diff + Oxcaml-Include_functor_desugared-Make.md + Oxcaml-Include_functor_desugared-Make.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_desugared-Make-argument-1-T.md + Oxcaml-Include_functor_desugared-Make-argument-1-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type_desugared.md + Oxcaml-Include_functor_named_type_desugared.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.md + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.md + Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type.md + Oxcaml-Include_functor_named_type.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type-module-type-MakeType.md + Oxcaml-Include_functor_named_type-module-type-MakeType.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.md + Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_inline.md + Oxcaml-Include_functor_inline.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_inline-module-type-Make.md + Oxcaml-Include_functor_inline-module-type-Make.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.md + Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml-Anonymous_functor.md Oxcaml-Anonymous_functor.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Anonymous_functor_desugared.md + Oxcaml-Anonymous_functor_desugared.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Multiple_include_functors.md + Oxcaml-Multiple_include_functors.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Multiple_include_functors-First.md + Oxcaml-Multiple_include_functors-First.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Multiple_include_functors-First-argument-1-T.md + Oxcaml-Multiple_include_functors-First-argument-1-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Multiple_include_functors-Second.md + Oxcaml-Multiple_include_functors-Second.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Multiple_include_functors-Second-argument-1-T.md + Oxcaml-Multiple_include_functors-Second-argument-1-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_not_last.md + Oxcaml-Include_functor_not_last.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_not_last-Make.md + Oxcaml-Include_functor_not_last-Make.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml-Include_functor_not_last-Make-argument-1-T.md + Oxcaml-Include_functor_not_last-Make-argument-1-T.md.gen)) (enabled_if %{ocaml-config:ox}))) (subdir - man + markdown (rule (target oxcaml.targets.gen) (package odoc) (action (with-outputs-to oxcaml.targets.gen - (run odoc man-targets -o . %{dep:../oxcaml.odocl}))) + (run odoc markdown-targets -o . %{dep:../oxcaml.odocl}))) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) @@ -12180,145 +13409,213 @@ (enabled_if %{ocaml-config:ox}))) (subdir - markdown + html (rule (targets - Oxcaml.md.gen - Oxcaml-M_with.md.gen - Oxcaml-module-type-Arg_with.md.gen - Oxcaml-F_with.md.gen - Oxcaml-F_with-argument-1-X.md.gen - Oxcaml-X_with.md.gen - Oxcaml-module-type-S.md.gen - Oxcaml-M1.md.gen - Oxcaml-M2.md.gen - Oxcaml-M3.md.gen) + Oxcaml_impl.html.gen + Oxcaml_impl-To_be_included.html.gen + Oxcaml_impl-Including.html.gen + Oxcaml_impl-Include_functor.html.gen + Oxcaml_impl-Include_functor-Make.html.gen + Oxcaml_impl-Include_functor-Make-argument-1-T.html.gen + Oxcaml_impl-Include_functor_desugared.html.gen + Oxcaml_impl-Include_functor_desugared-Make.html.gen + Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.html.gen + Oxcaml_impl-Resolve_functor.html.gen + Oxcaml_impl-Resolve_functor-F.html.gen + Oxcaml_impl-Resolve_functor-F-argument-1-I.html.gen + Oxcaml_impl-Resolve_functor-M.html.gen + Oxcaml_impl-Multiple_include_functors.html.gen + Oxcaml_impl-Multiple_include_functors-First.html.gen + Oxcaml_impl-Multiple_include_functors-First-argument-1-T.html.gen + Oxcaml_impl-Multiple_include_functors-Second.html.gen + Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.html.gen + Oxcaml_impl-Include_functor_not_last.html.gen + Oxcaml_impl-Include_functor_not_last-Make.html.gen + Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.html.gen + Oxcaml_impl-Anonymous_functor.html.gen) + (package odoc) + (action + (run + odoc + html-generate + --indent + --flat + --extra-suffix + gen + -o + . + %{dep:../oxcaml_impl.odocl})) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml_impl.html Oxcaml_impl.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml_impl-To_be_included.html Oxcaml_impl-To_be_included.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml_impl-Including.html Oxcaml_impl-Including.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Include_functor.html + Oxcaml_impl-Include_functor.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Include_functor-Make.html + Oxcaml_impl-Include_functor-Make.html.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) (package odoc) (action - (run - odoc - markdown-generate - -o - . - --extra-suffix - gen - %{dep:../oxcaml.odocl})) + (diff + Oxcaml_impl-Include_functor-Make-argument-1-T.html + Oxcaml_impl-Include_functor-Make-argument-1-T.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml.md Oxcaml.md.gen)) + (diff + Oxcaml_impl-Include_functor_desugared.html + Oxcaml_impl-Include_functor_desugared.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml-M_with.md Oxcaml-M_with.md.gen)) + (diff + Oxcaml_impl-Include_functor_desugared-Make.html + Oxcaml_impl-Include_functor_desugared-Make.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml-module-type-Arg_with.md Oxcaml-module-type-Arg_with.md.gen)) + (diff + Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.html + Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml-F_with.md Oxcaml-F_with.md.gen)) + (diff + Oxcaml_impl-Resolve_functor.html + Oxcaml_impl-Resolve_functor.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml-F_with-argument-1-X.md Oxcaml-F_with-argument-1-X.md.gen)) + (diff + Oxcaml_impl-Resolve_functor-F.html + Oxcaml_impl-Resolve_functor-F.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml-X_with.md Oxcaml-X_with.md.gen)) + (diff + Oxcaml_impl-Resolve_functor-F-argument-1-I.html + Oxcaml_impl-Resolve_functor-F-argument-1-I.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml-module-type-S.md Oxcaml-module-type-S.md.gen)) + (diff + Oxcaml_impl-Resolve_functor-M.html + Oxcaml_impl-Resolve_functor-M.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml-M1.md Oxcaml-M1.md.gen)) + (diff + Oxcaml_impl-Multiple_include_functors.html + Oxcaml_impl-Multiple_include_functors.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml-M2.md Oxcaml-M2.md.gen)) + (diff + Oxcaml_impl-Multiple_include_functors-First.html + Oxcaml_impl-Multiple_include_functors-First.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml-M3.md Oxcaml-M3.md.gen)) - (enabled_if %{ocaml-config:ox}))) - -(subdir - markdown + (diff + Oxcaml_impl-Multiple_include_functors-First-argument-1-T.html + Oxcaml_impl-Multiple_include_functors-First-argument-1-T.html.gen)) + (enabled_if %{ocaml-config:ox})) (rule - (target oxcaml.targets.gen) + (alias runtest) (package odoc) (action - (with-outputs-to - oxcaml.targets.gen - (run odoc markdown-targets -o . %{dep:../oxcaml.odocl}))) + (diff + Oxcaml_impl-Multiple_include_functors-Second.html + Oxcaml_impl-Multiple_include_functors-Second.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff oxcaml.targets oxcaml.targets.gen)) - (enabled_if %{ocaml-config:ox}))) - -(subdir - html + (diff + Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.html + Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.html.gen)) + (enabled_if %{ocaml-config:ox})) (rule - (targets - Oxcaml_impl.html.gen - Oxcaml_impl-To_be_included.html.gen - Oxcaml_impl-Including.html.gen) + (alias runtest) (package odoc) (action - (run - odoc - html-generate - --indent - --flat - --extra-suffix - gen - -o - . - %{dep:../oxcaml_impl.odocl})) + (diff + Oxcaml_impl-Include_functor_not_last.html + Oxcaml_impl-Include_functor_not_last.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml_impl.html Oxcaml_impl.html.gen)) + (diff + Oxcaml_impl-Include_functor_not_last-Make.html + Oxcaml_impl-Include_functor_not_last-Make.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml_impl-To_be_included.html Oxcaml_impl-To_be_included.html.gen)) + (diff + Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.html + Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.html.gen)) (enabled_if %{ocaml-config:ox})) (rule (alias runtest) (package odoc) (action - (diff Oxcaml_impl-Including.html Oxcaml_impl-Including.html.gen)) + (diff + Oxcaml_impl-Anonymous_functor.html + Oxcaml_impl-Anonymous_functor.html.gen)) (enabled_if %{ocaml-config:ox}))) (subdir @@ -12383,7 +13680,20 @@ (targets Oxcaml_impl.3o.gen Oxcaml_impl.To_be_included.3o.gen - Oxcaml_impl.Including.3o.gen) + Oxcaml_impl.Including.3o.gen + Oxcaml_impl.Include_functor.3o.gen + Oxcaml_impl.Include_functor.Make.3o.gen + Oxcaml_impl.Include_functor_desugared.3o.gen + Oxcaml_impl.Include_functor_desugared.Make.3o.gen + Oxcaml_impl.Resolve_functor.3o.gen + Oxcaml_impl.Resolve_functor.F.3o.gen + Oxcaml_impl.Resolve_functor.M.3o.gen + Oxcaml_impl.Multiple_include_functors.3o.gen + Oxcaml_impl.Multiple_include_functors.First.3o.gen + Oxcaml_impl.Multiple_include_functors.Second.3o.gen + Oxcaml_impl.Include_functor_not_last.3o.gen + Oxcaml_impl.Include_functor_not_last.Make.3o.gen + Oxcaml_impl.Anonymous_functor.3o.gen) (package odoc) (action (run @@ -12412,6 +13722,106 @@ (package odoc) (action (diff Oxcaml_impl.Including.3o Oxcaml_impl.Including.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml_impl.Include_functor.3o Oxcaml_impl.Include_functor.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Include_functor.Make.3o + Oxcaml_impl.Include_functor.Make.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Include_functor_desugared.3o + Oxcaml_impl.Include_functor_desugared.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Include_functor_desugared.Make.3o + Oxcaml_impl.Include_functor_desugared.Make.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml_impl.Resolve_functor.3o Oxcaml_impl.Resolve_functor.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Resolve_functor.F.3o + Oxcaml_impl.Resolve_functor.F.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Resolve_functor.M.3o + Oxcaml_impl.Resolve_functor.M.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Multiple_include_functors.3o + Oxcaml_impl.Multiple_include_functors.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Multiple_include_functors.First.3o + Oxcaml_impl.Multiple_include_functors.First.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Multiple_include_functors.Second.3o + Oxcaml_impl.Multiple_include_functors.Second.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Include_functor_not_last.3o + Oxcaml_impl.Include_functor_not_last.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Include_functor_not_last.Make.3o + Oxcaml_impl.Include_functor_not_last.Make.3o.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl.Anonymous_functor.3o + Oxcaml_impl.Anonymous_functor.3o.gen)) (enabled_if %{ocaml-config:ox}))) (subdir @@ -12437,7 +13847,26 @@ (targets Oxcaml_impl.md.gen Oxcaml_impl-To_be_included.md.gen - Oxcaml_impl-Including.md.gen) + Oxcaml_impl-Including.md.gen + Oxcaml_impl-Include_functor.md.gen + Oxcaml_impl-Include_functor-Make.md.gen + Oxcaml_impl-Include_functor-Make-argument-1-T.md.gen + Oxcaml_impl-Include_functor_desugared.md.gen + Oxcaml_impl-Include_functor_desugared-Make.md.gen + Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.md.gen + Oxcaml_impl-Resolve_functor.md.gen + Oxcaml_impl-Resolve_functor-F.md.gen + Oxcaml_impl-Resolve_functor-F-argument-1-I.md.gen + Oxcaml_impl-Resolve_functor-M.md.gen + Oxcaml_impl-Multiple_include_functors.md.gen + Oxcaml_impl-Multiple_include_functors-First.md.gen + Oxcaml_impl-Multiple_include_functors-First-argument-1-T.md.gen + Oxcaml_impl-Multiple_include_functors-Second.md.gen + Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.md.gen + Oxcaml_impl-Include_functor_not_last.md.gen + Oxcaml_impl-Include_functor_not_last-Make.md.gen + Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.md.gen + Oxcaml_impl-Anonymous_functor.md.gen) (package odoc) (action (run @@ -12466,6 +13895,154 @@ (package odoc) (action (diff Oxcaml_impl-Including.md Oxcaml_impl-Including.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml_impl-Include_functor.md Oxcaml_impl-Include_functor.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Include_functor-Make.md + Oxcaml_impl-Include_functor-Make.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Include_functor-Make-argument-1-T.md + Oxcaml_impl-Include_functor-Make-argument-1-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Include_functor_desugared.md + Oxcaml_impl-Include_functor_desugared.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Include_functor_desugared-Make.md + Oxcaml_impl-Include_functor_desugared-Make.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.md + Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff Oxcaml_impl-Resolve_functor.md Oxcaml_impl-Resolve_functor.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Resolve_functor-F.md + Oxcaml_impl-Resolve_functor-F.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Resolve_functor-F-argument-1-I.md + Oxcaml_impl-Resolve_functor-F-argument-1-I.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Resolve_functor-M.md + Oxcaml_impl-Resolve_functor-M.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Multiple_include_functors.md + Oxcaml_impl-Multiple_include_functors.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Multiple_include_functors-First.md + Oxcaml_impl-Multiple_include_functors-First.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Multiple_include_functors-First-argument-1-T.md + Oxcaml_impl-Multiple_include_functors-First-argument-1-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Multiple_include_functors-Second.md + Oxcaml_impl-Multiple_include_functors-Second.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.md + Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Include_functor_not_last.md + Oxcaml_impl-Include_functor_not_last.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Include_functor_not_last-Make.md + Oxcaml_impl-Include_functor_not_last-Make.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.md + Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.md.gen)) + (enabled_if %{ocaml-config:ox})) + (rule + (alias runtest) + (package odoc) + (action + (diff + Oxcaml_impl-Anonymous_functor.md + Oxcaml_impl-Anonymous_functor.md.gen)) (enabled_if %{ocaml-config:ox}))) (subdir diff --git a/test/generators/man/Oxcaml.3o b/test/generators/man/Oxcaml.3o index 29463c801c..e182ef77f8 100644 --- a/test/generators/man/Oxcaml.3o +++ b/test/generators/man/Oxcaml.3o @@ -1197,4 +1197,29 @@ fn_both : int @ local \f[CB]\->\fR int @ local; .ti +4 (* GADT constructor *) .br - +.sp +.in 3 +\fB16 Include functor on signatures\fR +.in +.sp +\f[CB]module\fR No_include_functor : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Include_functor : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Include_functor_argument_shapes : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Include_functor_desugared : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Include_functor_named_type_desugared : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Include_functor_named_type : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Include_functor_inline : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Anonymous_functor : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Anonymous_functor_desugared : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Multiple_include_functors : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Include_functor_not_last : \f[CB]sig\fR \.\.\. \f[CB]end\fR diff --git a/test/generators/man/Oxcaml.Anonymous_functor.3o b/test/generators/man/Oxcaml.Anonymous_functor.3o new file mode 100644 index 0000000000..bd7cafd565 --- /dev/null +++ b/test/generators/man/Oxcaml.Anonymous_functor.3o @@ -0,0 +1,21 @@ + +.TH Anonymous_functor 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Anonymous_functor +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.Anonymous_functor\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]type\fR t +.fi +.br +.ti +2 +In this test case the functor is defined inline +.nf +.sp +\f[CB]type\fR included diff --git a/test/generators/man/Oxcaml.Anonymous_functor_desugared.3o b/test/generators/man/Oxcaml.Anonymous_functor_desugared.3o new file mode 100644 index 0000000000..75da4fb4d0 --- /dev/null +++ b/test/generators/man/Oxcaml.Anonymous_functor_desugared.3o @@ -0,0 +1,16 @@ + +.TH Anonymous_functor_desugared 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Anonymous_functor_desugared +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.Anonymous_functor_desugared\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]type\fR t +.sp +\f[CB]type\fR included diff --git a/test/generators/man/Oxcaml.Include_functor.3o b/test/generators/man/Oxcaml.Include_functor.3o new file mode 100644 index 0000000000..1b7792e54d --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor.3o @@ -0,0 +1,23 @@ + +.TH Include_functor 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.Include_functor\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR Make (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.fi +.br +.ti +2 +Module which defines a functor and includes it via module type of +.nf +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR included = t diff --git a/test/generators/man/Oxcaml.Include_functor.Make.3o b/test/generators/man/Oxcaml.Include_functor.Make.3o new file mode 100644 index 0000000000..699eef489a --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor.Make.3o @@ -0,0 +1,33 @@ + +.TH Make 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor\.Make +.SH Synopsis +.sp +.in 2 +\fBModule Include_functor\.Make\fR +.in +.sp +.fi +Module which defines a functor and includes it via module type of +.nf +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR included = T\.t diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.3o new file mode 100644 index 0000000000..1362956c40 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.3o @@ -0,0 +1,148 @@ + +.TH Include_functor_argument_shapes 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.Include_functor_argument_shapes\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR \f[CB]type\fR Arg = \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.sp +.ti +2 +\f[CB]type\fR 'a p +.sp +.ti +2 +\f[CB]type\fR _ anon +.sp +.ti +2 +\f[CB]module\fR X : \f[CB]sig\fR +.br +.ti +4 +\f[CB]type\fR v +.br +.ti +2 +\f[CB]end\fR +.sp +.ti +2 +\f[CB]module\fR \f[CB]type\fR S +.sp +.ti +2 +\f[CB]val\fR via_module_type_include : unit +.sp +.ti +2 +\f[CB]val\fR via_module_include : unit +.sp +.ti +2 +\f[CB]class\fR class_type : \f[CB]object\fR +.br +.ti +4 +\f[CB]val\fR content : int +.br +.ti +2 +\f[CB]end\fR +.sp +.ti +2 +\f[CB]class\fR class_ : \f[CB]object\fR +.br +.ti +4 +\f[CB]val\fR content : int +.br +.ti +2 +\f[CB]end\fR +.br +\f[CB]end\fR +.fi +.br +.ti +2 +Everything the expansion of the functor can inherit from its argument: types, including parameterised and anonymously parameterised ones, submodules, and module types\. +.nf +.sp +\f[CB]module\fR Make (T : Arg) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]class\fR class_type : \f[CB]object\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]class\fR class_ : class_type +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR 'a p +.sp +\f[CB]type\fR _ anon +.sp +\f[CB]module\fR X : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR \f[CB]type\fR S = \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR u +.br +\f[CB]end\fR +.sp +\f[CB]val\fR via_module_type_include : unit +.sp +\f[CB]val\fR via_module_include : unit +.sp +\f[CB]type\fR included = t +.fi +.br +.ti +2 +No parameters, so the alias odoc puts in the synthetic module is a bare type t = t\. +.nf +.sp +\f[CB]type\fR applied = int p +.fi +.br +.ti +2 +A named parameter, which the alias threads through as type 'a p = 'a p\. +.nf +.sp +\f[CB]type\fR anonymous = bool anon +.fi +.br +.ti +2 +An anonymous parameter: _ gives the alias no name to mention on the right, so one is invented, as type 'a0 anon = 'a0 anon\. +.nf +.sp +\f[CB]type\fR from_module = X\.v +.fi +.br +.ti +2 +Reached through a submodule of the argument, aliased as module X = X\. +.nf +.sp +\f[CB]module\fR \f[CB]type\fR Reexported = S +.fi +.br +.ti +2 +A module type of the argument, aliased as a path to it\. +.nf +.sp +\f[CB]class\fR output_class_via_type : BODY__3\.class_type +.fi +.br +.ti +2 +A class whose type comes from an explicitely named class type +.nf +.sp +\f[CB]class\fR output_class_via_name : BODY__3\.class_ +.fi +.br +.ti +2 +A class whose type comes from the name of a class +.nf +.sp +\f[CB]module\fR Aliased : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.fi +.br +.ti +2 +The input module itself\. It should contain everything from the top level module +.nf + diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.Aliased.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.Aliased.3o new file mode 100644 index 0000000000..774261761c --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.Aliased.3o @@ -0,0 +1,43 @@ + +.TH Aliased 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes\.Aliased +.SH Synopsis +.sp +.in 2 +\fBModule Include_functor_argument_shapes\.Aliased\fR +.in +.sp +.fi +The input module itself\. It should contain everything from the top level module +.nf +.SH Documentation +.sp +.nf +\f[CB]module\fR \f[CB]type\fR Arg = Arg +.fi +.br +.ti +2 +Everything the expansion of the functor can inherit from its argument: types, including parameterised and anonymously parameterised ones, submodules, and module types\. +.nf +.sp +\f[CB]module\fR Make = Make +.sp +\f[CB]module\fR \f[CB]type\fR To_include_module_type = \f[CB]sig\fR +.br +.ti +2 +\f[CB]val\fR via_module_type_include : unit +.br +\f[CB]end\fR +.sp +\f[CB]module\fR To_include_module : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]type\fR t = t +.sp +\f[CB]type\fR 'a p = \f[CB]'a\fR p +.sp +\f[CB]type\fR 'a0 anon = \f[CB]'a0\fR anon +.sp +\f[CB]module\fR X = X +.sp +\f[CB]module\fR \f[CB]type\fR S = S diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.Aliased.To_include_module.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.Aliased.To_include_module.3o new file mode 100644 index 0000000000..a6784e9c00 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.Aliased.To_include_module.3o @@ -0,0 +1,14 @@ + +.TH To_include_module 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes\.Aliased\.To_include_module +.SH Synopsis +.sp +.in 2 +\fBModule Aliased\.To_include_module\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]val\fR via_module_include : unit diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.Make.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.Make.3o new file mode 100644 index 0000000000..9829258d88 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.Make.3o @@ -0,0 +1,127 @@ + +.TH Make 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes\.Make +.SH Synopsis +.sp +.in 2 +\fBModule Include_functor_argument_shapes\.Make\fR +.in +.sp +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.sp +.ti +2 +\f[CB]type\fR 'a p +.sp +.ti +2 +\f[CB]type\fR _ anon +.sp +.ti +2 +\f[CB]module\fR X : \f[CB]sig\fR +.br +.ti +4 +\f[CB]type\fR v +.br +.ti +2 +\f[CB]end\fR +.sp +.ti +2 +\f[CB]module\fR \f[CB]type\fR S +.sp +.ti +2 +\f[CB]val\fR via_module_type_include : unit +.sp +.ti +2 +\f[CB]val\fR via_module_include : unit +.sp +.ti +2 +\f[CB]class\fR class_type : \f[CB]object\fR +.br +.ti +4 +\f[CB]val\fR content : int +.br +.ti +2 +\f[CB]end\fR +.sp +.ti +2 +\f[CB]class\fR class_ : \f[CB]object\fR +.br +.ti +4 +\f[CB]val\fR content : int +.br +.ti +2 +\f[CB]end\fR +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR included = T\.t +.fi +.br +.ti +2 +No parameters, so the alias odoc puts in the synthetic module is a bare type t = t\. +.nf +.sp +\f[CB]type\fR applied = int T\.p +.fi +.br +.ti +2 +A named parameter, which the alias threads through as type 'a p = 'a p\. +.nf +.sp +\f[CB]type\fR anonymous = bool T\.anon +.fi +.br +.ti +2 +An anonymous parameter: _ gives the alias no name to mention on the right, so one is invented, as type 'a0 anon = 'a0 anon\. +.nf +.sp +\f[CB]type\fR from_module = T\.X\.v +.fi +.br +.ti +2 +Reached through a submodule of the argument, aliased as module X = X\. +.nf +.sp +\f[CB]module\fR \f[CB]type\fR Reexported = T\.S +.fi +.br +.ti +2 +A module type of the argument, aliased as a path to it\. +.nf +.sp +\f[CB]class\fR output_class_via_type : T\.class_type +.fi +.br +.ti +2 +A class whose type comes from an explicitely named class type +.nf +.sp +\f[CB]class\fR output_class_via_name : T\.class_ +.fi +.br +.ti +2 +A class whose type comes from the name of a class +.nf +.sp +\f[CB]module\fR Aliased = T +.fi +.br +.ti +2 +The input module itself\. It should contain everything from the top level module +.nf + diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_name.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_name.3o new file mode 100644 index 0000000000..01d38a951e --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_name.3o @@ -0,0 +1,17 @@ + +.TH output_class_via_name 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes\.Make\.output_class_via_name +.SH Synopsis +.sp +.in 2 +\fBClass Make\.output_class_via_name\fR +.in +.sp +.fi +A class whose type comes from the name of a class +.nf +.SH Documentation +.sp +.nf +\f[CB]val\fR content : int diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_type.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_type.3o new file mode 100644 index 0000000000..b081ee0f74 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_type.3o @@ -0,0 +1,17 @@ + +.TH output_class_via_type 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes\.Make\.output_class_via_type +.SH Synopsis +.sp +.in 2 +\fBClass Make\.output_class_via_type\fR +.in +.sp +.fi +A class whose type comes from an explicitely named class type +.nf +.SH Documentation +.sp +.nf +\f[CB]val\fR content : int diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.X.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.X.3o new file mode 100644 index 0000000000..aa96c97e90 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.X.3o @@ -0,0 +1,14 @@ + +.TH X 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes\.X +.SH Synopsis +.sp +.in 2 +\fBModule Include_functor_argument_shapes\.X\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]type\fR v diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-class_.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-class_.3o new file mode 100644 index 0000000000..0734bca6b9 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-class_.3o @@ -0,0 +1,14 @@ + +.TH class_ 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes\.class_ +.SH Synopsis +.sp +.in 2 +\fBClass Include_functor_argument_shapes\.class_\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]val\fR content : int diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-class_type.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-class_type.3o new file mode 100644 index 0000000000..cf20f7edd1 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-class_type.3o @@ -0,0 +1,14 @@ + +.TH class_type 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes\.class_type +.SH Synopsis +.sp +.in 2 +\fBClass Include_functor_argument_shapes\.class_type\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]val\fR content : int diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-output_class_via_name.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-output_class_via_name.3o new file mode 100644 index 0000000000..1f951ae769 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-output_class_via_name.3o @@ -0,0 +1,17 @@ + +.TH output_class_via_name 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes\.output_class_via_name +.SH Synopsis +.sp +.in 2 +\fBClass Include_functor_argument_shapes\.output_class_via_name\fR +.in +.sp +.fi +A class whose type comes from the name of a class +.nf +.SH Documentation +.sp +.nf +\f[CB]val\fR content : int diff --git a/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-output_class_via_type.3o b/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-output_class_via_type.3o new file mode 100644 index 0000000000..f71b92fd36 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_argument_shapes.class-output_class_via_type.3o @@ -0,0 +1,17 @@ + +.TH output_class_via_type 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_argument_shapes\.output_class_via_type +.SH Synopsis +.sp +.in 2 +\fBClass Include_functor_argument_shapes\.output_class_via_type\fR +.in +.sp +.fi +A class whose type comes from an explicitely named class type +.nf +.SH Documentation +.sp +.nf +\f[CB]val\fR content : int diff --git a/test/generators/man/Oxcaml.Include_functor_desugared.3o b/test/generators/man/Oxcaml.Include_functor_desugared.3o new file mode 100644 index 0000000000..63f701f648 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_desugared.3o @@ -0,0 +1,23 @@ + +.TH Include_functor_desugared 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_desugared +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.Include_functor_desugared\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR Make (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.fi +.br +.ti +2 +This module is the desugared version of \f[CI]Include_functor\fR: the synthetic module aliases the preceding items rather than copying them, so that the types the functor inherits from its argument resolve back to them\. +.nf +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR included = t diff --git a/test/generators/man/Oxcaml.Include_functor_desugared.Make.3o b/test/generators/man/Oxcaml.Include_functor_desugared.Make.3o new file mode 100644 index 0000000000..2b4761681a --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_desugared.Make.3o @@ -0,0 +1,33 @@ + +.TH Make 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_desugared\.Make +.SH Synopsis +.sp +.in 2 +\fBModule Include_functor_desugared\.Make\fR +.in +.sp +.fi +This module is the desugared version of \f[CI]Include_functor\fR: the synthetic module aliases the preceding items rather than copying them, so that the types the functor inherits from its argument resolve back to them\. +.nf +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR included = T\.t diff --git a/test/generators/man/Oxcaml.Include_functor_inline.3o b/test/generators/man/Oxcaml.Include_functor_inline.3o new file mode 100644 index 0000000000..77c2a550f6 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_inline.3o @@ -0,0 +1,45 @@ + +.TH Include_functor_inline 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_inline +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.Include_functor_inline\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR \f[CB]type\fR Make = \f[CB]sig\fR +.br +.ti +2 +.sp +.ti +2 +\fB1\.1 Parameters\fR +.sp +.ti +2 +\f[CB]module\fR _ : \f[CB]sig\fR +.br +.ti +4 +\f[CB]type\fR t +.br +.ti +2 +\f[CB]end\fR +.sp +.ti +2 +\fB1\.2 Signature\fR +.sp +.ti +2 +\f[CB]type\fR included +.br +\f[CB]end\fR +.fi +.br +.ti +2 +This is a test case where the functor is named and included inline +.nf +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR included diff --git a/test/generators/man/Oxcaml.Include_functor_named_type.3o b/test/generators/man/Oxcaml.Include_functor_named_type.3o new file mode 100644 index 0000000000..ad1261577e --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_named_type.3o @@ -0,0 +1,45 @@ + +.TH Include_functor_named_type 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_named_type +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.Include_functor_named_type\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR \f[CB]type\fR MakeType = \f[CB]sig\fR +.br +.ti +2 +.sp +.ti +2 +\fB1\.1 Parameters\fR +.sp +.ti +2 +\f[CB]module\fR X : \f[CB]sig\fR +.br +.ti +4 +\f[CB]type\fR t +.br +.ti +2 +\f[CB]end\fR +.sp +.ti +2 +\fB1\.2 Signature\fR +.sp +.ti +2 +\f[CB]type\fR included = X\.t +.br +\f[CB]end\fR +.fi +.br +.ti +2 +This is a module where the functor is named and then included\. +.nf +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR included = t diff --git a/test/generators/man/Oxcaml.Include_functor_named_type_desugared.3o b/test/generators/man/Oxcaml.Include_functor_named_type_desugared.3o new file mode 100644 index 0000000000..0781daf00c --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_named_type_desugared.3o @@ -0,0 +1,45 @@ + +.TH Include_functor_named_type_desugared 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_named_type_desugared +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.Include_functor_named_type_desugared\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR \f[CB]type\fR MakeType = \f[CB]sig\fR +.br +.ti +2 +.sp +.ti +2 +\fB1\.1 Parameters\fR +.sp +.ti +2 +\f[CB]module\fR X : \f[CB]sig\fR +.br +.ti +4 +\f[CB]type\fR t +.br +.ti +2 +\f[CB]end\fR +.sp +.ti +2 +\fB1\.2 Signature\fR +.sp +.ti +2 +\f[CB]type\fR included = X\.t +.br +\f[CB]end\fR +.fi +.br +.ti +2 +This is the desugared version of \f[CI]Include_functor_named_type\fR\. +.nf +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR included = t diff --git a/test/generators/man/Oxcaml.Include_functor_not_last.3o b/test/generators/man/Oxcaml.Include_functor_not_last.3o new file mode 100644 index 0000000000..fdcbacd519 --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_not_last.3o @@ -0,0 +1,25 @@ + +.TH Include_functor_not_last 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_not_last +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.Include_functor_not_last\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR Make (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.fi +.br +.ti +2 +An include functor that is not the last item of the signature\. +.nf +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR included = t +.sp +\f[CB]type\fR after diff --git a/test/generators/man/Oxcaml.Include_functor_not_last.Make.3o b/test/generators/man/Oxcaml.Include_functor_not_last.Make.3o new file mode 100644 index 0000000000..c01f7568cc --- /dev/null +++ b/test/generators/man/Oxcaml.Include_functor_not_last.Make.3o @@ -0,0 +1,33 @@ + +.TH Make 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Include_functor_not_last\.Make +.SH Synopsis +.sp +.in 2 +\fBModule Include_functor_not_last\.Make\fR +.in +.sp +.fi +An include functor that is not the last item of the signature\. +.nf +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR included = T\.t diff --git a/test/generators/man/Oxcaml.Multiple_include_functors.3o b/test/generators/man/Oxcaml.Multiple_include_functors.3o new file mode 100644 index 0000000000..7050c458fd --- /dev/null +++ b/test/generators/man/Oxcaml.Multiple_include_functors.3o @@ -0,0 +1,31 @@ + +.TH Multiple_include_functors 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Multiple_include_functors +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.Multiple_include_functors\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR First (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.fi +.br +.ti +2 +Two include functors in the same signature, with an item defined between them\. +.nf +.sp +\f[CB]module\fR Second (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR first = t +.sp +\f[CB]type\fR between +.sp +\f[CB]type\fR second = first +.sp +\f[CB]type\fR third = between diff --git a/test/generators/man/Oxcaml.Multiple_include_functors.First.3o b/test/generators/man/Oxcaml.Multiple_include_functors.First.3o new file mode 100644 index 0000000000..b07b6639d7 --- /dev/null +++ b/test/generators/man/Oxcaml.Multiple_include_functors.First.3o @@ -0,0 +1,33 @@ + +.TH First 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Multiple_include_functors\.First +.SH Synopsis +.sp +.in 2 +\fBModule Multiple_include_functors\.First\fR +.in +.sp +.fi +Two include functors in the same signature, with an item defined between them\. +.nf +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR first = T\.t diff --git a/test/generators/man/Oxcaml.Multiple_include_functors.Second.3o b/test/generators/man/Oxcaml.Multiple_include_functors.Second.3o new file mode 100644 index 0000000000..7fefdbb78b --- /dev/null +++ b/test/generators/man/Oxcaml.Multiple_include_functors.Second.3o @@ -0,0 +1,38 @@ + +.TH Second 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.Multiple_include_functors\.Second +.SH Synopsis +.sp +.in 2 +\fBModule Multiple_include_functors\.Second\fR +.in +.sp +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.sp +.ti +2 +\f[CB]type\fR first +.sp +.ti +2 +\f[CB]type\fR between +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR second = T\.first +.sp +\f[CB]type\fR third = T\.between diff --git a/test/generators/man/Oxcaml.No_include_functor.3o b/test/generators/man/Oxcaml.No_include_functor.3o new file mode 100644 index 0000000000..d9b130cc57 --- /dev/null +++ b/test/generators/man/Oxcaml.No_include_functor.3o @@ -0,0 +1,25 @@ + +.TH No_include_functor 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.No_include_functor +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml\.No_include_functor\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR Make (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.fi +.br +.ti +2 +Module without any include functor features, this is how things are done in plain OCaml at the moment\. +.nf +.sp +\f[CB]module\fR T : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR included = Make(T)\.included diff --git a/test/generators/man/Oxcaml.No_include_functor.Make.3o b/test/generators/man/Oxcaml.No_include_functor.Make.3o new file mode 100644 index 0000000000..6438bce203 --- /dev/null +++ b/test/generators/man/Oxcaml.No_include_functor.Make.3o @@ -0,0 +1,33 @@ + +.TH Make 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.No_include_functor\.Make +.SH Synopsis +.sp +.in 2 +\fBModule No_include_functor\.Make\fR +.in +.sp +.fi +Module without any include functor features, this is how things are done in plain OCaml at the moment\. +.nf +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR included diff --git a/test/generators/man/Oxcaml.No_include_functor.T.3o b/test/generators/man/Oxcaml.No_include_functor.T.3o new file mode 100644 index 0000000000..62acf3eb80 --- /dev/null +++ b/test/generators/man/Oxcaml.No_include_functor.T.3o @@ -0,0 +1,14 @@ + +.TH T 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml\.No_include_functor\.T +.SH Synopsis +.sp +.in 2 +\fBModule No_include_functor\.T\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]type\fR t diff --git a/test/generators/man/Oxcaml_impl.3o b/test/generators/man/Oxcaml_impl.3o index 2db71c4dbb..37d431bd8b 100644 --- a/test/generators/man/Oxcaml_impl.3o +++ b/test/generators/man/Oxcaml_impl.3o @@ -143,4 +143,19 @@ Mode on a function argument, via a type annotation\. .ti +2 Multiple modes on argument and return\. .nf - +.sp +.in 3 +\fB3 Include functor on structures\fR +.in +.sp +\f[CB]module\fR Include_functor : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Include_functor_desugared : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Resolve_functor : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Multiple_include_functors : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Include_functor_not_last : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR Anonymous_functor : \f[CB]sig\fR \.\.\. \f[CB]end\fR diff --git a/test/generators/man/Oxcaml_impl.Anonymous_functor.3o b/test/generators/man/Oxcaml_impl.Anonymous_functor.3o new file mode 100644 index 0000000000..7d1a842062 --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Anonymous_functor.3o @@ -0,0 +1,21 @@ + +.TH Anonymous_functor 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Anonymous_functor +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml_impl\.Anonymous_functor\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]type\fR t +.fi +.br +.ti +2 +The functor is defined inline, so there is no path for odoc to apply: it has to bind the functor to a module first, as it does for every include functor in a signature\. +.nf +.sp +\f[CB]type\fR included = t diff --git a/test/generators/man/Oxcaml_impl.Include_functor.3o b/test/generators/man/Oxcaml_impl.Include_functor.3o new file mode 100644 index 0000000000..552907cc2c --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Include_functor.3o @@ -0,0 +1,23 @@ + +.TH Include_functor 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Include_functor +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml_impl\.Include_functor\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR Make (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.fi +.br +.ti +2 +This module demonstrates the include functor functionality\. Make uses its argument, so included has to come out equal to t rather than abstract\. +.nf +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR included = t diff --git a/test/generators/man/Oxcaml_impl.Include_functor.Make.3o b/test/generators/man/Oxcaml_impl.Include_functor.Make.3o new file mode 100644 index 0000000000..0b1aade6a4 --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Include_functor.Make.3o @@ -0,0 +1,33 @@ + +.TH Make 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Include_functor\.Make +.SH Synopsis +.sp +.in 2 +\fBModule Include_functor\.Make\fR +.in +.sp +.fi +This module demonstrates the include functor functionality\. Make uses its argument, so included has to come out equal to t rather than abstract\. +.nf +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR included = T\.t diff --git a/test/generators/man/Oxcaml_impl.Include_functor_desugared.3o b/test/generators/man/Oxcaml_impl.Include_functor_desugared.3o new file mode 100644 index 0000000000..bff45706a9 --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Include_functor_desugared.3o @@ -0,0 +1,23 @@ + +.TH Include_functor_desugared 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Include_functor_desugared +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml_impl\.Include_functor_desugared\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR Make (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.fi +.br +.ti +2 +This module is the desugared version from above +.nf +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR included = t diff --git a/test/generators/man/Oxcaml_impl.Include_functor_desugared.Make.3o b/test/generators/man/Oxcaml_impl.Include_functor_desugared.Make.3o new file mode 100644 index 0000000000..d7b3a86992 --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Include_functor_desugared.Make.3o @@ -0,0 +1,33 @@ + +.TH Make 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Include_functor_desugared\.Make +.SH Synopsis +.sp +.in 2 +\fBModule Include_functor_desugared\.Make\fR +.in +.sp +.fi +This module is the desugared version from above +.nf +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR included = T\.t diff --git a/test/generators/man/Oxcaml_impl.Include_functor_not_last.3o b/test/generators/man/Oxcaml_impl.Include_functor_not_last.3o new file mode 100644 index 0000000000..f6dc22868a --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Include_functor_not_last.3o @@ -0,0 +1,25 @@ + +.TH Include_functor_not_last 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Include_functor_not_last +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml_impl\.Include_functor_not_last\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR Make (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.fi +.br +.ti +2 +An include functor that is not the last item of the structure\. +.nf +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR included = t +.sp +\f[CB]type\fR after = string diff --git a/test/generators/man/Oxcaml_impl.Include_functor_not_last.Make.3o b/test/generators/man/Oxcaml_impl.Include_functor_not_last.Make.3o new file mode 100644 index 0000000000..b9829c433e --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Include_functor_not_last.Make.3o @@ -0,0 +1,33 @@ + +.TH Make 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Include_functor_not_last\.Make +.SH Synopsis +.sp +.in 2 +\fBModule Include_functor_not_last\.Make\fR +.in +.sp +.fi +An include functor that is not the last item of the structure\. +.nf +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR included = T\.t diff --git a/test/generators/man/Oxcaml_impl.Multiple_include_functors.3o b/test/generators/man/Oxcaml_impl.Multiple_include_functors.3o new file mode 100644 index 0000000000..f878bf454c --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Multiple_include_functors.3o @@ -0,0 +1,31 @@ + +.TH Multiple_include_functors 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Multiple_include_functors +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml_impl\.Multiple_include_functors\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR First (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.fi +.br +.ti +2 +Two include functors in the same structure, with an item defined between them\. +.nf +.sp +\f[CB]module\fR Second (T : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]type\fR t +.sp +\f[CB]type\fR first = t +.sp +\f[CB]type\fR between +.sp +\f[CB]type\fR second = first +.sp +\f[CB]type\fR third = between diff --git a/test/generators/man/Oxcaml_impl.Multiple_include_functors.First.3o b/test/generators/man/Oxcaml_impl.Multiple_include_functors.First.3o new file mode 100644 index 0000000000..d854def1ed --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Multiple_include_functors.First.3o @@ -0,0 +1,33 @@ + +.TH First 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Multiple_include_functors\.First +.SH Synopsis +.sp +.in 2 +\fBModule Multiple_include_functors\.First\fR +.in +.sp +.fi +Two include functors in the same structure, with an item defined between them\. +.nf +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR first = T\.t diff --git a/test/generators/man/Oxcaml_impl.Multiple_include_functors.Second.3o b/test/generators/man/Oxcaml_impl.Multiple_include_functors.Second.3o new file mode 100644 index 0000000000..5de41b2de3 --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Multiple_include_functors.Second.3o @@ -0,0 +1,38 @@ + +.TH Second 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Multiple_include_functors\.Second +.SH Synopsis +.sp +.in 2 +\fBModule Multiple_include_functors\.Second\fR +.in +.sp +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR T : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.sp +.ti +2 +\f[CB]type\fR first +.sp +.ti +2 +\f[CB]type\fR between +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR second = T\.first +.sp +\f[CB]type\fR third = T\.between diff --git a/test/generators/man/Oxcaml_impl.Resolve_functor.3o b/test/generators/man/Oxcaml_impl.Resolve_functor.3o new file mode 100644 index 0000000000..32ff7c02bd --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Resolve_functor.3o @@ -0,0 +1,16 @@ + +.TH Resolve_functor 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Resolve_functor +.SH Synopsis +.sp +.in 2 +\fBModule Oxcaml_impl\.Resolve_functor\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]module\fR F (I : \f[CB]sig\fR \.\.\. \f[CB]end\fR) : \f[CB]sig\fR \.\.\. \f[CB]end\fR +.sp +\f[CB]module\fR M : \f[CB]sig\fR \.\.\. \f[CB]end\fR diff --git a/test/generators/man/Oxcaml_impl.Resolve_functor.F.3o b/test/generators/man/Oxcaml_impl.Resolve_functor.F.3o new file mode 100644 index 0000000000..4456e70dc3 --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Resolve_functor.F.3o @@ -0,0 +1,30 @@ + +.TH F 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Resolve_functor\.F +.SH Synopsis +.sp +.in 2 +\fBModule Resolve_functor\.F\fR +.in +.sp +.SH Documentation +.sp +.nf +.sp +.in 3 +\fB1 Parameters\fR +.in +.sp +\f[CB]module\fR I : \f[CB]sig\fR +.br +.ti +2 +\f[CB]type\fR t +.br +\f[CB]end\fR +.sp +.in 3 +\fB2 Signature\fR +.in +.sp +\f[CB]type\fR myt = I\.t diff --git a/test/generators/man/Oxcaml_impl.Resolve_functor.M.3o b/test/generators/man/Oxcaml_impl.Resolve_functor.M.3o new file mode 100644 index 0000000000..5d2b52ffa2 --- /dev/null +++ b/test/generators/man/Oxcaml_impl.Resolve_functor.M.3o @@ -0,0 +1,16 @@ + +.TH M 3 "" "Odoc" "OCaml Library" +.SH Name +Oxcaml_impl\.Resolve_functor\.M +.SH Synopsis +.sp +.in 2 +\fBModule Resolve_functor\.M\fR +.in +.sp +.SH Documentation +.sp +.nf +\f[CB]type\fR t = float +.sp +\f[CB]type\fR myt = t diff --git a/test/generators/man/oxcaml.targets b/test/generators/man/oxcaml.targets index 4ed49cfa3b..10d7413bbe 100644 --- a/test/generators/man/oxcaml.targets +++ b/test/generators/man/oxcaml.targets @@ -5,3 +5,31 @@ Oxcaml.X_with.3o Oxcaml.M1.3o Oxcaml.M2.3o Oxcaml.M3.3o +Oxcaml.No_include_functor.3o +Oxcaml.No_include_functor.Make.3o +Oxcaml.No_include_functor.T.3o +Oxcaml.Include_functor.3o +Oxcaml.Include_functor.Make.3o +Oxcaml.Include_functor_argument_shapes.3o +Oxcaml.Include_functor_argument_shapes.Make.3o +Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_type.3o +Oxcaml.Include_functor_argument_shapes.Make.class-output_class_via_name.3o +Oxcaml.Include_functor_argument_shapes.class-class_type.3o +Oxcaml.Include_functor_argument_shapes.class-class_.3o +Oxcaml.Include_functor_argument_shapes.X.3o +Oxcaml.Include_functor_argument_shapes.class-output_class_via_type.3o +Oxcaml.Include_functor_argument_shapes.class-output_class_via_name.3o +Oxcaml.Include_functor_argument_shapes.Aliased.3o +Oxcaml.Include_functor_argument_shapes.Aliased.To_include_module.3o +Oxcaml.Include_functor_desugared.3o +Oxcaml.Include_functor_desugared.Make.3o +Oxcaml.Include_functor_named_type_desugared.3o +Oxcaml.Include_functor_named_type.3o +Oxcaml.Include_functor_inline.3o +Oxcaml.Anonymous_functor.3o +Oxcaml.Anonymous_functor_desugared.3o +Oxcaml.Multiple_include_functors.3o +Oxcaml.Multiple_include_functors.First.3o +Oxcaml.Multiple_include_functors.Second.3o +Oxcaml.Include_functor_not_last.3o +Oxcaml.Include_functor_not_last.Make.3o diff --git a/test/generators/man/oxcaml_impl.targets b/test/generators/man/oxcaml_impl.targets index d0f3634ab4..f17b834c0c 100644 --- a/test/generators/man/oxcaml_impl.targets +++ b/test/generators/man/oxcaml_impl.targets @@ -1,3 +1,16 @@ Oxcaml_impl.3o Oxcaml_impl.To_be_included.3o Oxcaml_impl.Including.3o +Oxcaml_impl.Include_functor.3o +Oxcaml_impl.Include_functor.Make.3o +Oxcaml_impl.Include_functor_desugared.3o +Oxcaml_impl.Include_functor_desugared.Make.3o +Oxcaml_impl.Resolve_functor.3o +Oxcaml_impl.Resolve_functor.F.3o +Oxcaml_impl.Resolve_functor.M.3o +Oxcaml_impl.Multiple_include_functors.3o +Oxcaml_impl.Multiple_include_functors.First.3o +Oxcaml_impl.Multiple_include_functors.Second.3o +Oxcaml_impl.Include_functor_not_last.3o +Oxcaml_impl.Include_functor_not_last.Make.3o +Oxcaml_impl.Anonymous_functor.3o diff --git a/test/generators/markdown/Oxcaml-Anonymous_functor.md b/test/generators/markdown/Oxcaml-Anonymous_functor.md new file mode 100644 index 0000000000..41068a0c51 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Anonymous_functor.md @@ -0,0 +1,11 @@ + +# Module `Oxcaml.Anonymous_functor` + +```ocaml +type t +``` +In this test case the functor is defined inline + +```ocaml +type included +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Anonymous_functor_desugared.md b/test/generators/markdown/Oxcaml-Anonymous_functor_desugared.md new file mode 100644 index 0000000000..312ba25442 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Anonymous_functor_desugared.md @@ -0,0 +1,9 @@ + +# Module `Oxcaml.Anonymous_functor_desugared` + +```ocaml +type t +``` +```ocaml +type included +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor-Make-argument-1-T.md b/test/generators/markdown/Oxcaml-Include_functor-Make-argument-1-T.md new file mode 100644 index 0000000000..9459dc695c --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor-Make-argument-1-T.md @@ -0,0 +1,6 @@ + +# Parameter `Make.T` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor-Make.md b/test/generators/markdown/Oxcaml-Include_functor-Make.md new file mode 100644 index 0000000000..dd4750b74d --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor-Make.md @@ -0,0 +1,17 @@ + +# Module `Include_functor.Make` + +Module which defines a functor and includes it via `module type of` + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type included = T.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor.md b/test/generators/markdown/Oxcaml-Include_functor.md new file mode 100644 index 0000000000..5b0c66c8d8 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor.md @@ -0,0 +1,14 @@ + +# Module `Oxcaml.Include_functor` + +```ocaml +module Make (T : sig ... end) : sig ... end +``` +Module which defines a functor and includes it via `module type of` + +```ocaml +type t +``` +```ocaml +type included = t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.md new file mode 100644 index 0000000000..9c49e351bc --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.md @@ -0,0 +1,6 @@ + +# Module `Aliased.To_include_module` + +```ocaml +val via_module_include : unit +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.md new file mode 100644 index 0000000000..8dce7feb6d --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.md @@ -0,0 +1,6 @@ + +# Module type `Aliased.To_include_module_type` + +```ocaml +val via_module_type_include : unit +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Aliased.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Aliased.md new file mode 100644 index 0000000000..ac30a607d4 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Aliased.md @@ -0,0 +1,34 @@ + +# Module `Include_functor_argument_shapes.Aliased` + +The input module itself. It should contain everything from the top level module + +```ocaml +module type Arg = Arg +``` +Everything the expansion of the functor can inherit from its argument: types, including parameterised and anonymously parameterised ones, submodules, and module types. + +```ocaml +module Make = Make +``` +```ocaml +module type To_include_module_type = sig ... end +``` +```ocaml +module To_include_module : sig ... end +``` +```ocaml +type t = t +``` +```ocaml +type 'a p = 'a p +``` +```ocaml +type 'a0 anon = 'a0 anon +``` +```ocaml +module X = X +``` +```ocaml +module type S = S +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.md new file mode 100644 index 0000000000..a262282a31 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.md @@ -0,0 +1,6 @@ + +# Module `T.X` + +```ocaml +type v +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.md new file mode 100644 index 0000000000..fd0d42b5ec --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.md @@ -0,0 +1,6 @@ + +# Class `T.class_` + +```ocaml +val content : int +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.md new file mode 100644 index 0000000000..6bd1a23caa --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.md @@ -0,0 +1,6 @@ + +# Class `T.class_type` + +```ocaml +val content : int +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.md new file mode 100644 index 0000000000..cb930fd5df --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.md @@ -0,0 +1,30 @@ + +# Parameter `Make.T` + +```ocaml +type t +``` +```ocaml +type 'a p +``` +```ocaml +type _ anon +``` +```ocaml +module X : sig ... end +``` +```ocaml +module type S +``` +```ocaml +val via_module_type_include : unit +``` +```ocaml +val via_module_include : unit +``` +```ocaml +class class_type : object ... end +``` +```ocaml +class class_ : class_type +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.md new file mode 100644 index 0000000000..933bf4b11f --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.md @@ -0,0 +1,8 @@ + +# Class `Make.output_class_via_name` + +A class whose type comes from the name of a class + +```ocaml +val content : int +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.md new file mode 100644 index 0000000000..90680e3227 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.md @@ -0,0 +1,8 @@ + +# Class `Make.output_class_via_type` + +A class whose type comes from an explicitely named class type + +```ocaml +val content : int +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make.md new file mode 100644 index 0000000000..ab29582572 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-Make.md @@ -0,0 +1,51 @@ + +# Module `Include_functor_argument_shapes.Make` + + +## Parameters + +```ocaml +module T : Arg +``` + +## Signature + +```ocaml +type included = T.t +``` +No parameters, so the alias odoc puts in the synthetic module is a bare `type t = t`. + +```ocaml +type applied = int T.p +``` +A named parameter, which the alias threads through as `type 'a p = 'a p`. + +```ocaml +type anonymous = bool T.anon +``` +An anonymous parameter: `_` gives the alias no name to mention on the right, so one is invented, as `type 'a0 anon = 'a0 anon`. + +```ocaml +type from_module = T.X.v +``` +Reached through a submodule of the argument, aliased as `module X = X`. + +```ocaml +module type Reexported = T.S +``` +A module type of the argument, aliased as a path to it. + +```ocaml +class output_class_via_type : T.class_type +``` +A class whose type comes from an explicitely named class type + +```ocaml +class output_class_via_name : T.class_ +``` +A class whose type comes from the name of a class + +```ocaml +module Aliased = T +``` +The input module itself. It should contain everything from the top level module diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-X.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-X.md new file mode 100644 index 0000000000..fd6801a217 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-X.md @@ -0,0 +1,6 @@ + +# Module `Include_functor_argument_shapes.X` + +```ocaml +type v +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-class_.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-class_.md new file mode 100644 index 0000000000..efde79eb0b --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-class_.md @@ -0,0 +1,6 @@ + +# Class `Include_functor_argument_shapes.class_` + +```ocaml +val content : int +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-class_type.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-class_type.md new file mode 100644 index 0000000000..63bf6f2386 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-class_type.md @@ -0,0 +1,6 @@ + +# Class `Include_functor_argument_shapes.class_type` + +```ocaml +val content : int +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.md new file mode 100644 index 0000000000..d253781345 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.md @@ -0,0 +1,8 @@ + +# Class `Include_functor_argument_shapes.output_class_via_name` + +A class whose type comes from the name of a class + +```ocaml +val content : int +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.md new file mode 100644 index 0000000000..a5765dc1b1 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.md @@ -0,0 +1,8 @@ + +# Class `Include_functor_argument_shapes.output_class_via_type` + +A class whose type comes from an explicitely named class type + +```ocaml +val content : int +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.md new file mode 100644 index 0000000000..c80a0a7c54 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.md @@ -0,0 +1,6 @@ + +# Module `Arg.X` + +```ocaml +type v +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.md new file mode 100644 index 0000000000..968575c9b9 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.md @@ -0,0 +1,6 @@ + +# Class `Arg.class_` + +```ocaml +val content : int +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.md new file mode 100644 index 0000000000..79de1f6bba --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.md @@ -0,0 +1,6 @@ + +# Class `Arg.class_type` + +```ocaml +val content : int +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg.md new file mode 100644 index 0000000000..0da98aa193 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-Arg.md @@ -0,0 +1,32 @@ + +# Module type `Include_functor_argument_shapes.Arg` + +Everything the expansion of the functor can inherit from its argument: types, including parameterised and anonymously parameterised ones, submodules, and module types. + +```ocaml +type t +``` +```ocaml +type 'a p +``` +```ocaml +type _ anon +``` +```ocaml +module X : sig ... end +``` +```ocaml +module type S +``` +```ocaml +val via_module_type_include : unit +``` +```ocaml +val via_module_include : unit +``` +```ocaml +class class_type : object ... end +``` +```ocaml +class class_ : class_type +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-S.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-S.md new file mode 100644 index 0000000000..1755e09648 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes-module-type-S.md @@ -0,0 +1,6 @@ + +# Module type `Include_functor_argument_shapes.S` + +```ocaml +type u +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_argument_shapes.md b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes.md new file mode 100644 index 0000000000..3d478f075b --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_argument_shapes.md @@ -0,0 +1,77 @@ + +# Module `Oxcaml.Include_functor_argument_shapes` + +```ocaml +module type Arg = sig ... end +``` +Everything the expansion of the functor can inherit from its argument: types, including parameterised and anonymously parameterised ones, submodules, and module types. + +```ocaml +module Make (T : Arg) : sig ... end +``` +```ocaml +class class_type : object ... end +``` +```ocaml +class class_ : class_type +``` +```ocaml +type t +``` +```ocaml +type 'a p +``` +```ocaml +type _ anon +``` +```ocaml +module X : sig ... end +``` +```ocaml +module type S = sig ... end +``` +```ocaml +val via_module_type_include : unit +``` +```ocaml +val via_module_include : unit +``` +```ocaml +type included = t +``` +No parameters, so the alias odoc puts in the synthetic module is a bare `type t = t`. + +```ocaml +type applied = int p +``` +A named parameter, which the alias threads through as `type 'a p = 'a p`. + +```ocaml +type anonymous = bool anon +``` +An anonymous parameter: `_` gives the alias no name to mention on the right, so one is invented, as `type 'a0 anon = 'a0 anon`. + +```ocaml +type from_module = X.v +``` +Reached through a submodule of the argument, aliased as `module X = X`. + +```ocaml +module type Reexported = S +``` +A module type of the argument, aliased as a path to it. + +```ocaml +class output_class_via_type : BODY__3.class_type +``` +A class whose type comes from an explicitely named class type + +```ocaml +class output_class_via_name : BODY__3.class_ +``` +A class whose type comes from the name of a class + +```ocaml +module Aliased : sig ... end +``` +The input module itself. It should contain everything from the top level module diff --git a/test/generators/markdown/Oxcaml-Include_functor_desugared-Make-argument-1-T.md b/test/generators/markdown/Oxcaml-Include_functor_desugared-Make-argument-1-T.md new file mode 100644 index 0000000000..9459dc695c --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_desugared-Make-argument-1-T.md @@ -0,0 +1,6 @@ + +# Parameter `Make.T` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_desugared-Make.md b/test/generators/markdown/Oxcaml-Include_functor_desugared-Make.md new file mode 100644 index 0000000000..31e5c2020e --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_desugared-Make.md @@ -0,0 +1,17 @@ + +# Module `Include_functor_desugared.Make` + +This module is the desugared version of [`Include_functor`](./Oxcaml-Include_functor.md): the synthetic module aliases the preceding items rather than copying them, so that the types the functor inherits from its argument resolve back to them. + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type included = T.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_desugared.md b/test/generators/markdown/Oxcaml-Include_functor_desugared.md new file mode 100644 index 0000000000..3ee3fdc017 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_desugared.md @@ -0,0 +1,14 @@ + +# Module `Oxcaml.Include_functor_desugared` + +```ocaml +module Make (T : sig ... end) : sig ... end +``` +This module is the desugared version of [`Include_functor`](./Oxcaml-Include_functor.md): the synthetic module aliases the preceding items rather than copying them, so that the types the functor inherits from its argument resolve back to them. + +```ocaml +type t +``` +```ocaml +type included = t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.md b/test/generators/markdown/Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.md new file mode 100644 index 0000000000..4f3631ee75 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.md @@ -0,0 +1,6 @@ + +# Parameter `Make._` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_inline-module-type-Make.md b/test/generators/markdown/Oxcaml-Include_functor_inline-module-type-Make.md new file mode 100644 index 0000000000..ef28e54686 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_inline-module-type-Make.md @@ -0,0 +1,17 @@ + +# Module type `Include_functor_inline.Make` + +This is a test case where the functor is named and included inline + + +## Parameters + +```ocaml +module _ : sig ... end +``` + +## Signature + +```ocaml +type included +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_inline.md b/test/generators/markdown/Oxcaml-Include_functor_inline.md new file mode 100644 index 0000000000..e431dfcf62 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_inline.md @@ -0,0 +1,14 @@ + +# Module `Oxcaml.Include_functor_inline` + +```ocaml +module type Make = functor (_ : sig ... end) -> sig ... end +``` +This is a test case where the functor is named and included inline + +```ocaml +type t +``` +```ocaml +type included +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.md b/test/generators/markdown/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.md new file mode 100644 index 0000000000..31dfe226ee --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.md @@ -0,0 +1,6 @@ + +# Parameter `MakeType.X` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-_.md b/test/generators/markdown/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-_.md new file mode 100644 index 0000000000..123bbae409 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-_.md @@ -0,0 +1,6 @@ + +# Parameter `MakeType._` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_named_type-module-type-MakeType.md b/test/generators/markdown/Oxcaml-Include_functor_named_type-module-type-MakeType.md new file mode 100644 index 0000000000..3eb283c22f --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_named_type-module-type-MakeType.md @@ -0,0 +1,17 @@ + +# Module type `Include_functor_named_type.MakeType` + +This is a module where the functor is named and then included. + + +## Parameters + +```ocaml +module X : sig ... end +``` + +## Signature + +```ocaml +type included = X.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_named_type.md b/test/generators/markdown/Oxcaml-Include_functor_named_type.md new file mode 100644 index 0000000000..eff2fe5acd --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_named_type.md @@ -0,0 +1,14 @@ + +# Module `Oxcaml.Include_functor_named_type` + +```ocaml +module type MakeType = functor (X : sig ... end) -> sig ... end +``` +This is a module where the functor is named and then included. + +```ocaml +type t +``` +```ocaml +type included = t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.md b/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.md new file mode 100644 index 0000000000..31dfe226ee --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.md @@ -0,0 +1,6 @@ + +# Parameter `MakeType.X` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-_.md b/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-_.md new file mode 100644 index 0000000000..123bbae409 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-_.md @@ -0,0 +1,6 @@ + +# Parameter `MakeType._` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.md b/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.md new file mode 100644 index 0000000000..65a1943737 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.md @@ -0,0 +1,17 @@ + +# Module type `Include_functor_named_type_desugared.MakeType` + +This is the desugared version of [`Include_functor_named_type`](./Oxcaml-Include_functor_named_type.md). + + +## Parameters + +```ocaml +module X : sig ... end +``` + +## Signature + +```ocaml +type included = X.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared.md b/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared.md new file mode 100644 index 0000000000..1f4cd369b3 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_named_type_desugared.md @@ -0,0 +1,14 @@ + +# Module `Oxcaml.Include_functor_named_type_desugared` + +```ocaml +module type MakeType = functor (X : sig ... end) -> sig ... end +``` +This is the desugared version of [`Include_functor_named_type`](./Oxcaml-Include_functor_named_type.md). + +```ocaml +type t +``` +```ocaml +type included = t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_not_last-Make-argument-1-T.md b/test/generators/markdown/Oxcaml-Include_functor_not_last-Make-argument-1-T.md new file mode 100644 index 0000000000..9459dc695c --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_not_last-Make-argument-1-T.md @@ -0,0 +1,6 @@ + +# Parameter `Make.T` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_not_last-Make.md b/test/generators/markdown/Oxcaml-Include_functor_not_last-Make.md new file mode 100644 index 0000000000..9b1c32a854 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_not_last-Make.md @@ -0,0 +1,17 @@ + +# Module `Include_functor_not_last.Make` + +An `include functor` that is not the last item of the signature. + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type included = T.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Include_functor_not_last.md b/test/generators/markdown/Oxcaml-Include_functor_not_last.md new file mode 100644 index 0000000000..3d9f8922cf --- /dev/null +++ b/test/generators/markdown/Oxcaml-Include_functor_not_last.md @@ -0,0 +1,17 @@ + +# Module `Oxcaml.Include_functor_not_last` + +```ocaml +module Make (T : sig ... end) : sig ... end +``` +An `include functor` that is not the last item of the signature. + +```ocaml +type t +``` +```ocaml +type included = t +``` +```ocaml +type after +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Multiple_include_functors-First-argument-1-T.md b/test/generators/markdown/Oxcaml-Multiple_include_functors-First-argument-1-T.md new file mode 100644 index 0000000000..8a1130630e --- /dev/null +++ b/test/generators/markdown/Oxcaml-Multiple_include_functors-First-argument-1-T.md @@ -0,0 +1,6 @@ + +# Parameter `First.T` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Multiple_include_functors-First.md b/test/generators/markdown/Oxcaml-Multiple_include_functors-First.md new file mode 100644 index 0000000000..c5ff77d2db --- /dev/null +++ b/test/generators/markdown/Oxcaml-Multiple_include_functors-First.md @@ -0,0 +1,17 @@ + +# Module `Multiple_include_functors.First` + +Two `include functor`s in the same signature, with an item defined between them. + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type first = T.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Multiple_include_functors-Second-argument-1-T.md b/test/generators/markdown/Oxcaml-Multiple_include_functors-Second-argument-1-T.md new file mode 100644 index 0000000000..830672158c --- /dev/null +++ b/test/generators/markdown/Oxcaml-Multiple_include_functors-Second-argument-1-T.md @@ -0,0 +1,12 @@ + +# Parameter `Second.T` + +```ocaml +type t +``` +```ocaml +type first +``` +```ocaml +type between +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Multiple_include_functors-Second.md b/test/generators/markdown/Oxcaml-Multiple_include_functors-Second.md new file mode 100644 index 0000000000..bc810bdf56 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Multiple_include_functors-Second.md @@ -0,0 +1,18 @@ + +# Module `Multiple_include_functors.Second` + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type second = T.first +``` +```ocaml +type third = T.between +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-Multiple_include_functors.md b/test/generators/markdown/Oxcaml-Multiple_include_functors.md new file mode 100644 index 0000000000..1adc7aeb97 --- /dev/null +++ b/test/generators/markdown/Oxcaml-Multiple_include_functors.md @@ -0,0 +1,26 @@ + +# Module `Oxcaml.Multiple_include_functors` + +```ocaml +module First (T : sig ... end) : sig ... end +``` +Two `include functor`s in the same signature, with an item defined between them. + +```ocaml +module Second (T : sig ... end) : sig ... end +``` +```ocaml +type t +``` +```ocaml +type first = t +``` +```ocaml +type between +``` +```ocaml +type second = first +``` +```ocaml +type third = between +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-No_include_functor-Make-argument-1-T.md b/test/generators/markdown/Oxcaml-No_include_functor-Make-argument-1-T.md new file mode 100644 index 0000000000..9459dc695c --- /dev/null +++ b/test/generators/markdown/Oxcaml-No_include_functor-Make-argument-1-T.md @@ -0,0 +1,6 @@ + +# Parameter `Make.T` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-No_include_functor-Make.md b/test/generators/markdown/Oxcaml-No_include_functor-Make.md new file mode 100644 index 0000000000..f6909af03f --- /dev/null +++ b/test/generators/markdown/Oxcaml-No_include_functor-Make.md @@ -0,0 +1,17 @@ + +# Module `No_include_functor.Make` + +Module without any `include functor` features, this is how things are done in plain OCaml at the moment. + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type included +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-No_include_functor-T.md b/test/generators/markdown/Oxcaml-No_include_functor-T.md new file mode 100644 index 0000000000..af326e0804 --- /dev/null +++ b/test/generators/markdown/Oxcaml-No_include_functor-T.md @@ -0,0 +1,6 @@ + +# Module `No_include_functor.T` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml-No_include_functor.md b/test/generators/markdown/Oxcaml-No_include_functor.md new file mode 100644 index 0000000000..c6228a22f0 --- /dev/null +++ b/test/generators/markdown/Oxcaml-No_include_functor.md @@ -0,0 +1,17 @@ + +# Module `Oxcaml.No_include_functor` + +```ocaml +module Make (T : sig ... end) : sig ... end +``` +Module without any `include functor` features, this is how things are done in plain OCaml at the moment. + +```ocaml +module T : sig ... end +``` +```ocaml +type t +``` +```ocaml +type included = Make(T).included +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml.md b/test/generators/markdown/Oxcaml.md index 0dfa5474f6..4f09b89809 100644 --- a/test/generators/markdown/Oxcaml.md +++ b/test/generators/markdown/Oxcaml.md @@ -694,4 +694,40 @@ type mode_cstr = | Mc_arrow of int @ local -> int (* Constructor argument is a parenthesized arrow with a mode. *) | Mc_nested of (int @ local -> int) -> unit (* Nested arrow: higher-order with a mode on the inner argument. *) | Mc_gadt : ('a @ once -> 'a) -> mode_cstr (* GADT constructor *) +``` + +## Include functor on signatures + +```ocaml +module No_include_functor : sig ... end +``` +```ocaml +module Include_functor : sig ... end +``` +```ocaml +module Include_functor_argument_shapes : sig ... end +``` +```ocaml +module Include_functor_desugared : sig ... end +``` +```ocaml +module Include_functor_named_type_desugared : sig ... end +``` +```ocaml +module Include_functor_named_type : sig ... end +``` +```ocaml +module Include_functor_inline : sig ... end +``` +```ocaml +module Anonymous_functor : sig ... end +``` +```ocaml +module Anonymous_functor_desugared : sig ... end +``` +```ocaml +module Multiple_include_functors : sig ... end +``` +```ocaml +module Include_functor_not_last : sig ... end ``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Anonymous_functor.md b/test/generators/markdown/Oxcaml_impl-Anonymous_functor.md new file mode 100644 index 0000000000..75a850a90f --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Anonymous_functor.md @@ -0,0 +1,11 @@ + +# Module `Oxcaml_impl.Anonymous_functor` + +```ocaml +type t +``` +The functor is defined inline, so there is no path for odoc to apply: it has to bind the functor to a module first, as it does for every `include functor` in a signature. + +```ocaml +type included = t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Include_functor-Make-argument-1-T.md b/test/generators/markdown/Oxcaml_impl-Include_functor-Make-argument-1-T.md new file mode 100644 index 0000000000..9459dc695c --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Include_functor-Make-argument-1-T.md @@ -0,0 +1,6 @@ + +# Parameter `Make.T` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Include_functor-Make.md b/test/generators/markdown/Oxcaml_impl-Include_functor-Make.md new file mode 100644 index 0000000000..f62a1ae1d0 --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Include_functor-Make.md @@ -0,0 +1,17 @@ + +# Module `Include_functor.Make` + +This module demonstrates the `include functor` functionality. `Make` uses its argument, so `included` has to come out equal to `t` rather than abstract. + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type included = T.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Include_functor.md b/test/generators/markdown/Oxcaml_impl-Include_functor.md new file mode 100644 index 0000000000..bb0ee68f05 --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Include_functor.md @@ -0,0 +1,14 @@ + +# Module `Oxcaml_impl.Include_functor` + +```ocaml +module Make (T : sig ... end) : sig ... end +``` +This module demonstrates the `include functor` functionality. `Make` uses its argument, so `included` has to come out equal to `t` rather than abstract. + +```ocaml +type t +``` +```ocaml +type included = t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.md b/test/generators/markdown/Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.md new file mode 100644 index 0000000000..9459dc695c --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.md @@ -0,0 +1,6 @@ + +# Parameter `Make.T` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Include_functor_desugared-Make.md b/test/generators/markdown/Oxcaml_impl-Include_functor_desugared-Make.md new file mode 100644 index 0000000000..8660b3fa9c --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Include_functor_desugared-Make.md @@ -0,0 +1,17 @@ + +# Module `Include_functor_desugared.Make` + +This module is the desugared version from above + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type included = T.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Include_functor_desugared.md b/test/generators/markdown/Oxcaml_impl-Include_functor_desugared.md new file mode 100644 index 0000000000..b64ce85068 --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Include_functor_desugared.md @@ -0,0 +1,14 @@ + +# Module `Oxcaml_impl.Include_functor_desugared` + +```ocaml +module Make (T : sig ... end) : sig ... end +``` +This module is the desugared version from above + +```ocaml +type t +``` +```ocaml +type included = t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.md b/test/generators/markdown/Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.md new file mode 100644 index 0000000000..9459dc695c --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.md @@ -0,0 +1,6 @@ + +# Parameter `Make.T` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Include_functor_not_last-Make.md b/test/generators/markdown/Oxcaml_impl-Include_functor_not_last-Make.md new file mode 100644 index 0000000000..d5e3f136cb --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Include_functor_not_last-Make.md @@ -0,0 +1,17 @@ + +# Module `Include_functor_not_last.Make` + +An `include functor` that is not the last item of the structure. + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type included = T.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Include_functor_not_last.md b/test/generators/markdown/Oxcaml_impl-Include_functor_not_last.md new file mode 100644 index 0000000000..4350327ba0 --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Include_functor_not_last.md @@ -0,0 +1,17 @@ + +# Module `Oxcaml_impl.Include_functor_not_last` + +```ocaml +module Make (T : sig ... end) : sig ... end +``` +An `include functor` that is not the last item of the structure. + +```ocaml +type t +``` +```ocaml +type included = t +``` +```ocaml +type after = string +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-First-argument-1-T.md b/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-First-argument-1-T.md new file mode 100644 index 0000000000..8a1130630e --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-First-argument-1-T.md @@ -0,0 +1,6 @@ + +# Parameter `First.T` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-First.md b/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-First.md new file mode 100644 index 0000000000..099b83d6bd --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-First.md @@ -0,0 +1,17 @@ + +# Module `Multiple_include_functors.First` + +Two `include functor`s in the same structure, with an item defined between them. + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type first = T.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.md b/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.md new file mode 100644 index 0000000000..830672158c --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.md @@ -0,0 +1,12 @@ + +# Parameter `Second.T` + +```ocaml +type t +``` +```ocaml +type first +``` +```ocaml +type between +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-Second.md b/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-Second.md new file mode 100644 index 0000000000..bc810bdf56 --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Multiple_include_functors-Second.md @@ -0,0 +1,18 @@ + +# Module `Multiple_include_functors.Second` + + +## Parameters + +```ocaml +module T : sig ... end +``` + +## Signature + +```ocaml +type second = T.first +``` +```ocaml +type third = T.between +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Multiple_include_functors.md b/test/generators/markdown/Oxcaml_impl-Multiple_include_functors.md new file mode 100644 index 0000000000..6091459a92 --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Multiple_include_functors.md @@ -0,0 +1,26 @@ + +# Module `Oxcaml_impl.Multiple_include_functors` + +```ocaml +module First (T : sig ... end) : sig ... end +``` +Two `include functor`s in the same structure, with an item defined between them. + +```ocaml +module Second (T : sig ... end) : sig ... end +``` +```ocaml +type t +``` +```ocaml +type first = t +``` +```ocaml +type between +``` +```ocaml +type second = first +``` +```ocaml +type third = between +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Resolve_functor-F-argument-1-I.md b/test/generators/markdown/Oxcaml_impl-Resolve_functor-F-argument-1-I.md new file mode 100644 index 0000000000..2d0c67ec49 --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Resolve_functor-F-argument-1-I.md @@ -0,0 +1,6 @@ + +# Parameter `F.I` + +```ocaml +type t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Resolve_functor-F.md b/test/generators/markdown/Oxcaml_impl-Resolve_functor-F.md new file mode 100644 index 0000000000..5f69a575a8 --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Resolve_functor-F.md @@ -0,0 +1,15 @@ + +# Module `Resolve_functor.F` + + +## Parameters + +```ocaml +module I : sig ... end +``` + +## Signature + +```ocaml +type myt = I.t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Resolve_functor-M.md b/test/generators/markdown/Oxcaml_impl-Resolve_functor-M.md new file mode 100644 index 0000000000..c76201db55 --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Resolve_functor-M.md @@ -0,0 +1,9 @@ + +# Module `Resolve_functor.M` + +```ocaml +type t = float +``` +```ocaml +type myt = t +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl-Resolve_functor.md b/test/generators/markdown/Oxcaml_impl-Resolve_functor.md new file mode 100644 index 0000000000..0602bcfca0 --- /dev/null +++ b/test/generators/markdown/Oxcaml_impl-Resolve_functor.md @@ -0,0 +1,9 @@ + +# Module `Oxcaml_impl.Resolve_functor` + +```ocaml +module F (I : sig ... end) : sig ... end +``` +```ocaml +module M : sig ... end +``` \ No newline at end of file diff --git a/test/generators/markdown/Oxcaml_impl.md b/test/generators/markdown/Oxcaml_impl.md index 6504572984..d5297c2c2b 100644 --- a/test/generators/markdown/Oxcaml_impl.md +++ b/test/generators/markdown/Oxcaml_impl.md @@ -70,3 +70,25 @@ Mode on a function argument, via a type annotation. val mode_multi : string @ local once -> string @ local once ``` Multiple modes on argument and return. + + +## Include functor on structures + +```ocaml +module Include_functor : sig ... end +``` +```ocaml +module Include_functor_desugared : sig ... end +``` +```ocaml +module Resolve_functor : sig ... end +``` +```ocaml +module Multiple_include_functors : sig ... end +``` +```ocaml +module Include_functor_not_last : sig ... end +``` +```ocaml +module Anonymous_functor : sig ... end +``` \ No newline at end of file diff --git a/test/generators/markdown/oxcaml.targets b/test/generators/markdown/oxcaml.targets index c557e07cc6..522ed593dd 100644 --- a/test/generators/markdown/oxcaml.targets +++ b/test/generators/markdown/oxcaml.targets @@ -8,3 +8,53 @@ Oxcaml-module-type-S.md Oxcaml-M1.md Oxcaml-M2.md Oxcaml-M3.md +Oxcaml-No_include_functor.md +Oxcaml-No_include_functor-Make.md +Oxcaml-No_include_functor-Make-argument-1-T.md +Oxcaml-No_include_functor-T.md +Oxcaml-Include_functor.md +Oxcaml-Include_functor-Make.md +Oxcaml-Include_functor-Make-argument-1-T.md +Oxcaml-Include_functor_argument_shapes.md +Oxcaml-Include_functor_argument_shapes-module-type-Arg.md +Oxcaml-Include_functor_argument_shapes-module-type-Arg-X.md +Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_type.md +Oxcaml-Include_functor_argument_shapes-module-type-Arg-class-class_.md +Oxcaml-Include_functor_argument_shapes-Make.md +Oxcaml-Include_functor_argument_shapes-Make-argument-1-T.md +Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-X.md +Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_type.md +Oxcaml-Include_functor_argument_shapes-Make-argument-1-T-class-class_.md +Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_type.md +Oxcaml-Include_functor_argument_shapes-Make-class-output_class_via_name.md +Oxcaml-Include_functor_argument_shapes-class-class_type.md +Oxcaml-Include_functor_argument_shapes-class-class_.md +Oxcaml-Include_functor_argument_shapes-X.md +Oxcaml-Include_functor_argument_shapes-module-type-S.md +Oxcaml-Include_functor_argument_shapes-class-output_class_via_type.md +Oxcaml-Include_functor_argument_shapes-class-output_class_via_name.md +Oxcaml-Include_functor_argument_shapes-Aliased.md +Oxcaml-Include_functor_argument_shapes-Aliased-module-type-To_include_module_type.md +Oxcaml-Include_functor_argument_shapes-Aliased-To_include_module.md +Oxcaml-Include_functor_desugared.md +Oxcaml-Include_functor_desugared-Make.md +Oxcaml-Include_functor_desugared-Make-argument-1-T.md +Oxcaml-Include_functor_named_type_desugared.md +Oxcaml-Include_functor_named_type_desugared-module-type-MakeType.md +Oxcaml-Include_functor_named_type_desugared-module-type-MakeType-argument-1-X.md +Oxcaml-Include_functor_named_type.md +Oxcaml-Include_functor_named_type-module-type-MakeType.md +Oxcaml-Include_functor_named_type-module-type-MakeType-argument-1-X.md +Oxcaml-Include_functor_inline.md +Oxcaml-Include_functor_inline-module-type-Make.md +Oxcaml-Include_functor_inline-module-type-Make-argument-1-_.md +Oxcaml-Anonymous_functor.md +Oxcaml-Anonymous_functor_desugared.md +Oxcaml-Multiple_include_functors.md +Oxcaml-Multiple_include_functors-First.md +Oxcaml-Multiple_include_functors-First-argument-1-T.md +Oxcaml-Multiple_include_functors-Second.md +Oxcaml-Multiple_include_functors-Second-argument-1-T.md +Oxcaml-Include_functor_not_last.md +Oxcaml-Include_functor_not_last-Make.md +Oxcaml-Include_functor_not_last-Make-argument-1-T.md diff --git a/test/generators/markdown/oxcaml_impl.targets b/test/generators/markdown/oxcaml_impl.targets index 1125335e87..e5472ec9c9 100644 --- a/test/generators/markdown/oxcaml_impl.targets +++ b/test/generators/markdown/oxcaml_impl.targets @@ -1,3 +1,22 @@ Oxcaml_impl.md Oxcaml_impl-To_be_included.md Oxcaml_impl-Including.md +Oxcaml_impl-Include_functor.md +Oxcaml_impl-Include_functor-Make.md +Oxcaml_impl-Include_functor-Make-argument-1-T.md +Oxcaml_impl-Include_functor_desugared.md +Oxcaml_impl-Include_functor_desugared-Make.md +Oxcaml_impl-Include_functor_desugared-Make-argument-1-T.md +Oxcaml_impl-Resolve_functor.md +Oxcaml_impl-Resolve_functor-F.md +Oxcaml_impl-Resolve_functor-F-argument-1-I.md +Oxcaml_impl-Resolve_functor-M.md +Oxcaml_impl-Multiple_include_functors.md +Oxcaml_impl-Multiple_include_functors-First.md +Oxcaml_impl-Multiple_include_functors-First-argument-1-T.md +Oxcaml_impl-Multiple_include_functors-Second.md +Oxcaml_impl-Multiple_include_functors-Second-argument-1-T.md +Oxcaml_impl-Include_functor_not_last.md +Oxcaml_impl-Include_functor_not_last-Make.md +Oxcaml_impl-Include_functor_not_last-Make-argument-1-T.md +Oxcaml_impl-Anonymous_functor.md