2024-08-21 14:34.21: New job: test ocaml-ppx/ppxlib https://github.com/ocaml-ppx/ppxlib.git#refs/pull/514/head (6871aaca920b080603dfe773cc3ab79c206635b7) (macos-arm64:macos-homebrew-5.2_arm64_opam-2.2) Base: macos-homebrew-ocaml-5.2 Opam project build To reproduce locally: git clone --recursive "https://github.com/ocaml-ppx/ppxlib.git" && cd "ppxlib" && git fetch origin "refs/pull/514/head" && git reset --hard 6871aaca cat > Dockerfile <<'END-OF-DOCKERFILE' FROM macos-homebrew-ocaml-5.2 # macos-homebrew-5.2_arm64_opam-2.2 USER 1000:1000 ENV CLICOLOR_FORCE="1" ENV OPAMCOLOR="always" RUN ln -f ~/local/bin/opam-2.2 ~/local/bin/opam RUN opam init --reinit -ni RUN uname -rs && opam exec -- ocaml -version && opam --version RUN cd ~/opam-repository && (git cat-file -e cb25ae478ec89f2fc48f9882ef8979b9b6d614b6 || git fetch origin master) && git reset -q --hard cb25ae478ec89f2fc48f9882ef8979b9b6d614b6 && git log --no-decorate -n1 --oneline && opam update -u RUN mkdir -p 'bench/vendored/ppx_sexp_conv.v0.15.1/' COPY --chown=1000:1000 ppxlib.opam ppxlib-bench.opam ./src/./ COPY --chown=1000:1000 bench/vendored/ppx_sexp_conv.v0.15.1/ppx_sexp_conv.opam ./src/bench/vendored/ppx_sexp_conv.v0.15.1/ RUN opam pin add -yn ppxlib.dev './src/./' && \ opam pin add -yn ppxlib-bench.dev './src/./' && \ opam pin add -yn ppx_sexp_conv './src/bench/vendored/ppx_sexp_conv.v0.15.1/' ENV DEPS="base.v0.17.1 base-bigarray.base base-domains.base base-nnp.base base-threads.base base-unix.base cinaps.v0.15.1 csexp.1.5.2 dune.3.16.0 dune-configurator.3.16.0 host-arch-arm64.1 host-system-other.1 ocaml.5.2.0 ocaml-base-compiler.5.2.0 ocaml-compiler-libs.v0.17.0 ocaml-config.3 ocaml-options-vanilla.1 ocaml_intrinsics_kernel.v0.17.1 ocamlfind.1.9.6 ppx_derivers.1.2.1 re.1.11.0 seq.base sexplib0.v0.17.0 stdlib-shims.0.3.0 yojson.2.2.2" ENV CI="true" ENV OCAMLCI="true" RUN opam update --depexts && opam install --cli=2.2 --depext-only -y ppxlib.dev ppxlib-bench.dev $DEPS RUN opam install $DEPS COPY --chown=1000:1000 . ./src RUN cd ./src && opam exec -- dune build @install @check @runtest && rm -rf _build END-OF-DOCKERFILE docker build . END-REPRO-BLOCK 2024-08-21 14:34.21: Using cache hint "ocaml-ppx/ppxlib-macos-homebrew-ocaml-5.2-macos-homebrew-5.2_arm64_opam-2.2-2041b57a0ca6b17e5a8a54a33bf70a8e" 2024-08-21 14:34.21: Using OBuilder spec: ((from macos-homebrew-ocaml-5.2) (comment macos-homebrew-5.2_arm64_opam-2.2) (user (uid 1000) (gid 1000)) (env CLICOLOR_FORCE 1) (env OPAMCOLOR always) (run (shell "ln -f ~/local/bin/opam-2.2 ~/local/bin/opam")) (run (shell "opam init --reinit -ni")) (run (shell "uname -rs && opam exec -- ocaml -version && opam --version")) (run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew))) (network host) (shell "cd ~/opam-repository && (git cat-file -e cb25ae478ec89f2fc48f9882ef8979b9b6d614b6 || git fetch origin master) && git reset -q --hard cb25ae478ec89f2fc48f9882ef8979b9b6d614b6 && git log --no-decorate -n1 --oneline && opam update -u")) (run (shell "mkdir -p 'bench/vendored/ppx_sexp_conv.v0.15.1/'")) (copy (src ppxlib.opam ppxlib-bench.opam) (dst ./src/./)) (copy (src bench/vendored/ppx_sexp_conv.v0.15.1/ppx_sexp_conv.opam) (dst ./src/bench/vendored/ppx_sexp_conv.v0.15.1/)) (run (network host) (shell "opam pin add -yn ppxlib.dev './src/./' && \ \nopam pin add -yn ppxlib-bench.dev './src/./' && \ \nopam pin add -yn ppx_sexp_conv './src/bench/vendored/ppx_sexp_conv.v0.15.1/'")) (env DEPS "base.v0.17.1 base-bigarray.base base-domains.base base-nnp.base base-threads.base base-unix.base cinaps.v0.15.1 csexp.1.5.2 dune.3.16.0 dune-configurator.3.16.0 host-arch-arm64.1 host-system-other.1 ocaml.5.2.0 ocaml-base-compiler.5.2.0 ocaml-compiler-libs.v0.17.0 ocaml-config.3 ocaml-options-vanilla.1 ocaml_intrinsics_kernel.v0.17.1 ocamlfind.1.9.6 ppx_derivers.1.2.1 re.1.11.0 seq.base sexplib0.v0.17.0 stdlib-shims.0.3.0 yojson.2.2.2") (env CI true) (env OCAMLCI true) (run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew))) (network host) (shell "opam update --depexts && opam install --cli=2.2 --depext-only -y ppxlib.dev ppxlib-bench.dev $DEPS")) (run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew))) (network host) (shell "opam install $DEPS")) (copy (src .) (dst ./src)) (run (shell "cd ./src && opam exec -- dune build @install @check @runtest && rm -rf _build")) ) 2024-08-21 14:34.21: Waiting for resource in pool OCluster 2024-08-21 15:09.29: Waiting for worker… 2024-08-21 17:10.03: Got resource from pool OCluster Building on m1-worker-03 All commits already cached HEAD is now at 6871aaca Deprecate Exp.function_ in favour of Exp.function_cases going forward (from macos-homebrew-ocaml-5.2) 2024-08-21 17:15.52 ---> using "9b46fe3d2429f2b9195a02468cb57ac45cfa11fb4a87cb32b5e5375232223327" from cache /: (comment macos-homebrew-5.2_arm64_opam-2.2) /: (user (uid 1000) (gid 1000)) /: (env CLICOLOR_FORCE 1) /: (env OPAMCOLOR always) /: (run (shell "ln -f ~/local/bin/opam-2.2 ~/local/bin/opam")) 2024-08-21 17:15.52 ---> using "b003627c18f5d873361872ecfa38a9a8b5c86cc26245bef1d152887064c98071" from cache /: (run (shell "opam init --reinit -ni")) No configuration file found, using built-in defaults. Checking for available remotes: rsync and local, git. - you won't be able to use mercurial repositories unless you install the hg command on your system. - you won't be able to use darcs repositories unless you install the darcs command on your system. This version of opam requires an update to the layout of /Users/mac1000/.opam from version 2.1 to version 2.2, which can't be reverted. You may want to back it up before going further. Continue? [y/n] y [NOTE] The 'jobs' option was reset, its value was 1 and its new value will vary according to the current number of cores on your machine. You can restore the fixed value using: opam option jobs=1 --global Format upgrade done. <><> Updating repositories ><><><><><><><><><><><><><><><><><><><><><><><><><><> [default] no changes from git+file:///Users/mac1000/opam-repository 2024-08-21 17:15.53 ---> using "408d2cc158c17e89759cf51b146539f00642e287086d5c54f85c33dae9e6a1f9" from cache /: (run (shell "uname -rs && opam exec -- ocaml -version && opam --version")) Darwin 23.4.0 The OCaml toplevel, version 5.2.0 2.2.0 2024-08-21 17:15.53 ---> using "80c5626e56c363c9237b2d67b74b9ac64751c52cd041543c0fda73b45b911c9a" from cache /: (run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew))) (network host) (shell "cd ~/opam-repository && (git cat-file -e cb25ae478ec89f2fc48f9882ef8979b9b6d614b6 || git fetch origin master) && git reset -q --hard cb25ae478ec89f2fc48f9882ef8979b9b6d614b6 && git log --no-decorate -n1 --oneline && opam update -u")) From https://github.com/ocaml/opam-repository * branch master -> FETCH_HEAD fe8dffac61..0f2e2e7a59 master -> origin/master cb25ae478e Merge pull request #26358 from public-release/opam-publish-ocaml_intrinsics_kernel.v0.17.1 <><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><> [default] synchronised from git+file:///Users/mac1000/opam-repository Everything as up-to-date as possible (run with --verbose to show unavailable upgrades). The following packages are not being upgraded because the new versions conflict with other installed packages: - ocaml.5.3.0 However, you may "opam upgrade" these packages explicitly, which will ask permission to downgrade or uninstall the conflicting packages. Nothing to do. # Run eval $(opam env) to update the current shell environment 2024-08-21 17:15.53 ---> using "b10b9751feb75be786c19f8470e48aa1c835afe8da2220a59826dd83ce62a980" from cache /: (run (shell "mkdir -p 'bench/vendored/ppx_sexp_conv.v0.15.1/'")) 2024-08-21 17:15.53 ---> using "5d29ce57070f397d6e65f2efce8d172b3f77a7aaa62c94644bb5693dc18e2eec" from cache /: (copy (src ppxlib.opam ppxlib-bench.opam) (dst ./src/./)) 2024-08-21 17:15.53 ---> using "8577f930a283152b860db02041d6136dee1da8724e9564e82c9b71b377f28e41" from cache /: (copy (src bench/vendored/ppx_sexp_conv.v0.15.1/ppx_sexp_conv.opam) (dst ./src/bench/vendored/ppx_sexp_conv.v0.15.1/)) 2024-08-21 17:15.53 ---> using "b423b042cb0beeb6a05628572d8a52dc95b67abc502306a218e3d47590dc1447" from cache /: (run (network host) (shell "opam pin add -yn ppxlib.dev './src/./' && \ \nopam pin add -yn ppxlib-bench.dev './src/./' && \ \nopam pin add -yn ppx_sexp_conv './src/bench/vendored/ppx_sexp_conv.v0.15.1/'")) [ppxlib.dev] synchronised (file:///Users/mac1000/src) ppxlib is now pinned to file:///Users/mac1000/src (version dev) Package ppxlib-bench does not exist, create as a NEW package? [y/n] y [ppxlib-bench.dev] synchronised (file:///Users/mac1000/src) ppxlib-bench is now pinned to file:///Users/mac1000/src (version dev) [ppx_sexp_conv.v0.17.0] synchronised (file:///Users/mac1000/src/bench/vendored/ppx_sexp_conv.v0.15.1) ppx_sexp_conv is now pinned to file:///Users/mac1000/src/bench/vendored/ppx_sexp_conv.v0.15.1 (version v0.15.0) 2024-08-21 17:15.54 ---> using "bcef021acb690ece25705951021641ed2a87af6ceb23c9c01b7455efaec70e7c" from cache /: (env DEPS "base.v0.17.1 base-bigarray.base base-domains.base base-nnp.base base-threads.base base-unix.base cinaps.v0.15.1 csexp.1.5.2 dune.3.16.0 dune-configurator.3.16.0 host-arch-arm64.1 host-system-other.1 ocaml.5.2.0 ocaml-base-compiler.5.2.0 ocaml-compiler-libs.v0.17.0 ocaml-config.3 ocaml-options-vanilla.1 ocaml_intrinsics_kernel.v0.17.1 ocamlfind.1.9.6 ppx_derivers.1.2.1 re.1.11.0 seq.base sexplib0.v0.17.0 stdlib-shims.0.3.0 yojson.2.2.2") /: (env CI true) /: (env OCAMLCI true) /: (run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew))) (network host) (shell "opam update --depexts && opam install --cli=2.2 --depext-only -y ppxlib.dev ppxlib-bench.dev $DEPS")) + /opt/homebrew/bin/brew "update" - ==> Updating Homebrew... - Already up-to-date. <><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><> [ppxlib.dev] synchronised (no changes) [ppxlib-bench.dev] synchronised (no changes) [NOTE] Package ocaml-options-vanilla is already installed (current version is 1). [NOTE] Package ocaml-config is already installed (current version is 3). [NOTE] Package ocaml-base-compiler is already installed (current version is 5.2.0). [NOTE] Package ocaml is already installed (current version is 5.2.0). [NOTE] Package host-system-other is already installed (current version is 1). [NOTE] Package host-arch-arm64 is already installed (current version is 1). [NOTE] Package base-unix is already installed (current version is base). [NOTE] Package base-threads is already installed (current version is base). [NOTE] Package base-nnp is already installed (current version is base). [NOTE] Package base-domains is already installed (current version is base). [NOTE] Package base-bigarray is already installed (current version is base). 2024-08-21 17:15.54 ---> using "cdcb4bee491af05f37b99f0c51a087b7d1a74ba190eb6c84931a6c9d2fc7ae10" from cache /: (run (cache (opam-archives (target /Users/mac1000/.opam/download-cache)) (homebrew (target /Users/mac1000/Library/Caches/Homebrew))) (network host) (shell "opam install $DEPS")) [NOTE] Package ocaml-options-vanilla is already installed (current version is 1). [NOTE] Package ocaml-config is already installed (current version is 3). [NOTE] Package ocaml-base-compiler is already installed (current version is 5.2.0). [NOTE] Package ocaml is already installed (current version is 5.2.0). [NOTE] Package host-system-other is already installed (current version is 1). [NOTE] Package host-arch-arm64 is already installed (current version is 1). [NOTE] Package base-unix is already installed (current version is base). [NOTE] Package base-threads is already installed (current version is base). [NOTE] Package base-nnp is already installed (current version is base). [NOTE] Package base-domains is already installed (current version is base). [NOTE] Package base-bigarray is already installed (current version is base). The following actions will be performed: === install 14 packages - install base v0.17.1 - install cinaps v0.15.1 - install csexp 1.5.2 - install dune 3.16.0 - install dune-configurator 3.16.0 - install ocaml-compiler-libs v0.17.0 - install ocaml_intrinsics_kernel v0.17.1 - install ocamlfind 1.9.6 - install ppx_derivers 1.2.1 - install re 1.11.0 - install seq base - install sexplib0 v0.17.0 - install stdlib-shims 0.3.0 - install yojson 2.2.2 <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> -> retrieved cinaps.v0.15.1 (cached) -> retrieved csexp.1.5.2 (cached) -> retrieved base.v0.17.1 (cached) -> retrieved ocaml-compiler-libs.v0.17.0 (cached) -> retrieved ocaml_intrinsics_kernel.v0.17.1 (cached) -> retrieved ppx_derivers.1.2.1 (cached) -> retrieved ocamlfind.1.9.6 (cached) -> retrieved seq.base (cached) -> installed seq.base -> retrieved sexplib0.v0.17.0 (cached) -> retrieved re.1.11.0 (cached) -> retrieved stdlib-shims.0.3.0 (cached) -> retrieved yojson.2.2.2 (cached) -> retrieved dune.3.16.0, dune-configurator.3.16.0 (cached) -> installed ocamlfind.1.9.6 -> installed dune.3.16.0 -> installed ppx_derivers.1.2.1 -> installed stdlib-shims.0.3.0 -> installed csexp.1.5.2 -> installed yojson.2.2.2 -> installed sexplib0.v0.17.0 -> installed re.1.11.0 -> installed ocaml_intrinsics_kernel.v0.17.1 -> installed ocaml-compiler-libs.v0.17.0 -> installed cinaps.v0.15.1 -> installed dune-configurator.3.16.0 -> installed base.v0.17.1 Done. # Run eval $(opam env) to update the current shell environment 2024-08-21 17:15.54 ---> using "b0fbc9c7787b98bdc4113535582b8bce46e458c885302a12f085ea251021a495" from cache /: (copy (src .) (dst ./src)) 2024-08-21 17:15.54 ---> using "5272def85c73c0c762d6ff196ba6cebc6f08b4e741256f5e8a08c20eaaf19074" from cache /: (run (shell "cd ./src && opam exec -- dune build @install @check @runtest && rm -rf _build")) File "ast/ast.ml", line 1, characters 0-0: /usr/bin/git --no-pager diff --no-index --color=always -u _build/default/ast/ast.ml _build/default/ast/ast.ml.lint-corrected diff --git a/_build/default/ast/ast.ml b/_build/default/ast/ast.ml.lint-corrected index 2c13355..c8542fb 100644 --- a/_build/default/ast/ast.ml +++ b/_build/default/ast/ast.ml.lint-corrected @@ -1085,169 +1085,120 @@ and cases = case list [@@deriving_inline traverse] class virtual map = object (self) - method virtual bool : bool -> bool - method virtual char : char -> char - method virtual int : int -> int - method virtual list : 'a. ('a -> 'a) -> 'a list -> 'a list - method virtual option : 'a. ('a -> 'a) -> 'a option -> 'a option - method virtual string : string -> string - - method position : position -> position = + method virtual bool : bool -> bool + method virtual char : char -> char + method virtual int : int -> int + method virtual list : 'a . ('a -> 'a) -> 'a list -> 'a list + method virtual option : 'a . ('a -> 'a) -> 'a option -> 'a option + method virtual string : string -> string + method position : position -> position= fun { pos_fname; pos_lnum; pos_bol; pos_cnum } -> let pos_fname = self#string pos_fname in let pos_lnum = self#int pos_lnum in let pos_bol = self#int pos_bol in let pos_cnum = self#int pos_cnum in { pos_fname; pos_lnum; pos_bol; pos_cnum } - - method location : location -> location = + method location : location -> location= fun { loc_start; loc_end; loc_ghost } -> let loc_start = self#position loc_start in let loc_end = self#position loc_end in let loc_ghost = self#bool loc_ghost in { loc_start; loc_end; loc_ghost } - - method location_stack : location_stack -> location_stack = + method location_stack : location_stack -> location_stack= self#list self#location - - method loc : 'a. ('a -> 'a) -> 'a loc -> 'a loc = - fun _a { txt; loc } -> - let txt = _a txt in - let loc = self#location loc in - { txt; loc } - - method longident : longident -> longident = + method loc : 'a . ('a -> 'a) -> 'a loc -> 'a loc= + fun _a -> + fun { txt; loc } -> + let txt = _a txt in let loc = self#location loc in { txt; loc } + method longident : longident -> longident= fun x -> match x with - | Lident a -> - let a = self#string a in - Lident a + | Lident a -> let a = self#string a in Lident a | Ldot (a, b) -> - let a = self#longident a in - let b = self#string b in - Ldot (a, b) + let a = self#longident a in let b = self#string b in Ldot (a, b) | Lapply (a, b) -> let a = self#longident a in - let b = self#longident b in - Lapply (a, b) - - method longident_loc : longident_loc -> longident_loc = + let b = self#longident b in Lapply (a, b) + method longident_loc : longident_loc -> longident_loc= self#loc self#longident - - method rec_flag : rec_flag -> rec_flag = fun x -> x - method direction_flag : direction_flag -> direction_flag = fun x -> x - method private_flag : private_flag -> private_flag = fun x -> x - method mutable_flag : mutable_flag -> mutable_flag = fun x -> x - method virtual_flag : virtual_flag -> virtual_flag = fun x -> x - method override_flag : override_flag -> override_flag = fun x -> x - method closed_flag : closed_flag -> closed_flag = fun x -> x - method label : label -> label = self#string - - method arg_label : arg_label -> arg_label = + method rec_flag : rec_flag -> rec_flag= fun x -> x + method direction_flag : direction_flag -> direction_flag= fun x -> x + method private_flag : private_flag -> private_flag= fun x -> x + method mutable_flag : mutable_flag -> mutable_flag= fun x -> x + method virtual_flag : virtual_flag -> virtual_flag= fun x -> x + method override_flag : override_flag -> override_flag= fun x -> x + method closed_flag : closed_flag -> closed_flag= fun x -> x + method label : label -> label= self#string + method arg_label : arg_label -> arg_label= fun x -> match x with | Nolabel -> Nolabel - | Labelled a -> - let a = self#string a in - Labelled a - | Optional a -> - let a = self#string a in - Optional a - - method variance : variance -> variance = fun x -> x - method injectivity : injectivity -> injectivity = fun x -> x - - method constant : constant -> constant = + | Labelled a -> let a = self#string a in Labelled a + | Optional a -> let a = self#string a in Optional a + method variance : variance -> variance= fun x -> x + method injectivity : injectivity -> injectivity= fun x -> x + method constant : constant -> constant= fun x -> match x with | Pconst_integer (a, b) -> let a = self#string a in - let b = self#option self#char b in - Pconst_integer (a, b) - | Pconst_char a -> - let a = self#char a in - Pconst_char a + let b = self#option self#char b in Pconst_integer (a, b) + | Pconst_char a -> let a = self#char a in Pconst_char a | Pconst_string (a, b, c) -> let a = self#string a in let b = self#location b in - let c = self#option self#string c in - Pconst_string (a, b, c) + let c = self#option self#string c in Pconst_string (a, b, c) | Pconst_float (a, b) -> let a = self#string a in - let b = self#option self#char b in - Pconst_float (a, b) - - method attribute : attribute -> attribute = + let b = self#option self#char b in Pconst_float (a, b) + method attribute : attribute -> attribute= fun { attr_name; attr_payload; attr_loc } -> let attr_name = self#loc self#string attr_name in let attr_payload = self#payload attr_payload in let attr_loc = self#location attr_loc in { attr_name; attr_payload; attr_loc } - - method extension : extension -> extension = + method extension : extension -> extension= fun (a, b) -> - let a = self#loc self#string a in - let b = self#payload b in - (a, b) - - method attributes : attributes -> attributes = self#list self#attribute - - method payload : payload -> payload = + let a = self#loc self#string a in let b = self#payload b in (a, b) + method attributes : attributes -> attributes= self#list self#attribute + method payload : payload -> payload= fun x -> match x with - | PStr a -> - let a = self#structure a in - PStr a - | PSig a -> - let a = self#signature a in - PSig a - | PTyp a -> - let a = self#core_type a in - PTyp a + | PStr a -> let a = self#structure a in PStr a + | PSig a -> let a = self#signature a in PSig a + | PTyp a -> let a = self#core_type a in PTyp a | PPat (a, b) -> let a = self#pattern a in - let b = self#option self#expression b in - PPat (a, b) - - method core_type : core_type -> core_type = + let b = self#option self#expression b in PPat (a, b) + method core_type : core_type -> core_type= fun { ptyp_desc; ptyp_loc; ptyp_loc_stack; ptyp_attributes } -> let ptyp_desc = self#core_type_desc ptyp_desc in let ptyp_loc = self#location ptyp_loc in let ptyp_loc_stack = self#location_stack ptyp_loc_stack in let ptyp_attributes = self#attributes ptyp_attributes in { ptyp_desc; ptyp_loc; ptyp_loc_stack; ptyp_attributes } - - method core_type_desc : core_type_desc -> core_type_desc = + method core_type_desc : core_type_desc -> core_type_desc= fun x -> match x with | Ptyp_any -> Ptyp_any - | Ptyp_var a -> - let a = self#string a in - Ptyp_var a + | Ptyp_var a -> let a = self#string a in Ptyp_var a | Ptyp_arrow (a, b, c) -> let a = self#arg_label a in let b = self#core_type b in - let c = self#core_type c in - Ptyp_arrow (a, b, c) - | Ptyp_tuple a -> - let a = self#list self#core_type a in - Ptyp_tuple a + let c = self#core_type c in Ptyp_arrow (a, b, c) + | Ptyp_tuple a -> let a = self#list self#core_type a in Ptyp_tuple a | Ptyp_constr (a, b) -> let a = self#loc self#longident a in - let b = self#list self#core_type b in - Ptyp_constr (a, b) + let b = self#list self#core_type b in Ptyp_constr (a, b) | Ptyp_object (a, b) -> let a = self#list self#object_field a in - let b = self#closed_flag b in - Ptyp_object (a, b) + let b = self#closed_flag b in Ptyp_object (a, b) | Ptyp_class (a, b) -> let a = self#loc self#longident a in - let b = self#list self#core_type b in - Ptyp_class (a, b) + let b = self#list self#core_type b in Ptyp_class (a, b) | Ptyp_alias (a, b) -> let a = self#core_type a in - let b = self#loc self#string b in - Ptyp_alias (a, b) + let b = self#loc self#string b in Ptyp_alias (a, b) | Ptyp_variant (a, b, c) -> let a = self#list self#row_field a in let b = self#closed_flag b in @@ -1255,235 +1206,158 @@ class virtual map = Ptyp_variant (a, b, c) | Ptyp_poly (a, b) -> let a = self#list (self#loc self#string) a in - let b = self#core_type b in - Ptyp_poly (a, b) - | Ptyp_package a -> - let a = self#package_type a in - Ptyp_package a + let b = self#core_type b in Ptyp_poly (a, b) + | Ptyp_package a -> let a = self#package_type a in Ptyp_package a | Ptyp_open (a, b) -> let a = self#loc self#longident a in - let b = self#core_type b in - Ptyp_open (a, b) - | Ptyp_extension a -> - let a = self#extension a in - Ptyp_extension a - - method package_type : package_type -> package_type = + let b = self#core_type b in Ptyp_open (a, b) + | Ptyp_extension a -> let a = self#extension a in Ptyp_extension a + method package_type : package_type -> package_type= fun (a, b) -> let a = self#loc self#longident a in let b = self#list (fun (a, b) -> - let a = self#loc self#longident a in - let b = self#core_type b in - (a, b)) - b - in + let a = self#loc self#longident a in + let b = self#core_type b in (a, b)) b in (a, b) - - method row_field : row_field -> row_field = + method row_field : row_field -> row_field= fun { prf_desc; prf_loc; prf_attributes } -> let prf_desc = self#row_field_desc prf_desc in let prf_loc = self#location prf_loc in let prf_attributes = self#attributes prf_attributes in { prf_desc; prf_loc; prf_attributes } - - method row_field_desc : row_field_desc -> row_field_desc = + method row_field_desc : row_field_desc -> row_field_desc= fun x -> match x with | Rtag (a, b, c) -> let a = self#loc self#label a in let b = self#bool b in - let c = self#list self#core_type c in - Rtag (a, b, c) - | Rinherit a -> - let a = self#core_type a in - Rinherit a - - method object_field : object_field -> object_field = + let c = self#list self#core_type c in Rtag (a, b, c) + | Rinherit a -> let a = self#core_type a in Rinherit a + method object_field : object_field -> object_field= fun { pof_desc; pof_loc; pof_attributes } -> let pof_desc = self#object_field_desc pof_desc in let pof_loc = self#location pof_loc in let pof_attributes = self#attributes pof_attributes in { pof_desc; pof_loc; pof_attributes } - - method object_field_desc : object_field_desc -> object_field_desc = + method object_field_desc : object_field_desc -> object_field_desc= fun x -> match x with | Otag (a, b) -> let a = self#loc self#label a in - let b = self#core_type b in - Otag (a, b) - | Oinherit a -> - let a = self#core_type a in - Oinherit a - - method pattern : pattern -> pattern = + let b = self#core_type b in Otag (a, b) + | Oinherit a -> let a = self#core_type a in Oinherit a + method pattern : pattern -> pattern= fun { ppat_desc; ppat_loc; ppat_loc_stack; ppat_attributes } -> let ppat_desc = self#pattern_desc ppat_desc in let ppat_loc = self#location ppat_loc in let ppat_loc_stack = self#location_stack ppat_loc_stack in let ppat_attributes = self#attributes ppat_attributes in { ppat_desc; ppat_loc; ppat_loc_stack; ppat_attributes } - - method pattern_desc : pattern_desc -> pattern_desc = + method pattern_desc : pattern_desc -> pattern_desc= fun x -> match x with | Ppat_any -> Ppat_any - | Ppat_var a -> - let a = self#loc self#string a in - Ppat_var a + | Ppat_var a -> let a = self#loc self#string a in Ppat_var a | Ppat_alias (a, b) -> let a = self#pattern a in - let b = self#loc self#string b in - Ppat_alias (a, b) - | Ppat_constant a -> - let a = self#constant a in - Ppat_constant a + let b = self#loc self#string b in Ppat_alias (a, b) + | Ppat_constant a -> let a = self#constant a in Ppat_constant a | Ppat_interval (a, b) -> let a = self#constant a in - let b = self#constant b in - Ppat_interval (a, b) - | Ppat_tuple a -> - let a = self#list self#pattern a in - Ppat_tuple a + let b = self#constant b in Ppat_interval (a, b) + | Ppat_tuple a -> let a = self#list self#pattern a in Ppat_tuple a | Ppat_construct (a, b) -> let a = self#loc self#longident a in let b = self#option (fun (a, b) -> - let a = self#list (self#loc self#string) a in - let b = self#pattern b in - (a, b)) - b - in + let a = self#list (self#loc self#string) a in + let b = self#pattern b in (a, b)) b in Ppat_construct (a, b) | Ppat_variant (a, b) -> let a = self#label a in - let b = self#option self#pattern b in - Ppat_variant (a, b) + let b = self#option self#pattern b in Ppat_variant (a, b) | Ppat_record (a, b) -> let a = self#list (fun (a, b) -> - let a = self#loc self#longident a in - let b = self#pattern b in - (a, b)) - a - in - let b = self#closed_flag b in - Ppat_record (a, b) - | Ppat_array a -> - let a = self#list self#pattern a in - Ppat_array a + let a = self#loc self#longident a in + let b = self#pattern b in (a, b)) a in + let b = self#closed_flag b in Ppat_record (a, b) + | Ppat_array a -> let a = self#list self#pattern a in Ppat_array a | Ppat_or (a, b) -> let a = self#pattern a in - let b = self#pattern b in - Ppat_or (a, b) + let b = self#pattern b in Ppat_or (a, b) | Ppat_constraint (a, b) -> let a = self#pattern a in - let b = self#core_type b in - Ppat_constraint (a, b) - | Ppat_type a -> - let a = self#loc self#longident a in - Ppat_type a - | Ppat_lazy a -> - let a = self#pattern a in - Ppat_lazy a + let b = self#core_type b in Ppat_constraint (a, b) + | Ppat_type a -> let a = self#loc self#longident a in Ppat_type a + | Ppat_lazy a -> let a = self#pattern a in Ppat_lazy a | Ppat_unpack a -> - let a = self#loc (self#option self#string) a in - Ppat_unpack a - | Ppat_exception a -> - let a = self#pattern a in - Ppat_exception a - | Ppat_extension a -> - let a = self#extension a in - Ppat_extension a + let a = self#loc (self#option self#string) a in Ppat_unpack a + | Ppat_exception a -> let a = self#pattern a in Ppat_exception a + | Ppat_extension a -> let a = self#extension a in Ppat_extension a | Ppat_open (a, b) -> let a = self#loc self#longident a in - let b = self#pattern b in - Ppat_open (a, b) - - method expression : expression -> expression = + let b = self#pattern b in Ppat_open (a, b) + method expression : expression -> expression= fun { pexp_desc; pexp_loc; pexp_loc_stack; pexp_attributes } -> let pexp_desc = self#expression_desc pexp_desc in let pexp_loc = self#location pexp_loc in let pexp_loc_stack = self#location_stack pexp_loc_stack in let pexp_attributes = self#attributes pexp_attributes in { pexp_desc; pexp_loc; pexp_loc_stack; pexp_attributes } - - method expression_desc : expression_desc -> expression_desc = + method expression_desc : expression_desc -> expression_desc= fun x -> match x with - | Pexp_ident a -> - let a = self#loc self#longident a in - Pexp_ident a - | Pexp_constant a -> - let a = self#constant a in - Pexp_constant a + | Pexp_ident a -> let a = self#loc self#longident a in Pexp_ident a + | Pexp_constant a -> let a = self#constant a in Pexp_constant a | Pexp_let (a, b, c) -> let a = self#rec_flag a in let b = self#list self#value_binding b in - let c = self#expression c in - Pexp_let (a, b, c) + let c = self#expression c in Pexp_let (a, b, c) | Pexp_function (a, b, c) -> let a = self#list self#function_param a in let b = self#option self#type_constraint b in - let c = self#function_body c in - Pexp_function (a, b, c) + let c = self#function_body c in Pexp_function (a, b, c) | Pexp_apply (a, b) -> let a = self#expression a in let b = self#list (fun (a, b) -> - let a = self#arg_label a in - let b = self#expression b in - (a, b)) - b - in + let a = self#arg_label a in + let b = self#expression b in (a, b)) b in Pexp_apply (a, b) | Pexp_match (a, b) -> let a = self#expression a in - let b = self#cases b in - Pexp_match (a, b) + let b = self#cases b in Pexp_match (a, b) | Pexp_try (a, b) -> let a = self#expression a in - let b = self#cases b in - Pexp_try (a, b) - | Pexp_tuple a -> - let a = self#list self#expression a in - Pexp_tuple a + let b = self#cases b in Pexp_try (a, b) + | Pexp_tuple a -> let a = self#list self#expression a in Pexp_tuple a | Pexp_construct (a, b) -> let a = self#loc self#longident a in - let b = self#option self#expression b in - Pexp_construct (a, b) + let b = self#option self#expression b in Pexp_construct (a, b) | Pexp_variant (a, b) -> let a = self#label a in - let b = self#option self#expression b in - Pexp_variant (a, b) + let b = self#option self#expression b in Pexp_variant (a, b) | Pexp_record (a, b) -> let a = self#list (fun (a, b) -> - let a = self#loc self#longident a in - let b = self#expression b in - (a, b)) - a - in - let b = self#option self#expression b in - Pexp_record (a, b) + let a = self#loc self#longident a in + let b = self#expression b in (a, b)) a in + let b = self#option self#expression b in Pexp_record (a, b) | Pexp_field (a, b) -> let a = self#expression a in - let b = self#loc self#longident b in - Pexp_field (a, b) + let b = self#loc self#longident b in Pexp_field (a, b) | Pexp_setfield (a, b, c) -> let a = self#expression a in let b = self#loc self#longident b in - let c = self#expression c in - Pexp_setfield (a, b, c) - | Pexp_array a -> - let a = self#list self#expression a in - Pexp_array a + let c = self#expression c in Pexp_setfield (a, b, c) + | Pexp_array a -> let a = self#list self#expression a in Pexp_array a | Pexp_ifthenelse (a, b, c) -> let a = self#expression a in let b = self#expression b in @@ -1491,154 +1365,107 @@ class virtual map = Pexp_ifthenelse (a, b, c) | Pexp_sequence (a, b) -> let a = self#expression a in - let b = self#expression b in - Pexp_sequence (a, b) + let b = self#expression b in Pexp_sequence (a, b) | Pexp_while (a, b) -> let a = self#expression a in - let b = self#expression b in - Pexp_while (a, b) + let b = self#expression b in Pexp_while (a, b) | Pexp_for (a, b, c, d, e) -> let a = self#pattern a in let b = self#expression b in let c = self#expression c in let d = self#direction_flag d in - let e = self#expression e in - Pexp_for (a, b, c, d, e) + let e = self#expression e in Pexp_for (a, b, c, d, e) | Pexp_constraint (a, b) -> let a = self#expression a in - let b = self#core_type b in - Pexp_constraint (a, b) + let b = self#core_type b in Pexp_constraint (a, b) | Pexp_coerce (a, b, c) -> let a = self#expression a in let b = self#option self#core_type b in - let c = self#core_type c in - Pexp_coerce (a, b, c) + let c = self#core_type c in Pexp_coerce (a, b, c) | Pexp_send (a, b) -> let a = self#expression a in - let b = self#loc self#label b in - Pexp_send (a, b) - | Pexp_new a -> - let a = self#loc self#longident a in - Pexp_new a + let b = self#loc self#label b in Pexp_send (a, b) + | Pexp_new a -> let a = self#loc self#longident a in Pexp_new a | Pexp_setinstvar (a, b) -> let a = self#loc self#label a in - let b = self#expression b in - Pexp_setinstvar (a, b) + let b = self#expression b in Pexp_setinstvar (a, b) | Pexp_override a -> let a = self#list (fun (a, b) -> - let a = self#loc self#label a in - let b = self#expression b in - (a, b)) - a - in + let a = self#loc self#label a in + let b = self#expression b in (a, b)) a in Pexp_override a | Pexp_letmodule (a, b, c) -> let a = self#loc (self#option self#string) a in let b = self#module_expr b in - let c = self#expression c in - Pexp_letmodule (a, b, c) + let c = self#expression c in Pexp_letmodule (a, b, c) | Pexp_letexception (a, b) -> let a = self#extension_constructor a in - let b = self#expression b in - Pexp_letexception (a, b) - | Pexp_assert a -> - let a = self#expression a in - Pexp_assert a - | Pexp_lazy a -> - let a = self#expression a in - Pexp_lazy a + let b = self#expression b in Pexp_letexception (a, b) + | Pexp_assert a -> let a = self#expression a in Pexp_assert a + | Pexp_lazy a -> let a = self#expression a in Pexp_lazy a | Pexp_poly (a, b) -> let a = self#expression a in - let b = self#option self#core_type b in - Pexp_poly (a, b) - | Pexp_object a -> - let a = self#class_structure a in - Pexp_object a + let b = self#option self#core_type b in Pexp_poly (a, b) + | Pexp_object a -> let a = self#class_structure a in Pexp_object a | Pexp_newtype (a, b) -> let a = self#loc self#string a in - let b = self#expression b in - Pexp_newtype (a, b) - | Pexp_pack a -> - let a = self#module_expr a in - Pexp_pack a + let b = self#expression b in Pexp_newtype (a, b) + | Pexp_pack a -> let a = self#module_expr a in Pexp_pack a | Pexp_open (a, b) -> let a = self#open_declaration a in - let b = self#expression b in - Pexp_open (a, b) - | Pexp_letop a -> - let a = self#letop a in - Pexp_letop a - | Pexp_extension a -> - let a = self#extension a in - Pexp_extension a + let b = self#expression b in Pexp_open (a, b) + | Pexp_letop a -> let a = self#letop a in Pexp_letop a + | Pexp_extension a -> let a = self#extension a in Pexp_extension a | Pexp_unreachable -> Pexp_unreachable - - method case : case -> case = + method case : case -> case= fun { pc_lhs; pc_guard; pc_rhs } -> let pc_lhs = self#pattern pc_lhs in let pc_guard = self#option self#expression pc_guard in - let pc_rhs = self#expression pc_rhs in - { pc_lhs; pc_guard; pc_rhs } - - method letop : letop -> letop = + let pc_rhs = self#expression pc_rhs in { pc_lhs; pc_guard; pc_rhs } + method letop : letop -> letop= fun { let_; ands; body } -> let let_ = self#binding_op let_ in let ands = self#list self#binding_op ands in - let body = self#expression body in - { let_; ands; body } - - method binding_op : binding_op -> binding_op = + let body = self#expression body in { let_; ands; body } + method binding_op : binding_op -> binding_op= fun { pbop_op; pbop_pat; pbop_exp; pbop_loc } -> let pbop_op = self#loc self#string pbop_op in let pbop_pat = self#pattern pbop_pat in let pbop_exp = self#expression pbop_exp in let pbop_loc = self#location pbop_loc in { pbop_op; pbop_pat; pbop_exp; pbop_loc } - - method function_param_desc : function_param_desc -> function_param_desc = + method function_param_desc : function_param_desc -> function_param_desc= fun x -> match x with | Pparam_val (a, b, c) -> let a = self#arg_label a in let b = self#option self#expression b in - let c = self#pattern c in - Pparam_val (a, b, c) + let c = self#pattern c in Pparam_val (a, b, c) | Pparam_newtype a -> - let a = self#loc self#string a in - Pparam_newtype a - - method function_param : function_param -> function_param = + let a = self#loc self#string a in Pparam_newtype a + method function_param : function_param -> function_param= fun { pparam_loc; pparam_desc } -> let pparam_loc = self#location pparam_loc in let pparam_desc = self#function_param_desc pparam_desc in { pparam_loc; pparam_desc } - - method function_body : function_body -> function_body = + method function_body : function_body -> function_body= fun x -> match x with - | Pfunction_body a -> - let a = self#expression a in - Pfunction_body a + | Pfunction_body a -> let a = self#expression a in Pfunction_body a | Pfunction_cases (a, b, c) -> let a = self#cases a in let b = self#location b in - let c = self#attributes c in - Pfunction_cases (a, b, c) - - method type_constraint : type_constraint -> type_constraint = + let c = self#attributes c in Pfunction_cases (a, b, c) + method type_constraint : type_constraint -> type_constraint= fun x -> match x with - | Pconstraint a -> - let a = self#core_type a in - Pconstraint a + | Pconstraint a -> let a = self#core_type a in Pconstraint a | Pcoerce (a, b) -> let a = self#option self#core_type a in - let b = self#core_type b in - Pcoerce (a, b) - - method value_description : value_description -> value_description = + let b = self#core_type b in Pcoerce (a, b) + method value_description : value_description -> value_description= fun { pval_name; pval_type; pval_prim; pval_attributes; pval_loc } -> let pval_name = self#loc self#string pval_name in let pval_type = self#core_type pval_type in @@ -1646,42 +1473,27 @@ class virtual map = let pval_attributes = self#attributes pval_attributes in let pval_loc = self#location pval_loc in { pval_name; pval_type; pval_prim; pval_attributes; pval_loc } - - method type_declaration : type_declaration -> type_declaration = - fun { - ptype_name; - ptype_params; - ptype_cstrs; - ptype_kind; - ptype_private; - ptype_manifest; - ptype_attributes; - ptype_loc; - } -> + method type_declaration : type_declaration -> type_declaration= + fun + { ptype_name; ptype_params; ptype_cstrs; ptype_kind; ptype_private; + ptype_manifest; ptype_attributes; ptype_loc } + -> let ptype_name = self#loc self#string ptype_name in let ptype_params = self#list (fun (a, b) -> - let a = self#core_type a in - let b = - (fun (a, b) -> - let a = self#variance a in - let b = self#injectivity b in - (a, b)) - b - in - (a, b)) - ptype_params - in + let a = self#core_type a in + let b = + (fun (a, b) -> + let a = self#variance a in + let b = self#injectivity b in (a, b)) b in + (a, b)) ptype_params in let ptype_cstrs = self#list (fun (a, b, c) -> - let a = self#core_type a in - let b = self#core_type b in - let c = self#location c in - (a, b, c)) - ptype_cstrs - in + let a = self#core_type a in + let b = self#core_type b in + let c = self#location c in (a, b, c)) ptype_cstrs in let ptype_kind = self#type_kind ptype_kind in let ptype_private = self#private_flag ptype_private in let ptype_manifest = self#option self#core_type ptype_manifest in @@ -1695,10 +1507,9 @@ class virtual map = ptype_private; ptype_manifest; ptype_attributes; - ptype_loc; + ptype_loc } - - method type_kind : type_kind -> type_kind = + method type_kind : type_kind -> type_kind= fun x -> match x with | Ptype_abstract -> Ptype_abstract @@ -1706,11 +1517,9 @@ class virtual map = let a = self#list self#constructor_declaration a in Ptype_variant a | Ptype_record a -> - let a = self#list self#label_declaration a in - Ptype_record a + let a = self#list self#label_declaration a in Ptype_record a | Ptype_open -> Ptype_open - - method label_declaration : label_declaration -> label_declaration = + method label_declaration : label_declaration -> label_declaration= fun { pld_name; pld_mutable; pld_type; pld_loc; pld_attributes } -> let pld_name = self#loc self#string pld_name in let pld_mutable = self#mutable_flag pld_mutable in @@ -1718,10 +1527,10 @@ class virtual map = let pld_loc = self#location pld_loc in let pld_attributes = self#attributes pld_attributes in { pld_name; pld_mutable; pld_type; pld_loc; pld_attributes } - - method constructor_declaration - : constructor_declaration -> constructor_declaration = - fun { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } -> + method constructor_declaration : + constructor_declaration -> constructor_declaration= + fun { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } + -> let pcd_name = self#loc self#string pcd_name in let pcd_vars = self#list (self#loc self#string) pcd_vars in let pcd_args = self#constructor_arguments pcd_args in @@ -1729,45 +1538,31 @@ class virtual map = let pcd_loc = self#location pcd_loc in let pcd_attributes = self#attributes pcd_attributes in { pcd_name; pcd_vars; pcd_args; pcd_res; pcd_loc; pcd_attributes } - - method constructor_arguments - : constructor_arguments -> constructor_arguments = + method constructor_arguments : + constructor_arguments -> constructor_arguments= fun x -> match x with | Pcstr_tuple a -> - let a = self#list self#core_type a in - Pcstr_tuple a + let a = self#list self#core_type a in Pcstr_tuple a | Pcstr_record a -> - let a = self#list self#label_declaration a in - Pcstr_record a - - method type_extension : type_extension -> type_extension = - fun { - ptyext_path; - ptyext_params; - ptyext_constructors; - ptyext_private; - ptyext_loc; - ptyext_attributes; - } -> + let a = self#list self#label_declaration a in Pcstr_record a + method type_extension : type_extension -> type_extension= + fun + { ptyext_path; ptyext_params; ptyext_constructors; ptyext_private; + ptyext_loc; ptyext_attributes } + -> let ptyext_path = self#loc self#longident ptyext_path in let ptyext_params = self#list (fun (a, b) -> - let a = self#core_type a in - let b = - (fun (a, b) -> - let a = self#variance a in - let b = self#injectivity b in - (a, b)) - b - in - (a, b)) - ptyext_params - in + let a = self#core_type a in + let b = + (fun (a, b) -> + let a = self#variance a in + let b = self#injectivity b in (a, b)) b in + (a, b)) ptyext_params in let ptyext_constructors = - self#list self#extension_constructor ptyext_constructors - in + self#list self#extension_constructor ptyext_constructors in let ptyext_private = self#private_flag ptyext_private in let ptyext_loc = self#location ptyext_loc in let ptyext_attributes = self#attributes ptyext_attributes in @@ -1777,224 +1572,171 @@ class virtual map = ptyext_constructors; ptyext_private; ptyext_loc; - ptyext_attributes; + ptyext_attributes } - - method extension_constructor - : extension_constructor -> extension_constructor = + method extension_constructor : + extension_constructor -> extension_constructor= fun { pext_name; pext_kind; pext_loc; pext_attributes } -> let pext_name = self#loc self#string pext_name in let pext_kind = self#extension_constructor_kind pext_kind in let pext_loc = self#location pext_loc in let pext_attributes = self#attributes pext_attributes in { pext_name; pext_kind; pext_loc; pext_attributes } - - method type_exception : type_exception -> type_exception = + method type_exception : type_exception -> type_exception= fun { ptyexn_constructor; ptyexn_loc; ptyexn_attributes } -> let ptyexn_constructor = - self#extension_constructor ptyexn_constructor - in + self#extension_constructor ptyexn_constructor in let ptyexn_loc = self#location ptyexn_loc in let ptyexn_attributes = self#attributes ptyexn_attributes in { ptyexn_constructor; ptyexn_loc; ptyexn_attributes } - - method extension_constructor_kind - : extension_constructor_kind -> extension_constructor_kind = + method extension_constructor_kind : + extension_constructor_kind -> extension_constructor_kind= fun x -> match x with | Pext_decl (a, b, c) -> let a = self#list (self#loc self#string) a in let b = self#constructor_arguments b in - let c = self#option self#core_type c in - Pext_decl (a, b, c) - | Pext_rebind a -> - let a = self#loc self#longident a in - Pext_rebind a - - method class_type : class_type -> class_type = + let c = self#option self#core_type c in Pext_decl (a, b, c) + | Pext_rebind a -> let a = self#loc self#longident a in Pext_rebind a + method class_type : class_type -> class_type= fun { pcty_desc; pcty_loc; pcty_attributes } -> let pcty_desc = self#class_type_desc pcty_desc in let pcty_loc = self#location pcty_loc in let pcty_attributes = self#attributes pcty_attributes in { pcty_desc; pcty_loc; pcty_attributes } - - method class_type_desc : class_type_desc -> class_type_desc = + method class_type_desc : class_type_desc -> class_type_desc= fun x -> match x with | Pcty_constr (a, b) -> let a = self#loc self#longident a in - let b = self#list self#core_type b in - Pcty_constr (a, b) + let b = self#list self#core_type b in Pcty_constr (a, b) | Pcty_signature a -> - let a = self#class_signature a in - Pcty_signature a + let a = self#class_signature a in Pcty_signature a | Pcty_arrow (a, b, c) -> let a = self#arg_label a in let b = self#core_type b in - let c = self#class_type c in - Pcty_arrow (a, b, c) - | Pcty_extension a -> - let a = self#extension a in - Pcty_extension a + let c = self#class_type c in Pcty_arrow (a, b, c) + | Pcty_extension a -> let a = self#extension a in Pcty_extension a | Pcty_open (a, b) -> let a = self#open_description a in - let b = self#class_type b in - Pcty_open (a, b) - - method class_signature : class_signature -> class_signature = + let b = self#class_type b in Pcty_open (a, b) + method class_signature : class_signature -> class_signature= fun { pcsig_self; pcsig_fields } -> let pcsig_self = self#core_type pcsig_self in let pcsig_fields = self#list self#class_type_field pcsig_fields in { pcsig_self; pcsig_fields } - - method class_type_field : class_type_field -> class_type_field = + method class_type_field : class_type_field -> class_type_field= fun { pctf_desc; pctf_loc; pctf_attributes } -> let pctf_desc = self#class_type_field_desc pctf_desc in let pctf_loc = self#location pctf_loc in let pctf_attributes = self#attributes pctf_attributes in { pctf_desc; pctf_loc; pctf_attributes } - - method class_type_field_desc - : class_type_field_desc -> class_type_field_desc = + method class_type_field_desc : + class_type_field_desc -> class_type_field_desc= fun x -> match x with - | Pctf_inherit a -> - let a = self#class_type a in - Pctf_inherit a + | Pctf_inherit a -> let a = self#class_type a in Pctf_inherit a | Pctf_val a -> let a = (fun (a, b, c, d) -> - let a = self#loc self#label a in - let b = self#mutable_flag b in - let c = self#virtual_flag c in - let d = self#core_type d in - (a, b, c, d)) - a - in + let a = self#loc self#label a in + let b = self#mutable_flag b in + let c = self#virtual_flag c in + let d = self#core_type d in (a, b, c, d)) a in Pctf_val a | Pctf_method a -> let a = (fun (a, b, c, d) -> - let a = self#loc self#label a in - let b = self#private_flag b in - let c = self#virtual_flag c in ...TRUNCATED BY DUNE... + (self#tuple ctx [Stdlib.snd a; Stdlib.snd b]))) ctx + pci_params in + let pci_name = self#loc self#string ctx pci_name in + let pci_expr = _a ctx pci_expr in + let pci_loc = self#location ctx pci_loc in + let pci_attributes = self#attributes ctx pci_attributes in + ({ + pci_virt = (Stdlib.fst pci_virt); + pci_params = (Stdlib.fst pci_params); + pci_name = (Stdlib.fst pci_name); + pci_expr = (Stdlib.fst pci_expr); + pci_loc = (Stdlib.fst pci_loc); + pci_attributes = (Stdlib.fst pci_attributes) + }, + (self#record ctx + [("pci_virt", (Stdlib.snd pci_virt)); + ("pci_params", (Stdlib.snd pci_params)); + ("pci_name", (Stdlib.snd pci_name)); + ("pci_expr", (Stdlib.snd pci_expr)); + ("pci_loc", (Stdlib.snd pci_loc)); + ("pci_attributes", (Stdlib.snd pci_attributes))])) + method class_description : + 'ctx -> class_description -> (class_description * 'res)= + self#class_infos self#class_type + method class_type_declaration : + 'ctx -> class_type_declaration -> (class_type_declaration * 'res)= + self#class_infos self#class_type + method class_expr : 'ctx -> class_expr -> (class_expr * 'res)= + fun ctx -> + fun { pcl_desc; pcl_loc; pcl_attributes } -> + let pcl_desc = self#class_expr_desc ctx pcl_desc in + let pcl_loc = self#location ctx pcl_loc in + let pcl_attributes = self#attributes ctx pcl_attributes in + ({ + pcl_desc = (Stdlib.fst pcl_desc); + pcl_loc = (Stdlib.fst pcl_loc); + pcl_attributes = (Stdlib.fst pcl_attributes) + }, + (self#record ctx + [("pcl_desc", (Stdlib.snd pcl_desc)); + ("pcl_loc", (Stdlib.snd pcl_loc)); + ("pcl_attributes", (Stdlib.snd pcl_attributes))])) + method class_expr_desc : + 'ctx -> class_expr_desc -> (class_expr_desc * 'res)= + fun ctx -> + fun x -> + match x with + | Pcl_constr (a, b) -> + let a = self#loc self#longident ctx a in + let b = self#list self#core_type ctx b in + ((Pcl_constr ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pcl_constr" [Stdlib.snd a; Stdlib.snd b])) + | Pcl_structure a -> + let a = self#class_structure ctx a in + ((Pcl_structure (Stdlib.fst a)), + (self#constr ctx "Pcl_structure" [Stdlib.snd a])) + | Pcl_fun (a, b, c, d) -> + let a = self#arg_label ctx a in + let b = self#option self#expression ctx b in + let c = self#pattern ctx c in + let d = self#class_expr ctx d in + ((Pcl_fun + ((Stdlib.fst a), (Stdlib.fst b), (Stdlib.fst c), + (Stdlib.fst d))), + (self#constr ctx "Pcl_fun" + [Stdlib.snd a; Stdlib.snd b; Stdlib.snd c; Stdlib.snd d])) + | Pcl_apply (a, b) -> + let a = self#class_expr ctx a in + let b = + self#list + (fun ctx -> + fun (a, b) -> + let a = self#arg_label ctx a in + let b = self#expression ctx b in + (((Stdlib.fst a), (Stdlib.fst b)), + (self#tuple ctx [Stdlib.snd a; Stdlib.snd b]))) ctx + b in + ((Pcl_apply ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pcl_apply" [Stdlib.snd a; Stdlib.snd b])) + | Pcl_let (a, b, c) -> + let a = self#rec_flag ctx a in + let b = self#list self#value_binding ctx b in + let c = self#class_expr ctx c in + ((Pcl_let ((Stdlib.fst a), (Stdlib.fst b), (Stdlib.fst c))), + (self#constr ctx "Pcl_let" + [Stdlib.snd a; Stdlib.snd b; Stdlib.snd c])) + | Pcl_constraint (a, b) -> + let a = self#class_expr ctx a in + let b = self#class_type ctx b in + ((Pcl_constraint ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pcl_constraint" + [Stdlib.snd a; Stdlib.snd b])) + | Pcl_extension a -> + let a = self#extension ctx a in + ((Pcl_extension (Stdlib.fst a)), + (self#constr ctx "Pcl_extension" [Stdlib.snd a])) + | Pcl_open (a, b) -> + let a = self#open_description ctx a in + let b = self#class_expr ctx b in + ((Pcl_open ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pcl_open" [Stdlib.snd a; Stdlib.snd b])) + method class_structure : + 'ctx -> class_structure -> (class_structure * 'res)= + fun ctx -> + fun { pcstr_self; pcstr_fields } -> + let pcstr_self = self#pattern ctx pcstr_self in + let pcstr_fields = self#list self#class_field ctx pcstr_fields in + ({ + pcstr_self = (Stdlib.fst pcstr_self); + pcstr_fields = (Stdlib.fst pcstr_fields) + }, + (self#record ctx + [("pcstr_self", (Stdlib.snd pcstr_self)); + ("pcstr_fields", (Stdlib.snd pcstr_fields))])) + method class_field : 'ctx -> class_field -> (class_field * 'res)= + fun ctx -> + fun { pcf_desc; pcf_loc; pcf_attributes } -> + let pcf_desc = self#class_field_desc ctx pcf_desc in + let pcf_loc = self#location ctx pcf_loc in + let pcf_attributes = self#attributes ctx pcf_attributes in + ({ + pcf_desc = (Stdlib.fst pcf_desc); + pcf_loc = (Stdlib.fst pcf_loc); + pcf_attributes = (Stdlib.fst pcf_attributes) + }, + (self#record ctx + [("pcf_desc", (Stdlib.snd pcf_desc)); + ("pcf_loc", (Stdlib.snd pcf_loc)); + ("pcf_attributes", (Stdlib.snd pcf_attributes))])) + method class_field_desc : + 'ctx -> class_field_desc -> (class_field_desc * 'res)= + fun ctx -> + fun x -> + match x with + | Pcf_inherit (a, b, c) -> + let a = self#override_flag ctx a in + let b = self#class_expr ctx b in + let c = self#option (self#loc self#string) ctx c in + ((Pcf_inherit ((Stdlib.fst a), (Stdlib.fst b), (Stdlib.fst c))), + (self#constr ctx "Pcf_inherit" + [Stdlib.snd a; Stdlib.snd b; Stdlib.snd c])) + | Pcf_val a -> + let a = + (fun ctx -> + fun (a, b, c) -> + let a = self#loc self#label ctx a in + let b = self#mutable_flag ctx b in + let c = self#class_field_kind ctx c in + (((Stdlib.fst a), (Stdlib.fst b), (Stdlib.fst c)), + (self#tuple ctx + [Stdlib.snd a; Stdlib.snd b; Stdlib.snd c]))) ctx a in + ((Pcf_val (Stdlib.fst a)), + (self#constr ctx "Pcf_val" [Stdlib.snd a])) + | Pcf_method a -> + let a = + (fun ctx -> + fun (a, b, c) -> + let a = self#loc self#label ctx a in + let b = self#private_flag ctx b in + let c = self#class_field_kind ctx c in + (((Stdlib.fst a), (Stdlib.fst b), (Stdlib.fst c)), + (self#tuple ctx + [Stdlib.snd a; Stdlib.snd b; Stdlib.snd c]))) ctx a in + ((Pcf_method (Stdlib.fst a)), + (self#constr ctx "Pcf_method" [Stdlib.snd a])) + | Pcf_constraint a -> + let a = + (fun ctx -> + fun (a, b) -> + let a = self#core_type ctx a in + let b = self#core_type ctx b in + (((Stdlib.fst a), (Stdlib.fst b)), + (self#tuple ctx [Stdlib.snd a; Stdlib.snd b]))) ctx a in + ((Pcf_constraint (Stdlib.fst a)), + (self#constr ctx "Pcf_constraint" [Stdlib.snd a])) + | Pcf_initializer a -> + let a = self#expression ctx a in + ((Pcf_initializer (Stdlib.fst a)), + (self#constr ctx "Pcf_initializer" [Stdlib.snd a])) + | Pcf_attribute a -> + let a = self#attribute ctx a in + ((Pcf_attribute (Stdlib.fst a)), + (self#constr ctx "Pcf_attribute" [Stdlib.snd a])) + | Pcf_extension a -> + let a = self#extension ctx a in + ((Pcf_extension (Stdlib.fst a)), + (self#constr ctx "Pcf_extension" [Stdlib.snd a])) + method class_field_kind : + 'ctx -> class_field_kind -> (class_field_kind * 'res)= + fun ctx -> + fun x -> + match x with + | Cfk_virtual a -> + let a = self#core_type ctx a in + ((Cfk_virtual (Stdlib.fst a)), + (self#constr ctx "Cfk_virtual" [Stdlib.snd a])) + | Cfk_concrete (a, b) -> + let a = self#override_flag ctx a in + let b = self#expression ctx b in + ((Cfk_concrete ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Cfk_concrete" [Stdlib.snd a; Stdlib.snd b])) + method class_declaration : + 'ctx -> class_declaration -> (class_declaration * 'res)= + self#class_infos self#class_expr + method module_type : 'ctx -> module_type -> (module_type * 'res)= + fun ctx -> + fun { pmty_desc; pmty_loc; pmty_attributes } -> + let pmty_desc = self#module_type_desc ctx pmty_desc in + let pmty_loc = self#location ctx pmty_loc in + let pmty_attributes = self#attributes ctx pmty_attributes in + ({ + pmty_desc = (Stdlib.fst pmty_desc); + pmty_loc = (Stdlib.fst pmty_loc); + pmty_attributes = (Stdlib.fst pmty_attributes) + }, + (self#record ctx + [("pmty_desc", (Stdlib.snd pmty_desc)); + ("pmty_loc", (Stdlib.snd pmty_loc)); + ("pmty_attributes", (Stdlib.snd pmty_attributes))])) + method module_type_desc : + 'ctx -> module_type_desc -> (module_type_desc * 'res)= + fun ctx -> + fun x -> + match x with + | Pmty_ident a -> + let a = self#loc self#longident ctx a in + ((Pmty_ident (Stdlib.fst a)), + (self#constr ctx "Pmty_ident" [Stdlib.snd a])) + | Pmty_signature a -> + let a = self#signature ctx a in + ((Pmty_signature (Stdlib.fst a)), + (self#constr ctx "Pmty_signature" [Stdlib.snd a])) + | Pmty_functor (a, b) -> + let a = self#functor_parameter ctx a in + let b = self#module_type ctx b in + ((Pmty_functor ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pmty_functor" [Stdlib.snd a; Stdlib.snd b])) + | Pmty_with (a, b) -> + let a = self#module_type ctx a in + let b = self#list self#with_constraint ctx b in + ((Pmty_with ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pmty_with" [Stdlib.snd a; Stdlib.snd b])) + | Pmty_typeof a -> + let a = self#module_expr ctx a in + ((Pmty_typeof (Stdlib.fst a)), + (self#constr ctx "Pmty_typeof" [Stdlib.snd a])) + | Pmty_extension a -> + let a = self#extension ctx a in + ((Pmty_extension (Stdlib.fst a)), + (self#constr ctx "Pmty_extension" [Stdlib.snd a])) + | Pmty_alias a -> + let a = self#loc self#longident ctx a in + ((Pmty_alias (Stdlib.fst a)), + (self#constr ctx "Pmty_alias" [Stdlib.snd a])) + method functor_parameter : + 'ctx -> functor_parameter -> (functor_parameter * 'res)= + fun ctx -> + fun x -> + match x with + | Unit -> (Unit, (self#constr ctx "Unit" [])) + | Named (a, b) -> + let a = self#loc (self#option self#string) ctx a in + let b = self#module_type ctx b in + ((Named ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Named" [Stdlib.snd a; Stdlib.snd b])) + method signature : 'ctx -> signature -> (signature * 'res)= + self#list self#signature_item + method signature_item : + 'ctx -> signature_item -> (signature_item * 'res)= + fun ctx -> + fun { psig_desc; psig_loc } -> + let psig_desc = self#signature_item_desc ctx psig_desc in + let psig_loc = self#location ctx psig_loc in + ({ + psig_desc = (Stdlib.fst psig_desc); + psig_loc = (Stdlib.fst psig_loc) + }, + (self#record ctx + [("psig_desc", (Stdlib.snd psig_desc)); + ("psig_loc", (Stdlib.snd psig_loc))])) + method signature_item_desc : + 'ctx -> signature_item_desc -> (signature_item_desc * 'res)= + fun ctx -> + fun x -> + match x with + | Psig_value a -> + let a = self#value_description ctx a in + ((Psig_value (Stdlib.fst a)), + (self#constr ctx "Psig_value" [Stdlib.snd a])) + | Psig_type (a, b) -> + let a = self#rec_flag ctx a in + let b = self#list self#type_declaration ctx b in + ((Psig_type ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Psig_type" [Stdlib.snd a; Stdlib.snd b])) + | Psig_typesubst a -> + let a = self#list self#type_declaration ctx a in + ((Psig_typesubst (Stdlib.fst a)), + (self#constr ctx "Psig_typesubst" [Stdlib.snd a])) + | Psig_typext a -> + let a = self#type_extension ctx a in + ((Psig_typext (Stdlib.fst a)), + (self#constr ctx "Psig_typext" [Stdlib.snd a])) + | Psig_exception a -> + let a = self#type_exception ctx a in + ((Psig_exception (Stdlib.fst a)), + (self#constr ctx "Psig_exception" [Stdlib.snd a])) + | Psig_module a -> + let a = self#module_declaration ctx a in + ((Psig_module (Stdlib.fst a)), + (self#constr ctx "Psig_module" [Stdlib.snd a])) + | Psig_modsubst a -> + let a = self#module_substitution ctx a in + ((Psig_modsubst (Stdlib.fst a)), + (self#constr ctx "Psig_modsubst" [Stdlib.snd a])) + | Psig_recmodule a -> + let a = self#list self#module_declaration ctx a in + ((Psig_recmodule (Stdlib.fst a)), + (self#constr ctx "Psig_recmodule" [Stdlib.snd a])) + | Psig_modtype a -> + let a = self#module_type_declaration ctx a in + ((Psig_modtype (Stdlib.fst a)), + (self#constr ctx "Psig_modtype" [Stdlib.snd a])) + | Psig_modtypesubst a -> + let a = self#module_type_declaration ctx a in + ((Psig_modtypesubst (Stdlib.fst a)), + (self#constr ctx "Psig_modtypesubst" [Stdlib.snd a])) + | Psig_open a -> + let a = self#open_description ctx a in + ((Psig_open (Stdlib.fst a)), + (self#constr ctx "Psig_open" [Stdlib.snd a])) + | Psig_include a -> + let a = self#include_description ctx a in + ((Psig_include (Stdlib.fst a)), + (self#constr ctx "Psig_include" [Stdlib.snd a])) + | Psig_class a -> + let a = self#list self#class_description ctx a in + ((Psig_class (Stdlib.fst a)), + (self#constr ctx "Psig_class" [Stdlib.snd a])) + | Psig_class_type a -> + let a = self#list self#class_type_declaration ctx a in + ((Psig_class_type (Stdlib.fst a)), + (self#constr ctx "Psig_class_type" [Stdlib.snd a])) + | Psig_attribute a -> + let a = self#attribute ctx a in + ((Psig_attribute (Stdlib.fst a)), + (self#constr ctx "Psig_attribute" [Stdlib.snd a])) + | Psig_extension (a, b) -> + let a = self#extension ctx a in + let b = self#attributes ctx b in + ((Psig_extension ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Psig_extension" + [Stdlib.snd a; Stdlib.snd b])) + method module_declaration : + 'ctx -> module_declaration -> (module_declaration * 'res)= + fun ctx -> + fun { pmd_name; pmd_type; pmd_attributes; pmd_loc } -> + let pmd_name = self#loc (self#option self#string) ctx pmd_name in + let pmd_type = self#module_type ctx pmd_type in + let pmd_attributes = self#attributes ctx pmd_attributes in + let pmd_loc = self#location ctx pmd_loc in + ({ + pmd_name = (Stdlib.fst pmd_name); + pmd_type = (Stdlib.fst pmd_type); + pmd_attributes = (Stdlib.fst pmd_attributes); + pmd_loc = (Stdlib.fst pmd_loc) + }, + (self#record ctx + [("pmd_name", (Stdlib.snd pmd_name)); + ("pmd_type", (Stdlib.snd pmd_type)); + ("pmd_attributes", (Stdlib.snd pmd_attributes)); + ("pmd_loc", (Stdlib.snd pmd_loc))])) + method module_substitution : + 'ctx -> module_substitution -> (module_substitution * 'res)= + fun ctx -> + fun { pms_name; pms_manifest; pms_attributes; pms_loc } -> + let pms_name = self#loc self#string ctx pms_name in + let pms_manifest = self#loc self#longident ctx pms_manifest in + let pms_attributes = self#attributes ctx pms_attributes in + let pms_loc = self#location ctx pms_loc in + ({ + pms_name = (Stdlib.fst pms_name); + pms_manifest = (Stdlib.fst pms_manifest); + pms_attributes = (Stdlib.fst pms_attributes); + pms_loc = (Stdlib.fst pms_loc) + }, + (self#record ctx + [("pms_name", (Stdlib.snd pms_name)); + ("pms_manifest", (Stdlib.snd pms_manifest)); + ("pms_attributes", (Stdlib.snd pms_attributes)); + ("pms_loc", (Stdlib.snd pms_loc))])) + method module_type_declaration : + 'ctx -> module_type_declaration -> (module_type_declaration * 'res)= + fun ctx -> + fun { pmtd_name; pmtd_type; pmtd_attributes; pmtd_loc } -> + let pmtd_name = self#loc self#string ctx pmtd_name in + let pmtd_type = self#option self#module_type ctx pmtd_type in + let pmtd_attributes = self#attributes ctx pmtd_attributes in + let pmtd_loc = self#location ctx pmtd_loc in + ({ + pmtd_name = (Stdlib.fst pmtd_name); + pmtd_type = (Stdlib.fst pmtd_type); + pmtd_attributes = (Stdlib.fst pmtd_attributes); + pmtd_loc = (Stdlib.fst pmtd_loc) + }, + (self#record ctx + [("pmtd_name", (Stdlib.snd pmtd_name)); + ("pmtd_type", (Stdlib.snd pmtd_type)); + ("pmtd_attributes", (Stdlib.snd pmtd_attributes)); + ("pmtd_loc", (Stdlib.snd pmtd_loc))])) + method open_infos : + 'a . + ('ctx -> 'a -> ('a * 'res)) -> + 'ctx -> 'a open_infos -> ('a open_infos * 'res)= + fun _a -> + fun ctx -> + fun { popen_expr; popen_override; popen_loc; popen_attributes } -> + let popen_expr = _a ctx popen_expr in + let popen_override = self#override_flag ctx popen_override in + let popen_loc = self#location ctx popen_loc in + let popen_attributes = self#attributes ctx popen_attributes in + ({ + popen_expr = (Stdlib.fst popen_expr); + popen_override = (Stdlib.fst popen_override); + popen_loc = (Stdlib.fst popen_loc); + popen_attributes = (Stdlib.fst popen_attributes) + }, + (self#record ctx + [("popen_expr", (Stdlib.snd popen_expr)); + ("popen_override", (Stdlib.snd popen_override)); + ("popen_loc", (Stdlib.snd popen_loc)); + ("popen_attributes", (Stdlib.snd popen_attributes))])) + method open_description : + 'ctx -> open_description -> (open_description * 'res)= + self#open_infos (self#loc self#longident) + method open_declaration : + 'ctx -> open_declaration -> (open_declaration * 'res)= + self#open_infos self#module_expr + method include_infos : + 'a . + ('ctx -> 'a -> ('a * 'res)) -> + 'ctx -> 'a include_infos -> ('a include_infos * 'res)= + fun _a -> + fun ctx -> + fun { pincl_mod; pincl_loc; pincl_attributes } -> + let pincl_mod = _a ctx pincl_mod in + let pincl_loc = self#location ctx pincl_loc in + let pincl_attributes = self#attributes ctx pincl_attributes in + ({ + pincl_mod = (Stdlib.fst pincl_mod); + pincl_loc = (Stdlib.fst pincl_loc); + pincl_attributes = (Stdlib.fst pincl_attributes) + }, + (self#record ctx + [("pincl_mod", (Stdlib.snd pincl_mod)); + ("pincl_loc", (Stdlib.snd pincl_loc)); + ("pincl_attributes", (Stdlib.snd pincl_attributes))])) + method include_description : + 'ctx -> include_description -> (include_description * 'res)= + self#include_infos self#module_type + method include_declaration : + 'ctx -> include_declaration -> (include_declaration * 'res)= + self#include_infos self#module_expr + method with_constraint : + 'ctx -> with_constraint -> (with_constraint * 'res)= + fun ctx -> + fun x -> + match x with + | Pwith_type (a, b) -> + let a = self#loc self#longident ctx a in + let b = self#type_declaration ctx b in + ((Pwith_type ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pwith_type" [Stdlib.snd a; Stdlib.snd b])) + | Pwith_module (a, b) -> + let a = self#loc self#longident ctx a in + let b = self#loc self#longident ctx b in + ((Pwith_module ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pwith_module" [Stdlib.snd a; Stdlib.snd b])) + | Pwith_modtype (a, b) -> + let a = self#loc self#longident ctx a in + let b = self#module_type ctx b in + ((Pwith_modtype ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pwith_modtype" [Stdlib.snd a; Stdlib.snd b])) + | Pwith_modtypesubst (a, b) -> + let a = self#loc self#longident ctx a in + let b = self#module_type ctx b in + ((Pwith_modtypesubst ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pwith_modtypesubst" + [Stdlib.snd a; Stdlib.snd b])) + | Pwith_typesubst (a, b) -> + let a = self#loc self#longident ctx a in + let b = self#type_declaration ctx b in + ((Pwith_typesubst ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pwith_typesubst" + [Stdlib.snd a; Stdlib.snd b])) + | Pwith_modsubst (a, b) -> + let a = self#loc self#longident ctx a in + let b = self#loc self#longident ctx b in + ((Pwith_modsubst ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pwith_modsubst" + [Stdlib.snd a; Stdlib.snd b])) + method module_expr : 'ctx -> module_expr -> (module_expr * 'res)= + fun ctx -> + fun { pmod_desc; pmod_loc; pmod_attributes } -> + let pmod_desc = self#module_expr_desc ctx pmod_desc in + let pmod_loc = self#location ctx pmod_loc in + let pmod_attributes = self#attributes ctx pmod_attributes in + ({ + pmod_desc = (Stdlib.fst pmod_desc); + pmod_loc = (Stdlib.fst pmod_loc); + pmod_attributes = (Stdlib.fst pmod_attributes) + }, + (self#record ctx + [("pmod_desc", (Stdlib.snd pmod_desc)); + ("pmod_loc", (Stdlib.snd pmod_loc)); + ("pmod_attributes", (Stdlib.snd pmod_attributes))])) + method module_expr_desc : + 'ctx -> module_expr_desc -> (module_expr_desc * 'res)= + fun ctx -> + fun x -> + match x with + | Pmod_ident a -> + let a = self#loc self#longident ctx a in + ((Pmod_ident (Stdlib.fst a)), + (self#constr ctx "Pmod_ident" [Stdlib.snd a])) + | Pmod_structure a -> + let a = self#structure ctx a in + ((Pmod_structure (Stdlib.fst a)), + (self#constr ctx "Pmod_structure" [Stdlib.snd a])) + | Pmod_functor (a, b) -> + let a = self#functor_parameter ctx a in + let b = self#module_expr ctx b in + ((Pmod_functor ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pmod_functor" [Stdlib.snd a; Stdlib.snd b])) + | Pmod_apply (a, b) -> + let a = self#module_expr ctx a in + let b = self#module_expr ctx b in + ((Pmod_apply ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pmod_apply" [Stdlib.snd a; Stdlib.snd b])) + | Pmod_apply_unit a -> + let a = self#module_expr ctx a in + ((Pmod_apply_unit (Stdlib.fst a)), + (self#constr ctx "Pmod_apply_unit" [Stdlib.snd a])) + | Pmod_constraint (a, b) -> + let a = self#module_expr ctx a in + let b = self#module_type ctx b in + ((Pmod_constraint ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pmod_constraint" + [Stdlib.snd a; Stdlib.snd b])) + | Pmod_unpack a -> + let a = self#expression ctx a in + ((Pmod_unpack (Stdlib.fst a)), + (self#constr ctx "Pmod_unpack" [Stdlib.snd a])) + | Pmod_extension a -> + let a = self#extension ctx a in + ((Pmod_extension (Stdlib.fst a)), + (self#constr ctx "Pmod_extension" [Stdlib.snd a])) + method structure : 'ctx -> structure -> (structure * 'res)= + self#list self#structure_item + method structure_item : + 'ctx -> structure_item -> (structure_item * 'res)= + fun ctx -> + fun { pstr_desc; pstr_loc } -> + let pstr_desc = self#structure_item_desc ctx pstr_desc in + let pstr_loc = self#location ctx pstr_loc in + ({ + pstr_desc = (Stdlib.fst pstr_desc); + pstr_loc = (Stdlib.fst pstr_loc) + }, + (self#record ctx + [("pstr_desc", (Stdlib.snd pstr_desc)); + ("pstr_loc", (Stdlib.snd pstr_loc))])) + method structure_item_desc : + 'ctx -> structure_item_desc -> (structure_item_desc * 'res)= + fun ctx -> + fun x -> + match x with + | Pstr_eval (a, b) -> + let a = self#expression ctx a in + let b = self#attributes ctx b in + ((Pstr_eval ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pstr_eval" [Stdlib.snd a; Stdlib.snd b])) + | Pstr_value (a, b) -> + let a = self#rec_flag ctx a in + let b = self#list self#value_binding ctx b in + ((Pstr_value ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pstr_value" [Stdlib.snd a; Stdlib.snd b])) + | Pstr_primitive a -> + let a = self#value_description ctx a in + ((Pstr_primitive (Stdlib.fst a)), + (self#constr ctx "Pstr_primitive" [Stdlib.snd a])) + | Pstr_type (a, b) -> + let a = self#rec_flag ctx a in + let b = self#list self#type_declaration ctx b in + ((Pstr_type ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pstr_type" [Stdlib.snd a; Stdlib.snd b])) + | Pstr_typext a -> + let a = self#type_extension ctx a in + ((Pstr_typext (Stdlib.fst a)), + (self#constr ctx "Pstr_typext" [Stdlib.snd a])) + | Pstr_exception a -> + let a = self#type_exception ctx a in + ((Pstr_exception (Stdlib.fst a)), + (self#constr ctx "Pstr_exception" [Stdlib.snd a])) + | Pstr_module a -> + let a = self#module_binding ctx a in + ((Pstr_module (Stdlib.fst a)), + (self#constr ctx "Pstr_module" [Stdlib.snd a])) + | Pstr_recmodule a -> + let a = self#list self#module_binding ctx a in + ((Pstr_recmodule (Stdlib.fst a)), + (self#constr ctx "Pstr_recmodule" [Stdlib.snd a])) + | Pstr_modtype a -> + let a = self#module_type_declaration ctx a in + ((Pstr_modtype (Stdlib.fst a)), + (self#constr ctx "Pstr_modtype" [Stdlib.snd a])) + | Pstr_open a -> + let a = self#open_declaration ctx a in + ((Pstr_open (Stdlib.fst a)), + (self#constr ctx "Pstr_open" [Stdlib.snd a])) + | Pstr_class a -> + let a = self#list self#class_declaration ctx a in + ((Pstr_class (Stdlib.fst a)), + (self#constr ctx "Pstr_class" [Stdlib.snd a])) + | Pstr_class_type a -> + let a = self#list self#class_type_declaration ctx a in + ((Pstr_class_type (Stdlib.fst a)), + (self#constr ctx "Pstr_class_type" [Stdlib.snd a])) + | Pstr_include a -> + let a = self#include_declaration ctx a in + ((Pstr_include (Stdlib.fst a)), + (self#constr ctx "Pstr_include" [Stdlib.snd a])) + | Pstr_attribute a -> + let a = self#attribute ctx a in + ((Pstr_attribute (Stdlib.fst a)), + (self#constr ctx "Pstr_attribute" [Stdlib.snd a])) + | Pstr_extension (a, b) -> + let a = self#extension ctx a in + let b = self#attributes ctx b in + ((Pstr_extension ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pstr_extension" + [Stdlib.snd a; Stdlib.snd b])) + method value_constraint : + 'ctx -> value_constraint -> (value_constraint * 'res)= + fun ctx -> + fun x -> + match x with + | Pvc_constraint { locally_abstract_univars; typ } -> + let locally_abstract_univars = + self#list (self#loc self#string) ctx locally_abstract_univars in + let typ = self#core_type ctx typ in + ((Pvc_constraint + { + locally_abstract_univars = + (Stdlib.fst locally_abstract_univars); + typ = (Stdlib.fst typ) + }), + (self#constr ctx "Pvc_constraint" + [self#record ctx + [("locally_abstract_univars", + (Stdlib.snd locally_abstract_univars)); + ("typ", (Stdlib.snd typ))]])) + | Pvc_coercion { ground; coercion } -> + let ground = self#option self#core_type ctx ground in + let coercion = self#core_type ctx coercion in + ((Pvc_coercion + { + ground = (Stdlib.fst ground); + coercion = (Stdlib.fst coercion) + }), + (self#constr ctx "Pvc_coercion" + [self#record ctx + [("ground", (Stdlib.snd ground)); + ("coercion", (Stdlib.snd coercion))]])) + method value_binding : 'ctx -> value_binding -> (value_binding * 'res)= + fun ctx -> + fun { pvb_pat; pvb_expr; pvb_constraint; pvb_attributes; pvb_loc } -> + let pvb_pat = self#pattern ctx pvb_pat in + let pvb_expr = self#expression ctx pvb_expr in + let pvb_constraint = + self#option self#value_constraint ctx pvb_constraint in + let pvb_attributes = self#attributes ctx pvb_attributes in + let pvb_loc = self#location ctx pvb_loc in + ({ + pvb_pat = (Stdlib.fst pvb_pat); + pvb_expr = (Stdlib.fst pvb_expr); + pvb_constraint = (Stdlib.fst pvb_constraint); + pvb_attributes = (Stdlib.fst pvb_attributes); + pvb_loc = (Stdlib.fst pvb_loc) + }, + (self#record ctx + [("pvb_pat", (Stdlib.snd pvb_pat)); + ("pvb_expr", (Stdlib.snd pvb_expr)); + ("pvb_constraint", (Stdlib.snd pvb_constraint)); + ("pvb_attributes", (Stdlib.snd pvb_attributes)); + ("pvb_loc", (Stdlib.snd pvb_loc))])) + method module_binding : + 'ctx -> module_binding -> (module_binding * 'res)= + fun ctx -> + fun { pmb_name; pmb_expr; pmb_attributes; pmb_loc } -> + let pmb_name = self#loc (self#option self#string) ctx pmb_name in + let pmb_expr = self#module_expr ctx pmb_expr in + let pmb_attributes = self#attributes ctx pmb_attributes in + let pmb_loc = self#location ctx pmb_loc in + ({ + pmb_name = (Stdlib.fst pmb_name); + pmb_expr = (Stdlib.fst pmb_expr); + pmb_attributes = (Stdlib.fst pmb_attributes); + pmb_loc = (Stdlib.fst pmb_loc) + }, + (self#record ctx + [("pmb_name", (Stdlib.snd pmb_name)); + ("pmb_expr", (Stdlib.snd pmb_expr)); + ("pmb_attributes", (Stdlib.snd pmb_attributes)); + ("pmb_loc", (Stdlib.snd pmb_loc))])) + method toplevel_phrase : + 'ctx -> toplevel_phrase -> (toplevel_phrase * 'res)= + fun ctx -> + fun x -> + match x with + | Ptop_def a -> + let a = self#structure ctx a in + ((Ptop_def (Stdlib.fst a)), + (self#constr ctx "Ptop_def" [Stdlib.snd a])) + | Ptop_dir a -> + let a = self#toplevel_directive ctx a in + ((Ptop_dir (Stdlib.fst a)), + (self#constr ctx "Ptop_dir" [Stdlib.snd a])) + method toplevel_directive : + 'ctx -> toplevel_directive -> (toplevel_directive * 'res)= + fun ctx -> + fun { pdir_name; pdir_arg; pdir_loc } -> + let pdir_name = self#loc self#string ctx pdir_name in + let pdir_arg = self#option self#directive_argument ctx pdir_arg in + let pdir_loc = self#location ctx pdir_loc in + ({ + pdir_name = (Stdlib.fst pdir_name); + pdir_arg = (Stdlib.fst pdir_arg); + pdir_loc = (Stdlib.fst pdir_loc) + }, + (self#record ctx + [("pdir_name", (Stdlib.snd pdir_name)); + ("pdir_arg", (Stdlib.snd pdir_arg)); + ("pdir_loc", (Stdlib.snd pdir_loc))])) + method directive_argument : + 'ctx -> directive_argument -> (directive_argument * 'res)= + fun ctx -> + fun { pdira_desc; pdira_loc } -> + let pdira_desc = self#directive_argument_desc ctx pdira_desc in + let pdira_loc = self#location ctx pdira_loc in + ({ + pdira_desc = (Stdlib.fst pdira_desc); + pdira_loc = (Stdlib.fst pdira_loc) + }, + (self#record ctx + [("pdira_desc", (Stdlib.snd pdira_desc)); + ("pdira_loc", (Stdlib.snd pdira_loc))])) + method directive_argument_desc : + 'ctx -> directive_argument_desc -> (directive_argument_desc * 'res)= + fun ctx -> + fun x -> + match x with + | Pdir_string a -> + let a = self#string ctx a in + ((Pdir_string (Stdlib.fst a)), + (self#constr ctx "Pdir_string" [Stdlib.snd a])) + | Pdir_int (a, b) -> + let a = self#string ctx a in + let b = self#option self#char ctx b in + ((Pdir_int ((Stdlib.fst a), (Stdlib.fst b))), + (self#constr ctx "Pdir_int" [Stdlib.snd a; Stdlib.snd b])) + | Pdir_ident a -> + let a = self#longident ctx a in + ((Pdir_ident (Stdlib.fst a)), + (self#constr ctx "Pdir_ident" [Stdlib.snd a])) + | Pdir_bool a -> + let a = self#bool ctx a in + ((Pdir_bool (Stdlib.fst a)), + (self#constr ctx "Pdir_bool" [Stdlib.snd a])) + method cases : 'ctx -> cases -> (cases * 'res)= self#list self#case end [@@@end] "/usr/bin/env" "bash" "-c" "cd ./src && opam exec -- dune build @install @check @runtest && rm -rf _build" failed with exit status 1 2024-08-21 17:16.15: Job failed: Failed: Build failed