2025-08-11 12:13.23: New job: test ocaml-ppx/ppxlib https://github.com/ocaml-ppx/ppxlib.git#refs/pull/589/head (e516f47c64a6b9890c304f454a70725b8af38173) (freebsd-x86_64:freebsd-14.2-4.14_opam-2.4) Base: freebsd-14.2-ocaml-4.14 Opam project build To reproduce locally: git clone --recursive "https://github.com/ocaml-ppx/ppxlib.git" && cd "ppxlib" && git fetch origin "refs/pull/589/head" && git reset --hard e516f47c cat > Dockerfile <<'END-OF-DOCKERFILE' FROM freebsd-14.2-ocaml-4.14 # freebsd-14.2-4.14_opam-2.4 USER 1000:1000 ENV CLICOLOR_FORCE="1" ENV OPAMCOLOR="always" WORKDIR /src RUN sudo ln -f /usr/local/bin/opam-2.4 /usr/local/bin/opam RUN opam init --reinit -ni RUN uname -rs && opam exec -- ocaml -version && opam --version WORKDIR /src RUN sudo chown opam /src RUN cd ~/opam-repository && (git cat-file -e b8021439f8c57ba6435bc2263f6596671f4f4466 || git fetch origin master) && git reset -q --hard b8021439f8c57ba6435bc2263f6596671f4f4466 && git log --no-decorate -n1 --oneline && opam update -u COPY --chown=1000:1000 ppxlib.opam ppxlib-tools.opam ppxlib-bench.opam ./ RUN opam pin add -yn ppxlib.dev './' && \ opam pin add -yn ppxlib-tools.dev './' && \ opam pin add -yn ppxlib-bench.dev './' RUN echo '(lang dune 3.0)' > './dune-project' ENV DEPS="base.v0.16.4 base-bigarray.base base-threads.base base-unix.base cinaps.v0.15.1 cmdliner.1.3.0 csexp.1.5.2 dune.3.19.1 dune-configurator.3.19.1 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-compiler-libs.v0.12.4 ocaml-config.2 ocaml-options-vanilla.1 ocamlfind.1.9.8 ppx_derivers.1.2.1 re.1.13.2 seq.base sexplib0.v0.16.0 stdlib-shims.0.3.0 yojson.3.0.0" ENV CI="true" ENV OCAMLCI="true" RUN opam update --depexts && opam install --cli=2.4 --depext-only -y ppxlib.dev ppxlib-tools.dev ppxlib-bench.dev $DEPS RUN opam install $DEPS COPY --chown=1000:1000 . /src RUN opam exec -- dune build @install @check @runtest && rm -rf _build END-OF-DOCKERFILE docker build . END-REPRO-BLOCK 2025-08-11 12:13.23: Using cache hint "ocaml-ppx/ppxlib-freebsd-14.2-ocaml-4.14-freebsd-14.2-4.14_opam-2.4-b68e9df276868c41024ba0e8680a3274" 2025-08-11 12:13.23: Using OBuilder spec: ((from freebsd-14.2-ocaml-4.14) (comment freebsd-14.2-4.14_opam-2.4) (user (uid 1000) (gid 1000)) (env CLICOLOR_FORCE 1) (env OPAMCOLOR always) (workdir /src) (run (shell "sudo ln -f /usr/local/bin/opam-2.4 /usr/local/bin/opam")) (run (shell "opam init --reinit -ni")) (run (shell "uname -rs && opam exec -- ocaml -version && opam --version")) (workdir /src) (run (shell "sudo chown opam /src")) (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "cd ~/opam-repository && (git cat-file -e b8021439f8c57ba6435bc2263f6596671f4f4466 || git fetch origin master) && git reset -q --hard b8021439f8c57ba6435bc2263f6596671f4f4466 && git log --no-decorate -n1 --oneline && opam update -u")) (copy (src ppxlib.opam ppxlib-tools.opam ppxlib-bench.opam) (dst ./)) (run (network host) (shell "opam pin add -yn ppxlib.dev './' && \ \nopam pin add -yn ppxlib-tools.dev './' && \ \nopam pin add -yn ppxlib-bench.dev './'")) (run (network host) (shell "echo '(lang dune 3.0)' > './dune-project'")) (env DEPS "base.v0.16.4 base-bigarray.base base-threads.base base-unix.base cinaps.v0.15.1 cmdliner.1.3.0 csexp.1.5.2 dune.3.19.1 dune-configurator.3.19.1 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-compiler-libs.v0.12.4 ocaml-config.2 ocaml-options-vanilla.1 ocamlfind.1.9.8 ppx_derivers.1.2.1 re.1.13.2 seq.base sexplib0.v0.16.0 stdlib-shims.0.3.0 yojson.3.0.0") (env CI true) (env OCAMLCI true) (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "opam update --depexts && opam install --cli=2.4 --depext-only -y ppxlib.dev ppxlib-tools.dev ppxlib-bench.dev $DEPS")) (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "opam install $DEPS")) (copy (src .) (dst /src)) (run (shell "opam exec -- dune build @install @check @runtest && rm -rf _build")) ) 2025-08-11 12:13.23: Waiting for resource in pool OCluster 2025-08-11 12:13.23: Waiting for worker… 2025-08-11 12:13.23: Got resource from pool OCluster Building on rosemary All commits already cached Updating files: 100% (422/422), done. HEAD is now at e516f47c TMP (from freebsd-14.2-ocaml-4.14) 2025-08-11 12:14.21 ---> using "e232d73c9161ea3ff94ff4ae2b5a6983da9a9ca98d5185b2db1dbadeae5228e2" from cache /: (comment freebsd-14.2-4.14_opam-2.4) /: (user (uid 1000) (gid 1000)) /: (env CLICOLOR_FORCE 1) /: (env OPAMCOLOR always) /: (workdir /src) /src: (run (shell "sudo ln -f /usr/local/bin/opam-2.4 /usr/local/bin/opam")) 2025-08-11 12:14.22 ---> using "ab3b72ff1bef5200ab51bf41b5ce466d603a607c082bc77b8cb9a89bd0ee8e2b" from cache /src: (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 /home/opam/.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:///home/opam/opam-repository 2025-08-11 12:14.28 ---> using "4f5272944a297469599fadae70be6af0a741315c350ad35dc552c1741ce274b4" from cache /src: (run (shell "uname -rs && opam exec -- ocaml -version && opam --version")) FreeBSD 14.2-RELEASE-p1 The OCaml toplevel, version 4.14.2 2.4.1 2025-08-11 12:14.28 ---> using "07a4e313abba0673771074c9860cdd9543e4761d68d2fb7c6d7221bc739a7e75" from cache /src: (workdir /src) /src: (run (shell "sudo chown opam /src")) 2025-08-11 12:14.29 ---> using "3a9f22eefbfbdecb5fa973f708084041cdbe652271a081208757b5e926d582b0" from cache /src: (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "cd ~/opam-repository && (git cat-file -e b8021439f8c57ba6435bc2263f6596671f4f4466 || git fetch origin master) && git reset -q --hard b8021439f8c57ba6435bc2263f6596671f4f4466 && git log --no-decorate -n1 --oneline && opam update -u")) b8021439f8 Merge pull request #28261 from kit-ty-kate/deploy-fix-25819 <><> Updating package repositories ><><><><><><><><><><><><><><><><><><><><><><> [default] synchronised from git+file:///home/opam/opam-repository Everything as up-to-date as possible The following packages are not being upgraded because the new versions conflict with other installed packages: - ocaml.5.3.0 - ocaml-config.3 However, you may "opam upgrade" these packages explicitly at these versions (e.g. "opam upgrade ocaml.5.3.0"), which will ask permission to downgrade or uninstall the conflicting packages. Nothing to do. 2025-08-11 12:14.29 ---> using "afc339d1b2a1c40db19982477129f6c35590b586ab7eeeefeb6f3dc3383296c2" from cache /src: (copy (src ppxlib.opam ppxlib-tools.opam ppxlib-bench.opam) (dst ./)) 2025-08-11 12:14.30 ---> using "d8be26c8503752efa401071aea35ea928eebbce3abf5fb657523fddc2e04e01c" from cache /src: (run (network host) (shell "opam pin add -yn ppxlib.dev './' && \ \nopam pin add -yn ppxlib-tools.dev './' && \ \nopam pin add -yn ppxlib-bench.dev './'")) [ppxlib.dev] synchronised (file:///src) ppxlib is now pinned to file:///src (version dev) [ppxlib-tools.dev] synchronised (file:///src) ppxlib-tools is now pinned to file:///src (version dev) [NOTE] Package ppxlib-bench does not exist in opam repositories registered in the current switch. [ppxlib-bench.dev] synchronised (file:///src) ppxlib-bench is now pinned to file:///src (version dev) 2025-08-11 12:14.31 ---> using "216d0531882784b7ca5d2185219381566b4b37bd18487f56c727abc1c5d5599c" from cache /src: (run (network host) (shell "echo '(lang dune 3.0)' > './dune-project'")) 2025-08-11 12:14.32 ---> using "49e6b53b0ce6337d05f5b39923d53bf55311e8093b5acb4bdf78fcc1bc173e5b" from cache /src: (env DEPS "base.v0.16.4 base-bigarray.base base-threads.base base-unix.base cinaps.v0.15.1 cmdliner.1.3.0 csexp.1.5.2 dune.3.19.1 dune-configurator.3.19.1 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-compiler-libs.v0.12.4 ocaml-config.2 ocaml-options-vanilla.1 ocamlfind.1.9.8 ppx_derivers.1.2.1 re.1.13.2 seq.base sexplib0.v0.16.0 stdlib-shims.0.3.0 yojson.3.0.0") /src: (env CI true) /src: (env OCAMLCI true) /src: (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (network host) (shell "opam update --depexts && opam install --cli=2.4 --depext-only -y ppxlib.dev ppxlib-tools.dev ppxlib-bench.dev $DEPS")) [WARNING] Unknown update command for bsd, skipping system update <><> Synchronising pinned packages ><><><><><><><><><><><><><><><><><><><><><><> [ppxlib-tools.dev] synchronised (file:///src) [ppxlib-bench.dev] synchronised (file:///src) [ppxlib.dev] synchronised (file:///src) [NOTE] Package ocaml-options-vanilla is already installed (current version is 1). [NOTE] Package ocaml-config is already installed (current version is 2). [NOTE] Package ocaml-base-compiler is already installed (current version is 4.14.2). [NOTE] Package ocaml is already installed (current version is 4.14.2). [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-bigarray is already installed (current version is base). 2025-08-11 12:14.32 ---> using "2e8c75dcf6940011b7c8213673343479128886af850bb783bf6103ed95077d75" from cache /src: (run (cache (opam-archives (target /home/opam/.opam/download-cache))) (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 2). [NOTE] Package ocaml-base-compiler is already installed (current version is 4.14.2). [NOTE] Package ocaml is already installed (current version is 4.14.2). [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-bigarray is already installed (current version is base). The following actions will be performed: === install 14 packages ∗ base v0.16.4 ∗ cinaps v0.15.1 ∗ cmdliner 1.3.0 ∗ csexp 1.5.2 ∗ dune 3.19.1 ∗ dune-configurator 3.19.1 ∗ ocaml-compiler-libs v0.12.4 ∗ ocamlfind 1.9.8 ∗ ppx_derivers 1.2.1 ∗ re 1.13.2 ∗ seq base ∗ sexplib0 v0.16.0 ∗ stdlib-shims 0.3.0 ∗ yojson 3.0.0 <><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><> ⬇ retrieved cinaps.v0.15.1 (cached) ⬇ retrieved cmdliner.1.3.0 (cached) ⬇ retrieved csexp.1.5.2 (cached) ⬇ retrieved base.v0.16.4 (cached) ⬇ retrieved ocaml-compiler-libs.v0.12.4 (cached) ⬇ retrieved ppx_derivers.1.2.1 (cached) ⬇ retrieved ocamlfind.1.9.8 (cached) ⬇ retrieved seq.base (cached) ∗ installed seq.base ⬇ retrieved sexplib0.v0.16.0 (cached) ⬇ retrieved re.1.13.2 (cached) ⬇ retrieved stdlib-shims.0.3.0 (cached) ⬇ retrieved yojson.3.0.0 (cached) ⬇ retrieved dune.3.19.1, dune-configurator.3.19.1 (cached) ∗ installed cmdliner.1.3.0 ∗ installed ocamlfind.1.9.8 ∗ installed dune.3.19.1 ∗ installed csexp.1.5.2 ∗ installed yojson.3.0.0 ∗ installed stdlib-shims.0.3.0 ∗ installed sexplib0.v0.16.0 ∗ installed re.1.13.2 ∗ installed ppx_derivers.1.2.1 ∗ installed ocaml-compiler-libs.v0.12.4 ∗ installed cinaps.v0.15.1 ∗ installed dune-configurator.3.19.1 ∗ installed base.v0.16.4 Done. 2025-08-11 12:14.33 ---> using "3c9c7b131095a44dda1f8476b6402302c473d448b206c6a13a9555f507d6c800" from cache /src: (copy (src .) (dst /src)) 2025-08-11 12:14.47 ---> saved as "0d9ea804e04c21ac4e7712cb0efd9d021a9e1b457851bedcd2cc9677f22907ef" /src: (run (shell "opam exec -- dune build @install @check @runtest && rm -rf _build")) (cd _build/default && .bin/expect-test test/ast_builder_value_binding/test.ml) Cannot find type Topdirs.printer_type_new. Cannot find type Topdirs.printer_type_new. Cannot find type Topdirs.printer_type_new. File "test/ast_builder_value_binding/test.ml", line 1, characters 0-0: /usr/local/bin/git --no-pager diff --no-index --color=always -u _build/default/test/ast_builder_value_binding/test.ml _build/default/test/ast_builder_value_binding/test.ml.corrected diff --git a/_build/default/test/ast_builder_value_binding/test.ml b/_build/default/test/ast_builder_value_binding/test.ml.corrected index 4cc4564..b6a1c2a 100644 --- a/_build/default/test/ast_builder_value_binding/test.ml +++ b/_build/default/test/ast_builder_value_binding/test.ml.corrected @@ -26,32 +26,155 @@ let vb = [%%expect{| val vb : structure_item = - Pstr_value - ( Nonrecursive - , [ { pvb_pat = Ppat_var "f" - ; pvb_expr = - Pexp_function - ( [ { pparam_loc = __loc - ; pparam_desc = Pparam_val ( Nolabel, None, Ppat_var "x") - } - ] - , None - , Pfunction_body - (Pexp_apply - ( Pexp_ident (Lident "+") - , [ ( Nolabel, Pexp_ident (Lident "x")) - ; ( Nolabel - , Pexp_constant (Pconst_integer ( "1", None)) - ) - ] - )) - ) - ; pvb_constraint = None - ; pvb_attributes = __attrs - ; pvb_loc = __loc - } - ] - ) + {Ppxlib__.Import.pstr_desc = + Ppxlib__.Import.Pstr_value (Ppxlib__.Import.Nonrecursive, + [{Ppxlib__.Import.pvb_pat = + {Ppxlib__.Import.ppat_desc = + Ppxlib__.Import.Ppat_var + {Ppxlib__.Import.txt = "f"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}; + ppat_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}; + ppat_loc_stack = []; ppat_attributes = []}; + pvb_expr = + {Ppxlib__.Import.pexp_desc = + Ppxlib__.Import.Pexp_function + ([{Ppxlib__.Import.pparam_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + pparam_desc = + Ppxlib__.Import.Pparam_val (Ppxlib__.Import.Nolabel, None, + {Ppxlib__.Import.ppat_desc = + Ppxlib__.Import.Ppat_var + {Ppxlib__.Import.txt = "x"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}; + ppat_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ppat_loc_stack = []; ppat_attributes = []})}], + None, + Ppxlib__.Import.Pfunction_body + {Ppxlib__.Import.pexp_desc = + Ppxlib__.Import.Pexp_apply + ({Ppxlib__.Import.pexp_desc = + Ppxlib__.Import.Pexp_ident + {Ppxlib__.Import.txt = Ppxlib__.Import.Lident "+"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}; + pexp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + pexp_loc_stack = []; pexp_attributes = []}, + [(Ppxlib__.Import.Nolabel, + {Ppxlib__.Import.pexp_desc = + Ppxlib__.Import.Pexp_ident + {Ppxlib__.Import.txt = Ppxlib__.Import.Lident "x"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}; + pexp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + pexp_loc_stack = []; pexp_attributes = []}); + (Ppxlib__.Import.Nolabel, + {Ppxlib__.Import.pexp_desc = + Ppxlib__.Import.Pexp_constant + (Ppxlib__.Import.Pconst_integer ("1", None)); + pexp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + pexp_loc_stack = []; pexp_attributes = []})]); + pexp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + pexp_loc_stack = []; pexp_attributes = []}); + pexp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}; + pexp_loc_stack = []; pexp_attributes = []}; + pvb_constraint = None; pvb_attributes = []; + pvb_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}}]); + pstr_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}} |}] (* As expected here, the [pvb_constraint] field is none, the pattern and @@ -69,21 +192,85 @@ let vb = [%%expect{| val vb : structure_item = - Pstr_value - ( Nonrecursive - , [ { pvb_pat = Ppat_var "x" - ; pvb_expr = Pexp_constant (Pconst_integer ( "12", None)) - ; pvb_constraint = - Some - (Pvc_constraint - { locally_abstract_univars = [] - ; typ = Ptyp_constr ( Lident "int", []) - }) - ; pvb_attributes = __attrs - ; pvb_loc = __loc - } - ] - ) + {Ppxlib__.Import.pstr_desc = + Ppxlib__.Import.Pstr_value (Ppxlib__.Import.Nonrecursive, + [{Ppxlib__.Import.pvb_pat = + {Ppxlib__.Import.ppat_desc = + Ppxlib__.Import.Ppat_var + {Ppxlib__.Import.txt = "x"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}; + ppat_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}; + ppat_loc_stack = []; ppat_attributes = []}; + pvb_expr = + {Ppxlib__.Import.pexp_desc = + Ppxlib__.Import.Pexp_constant + (Ppxlib__.Import.Pconst_integer ("12", None)); + pexp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}; + pexp_loc_stack = []; pexp_attributes = []}; + pvb_constraint = + Some + (Ppxlib__.Import.Pvc_constraint + {Ppxlib__.Import.locally_abstract_univars = []; + typ = + {Ppxlib__.Import.ptyp_desc = + Ppxlib__.Import.Ptyp_constr + ({Ppxlib__.Import.txt = Ppxlib__.Import.Lident "int"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}, + []); + ptyp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ptyp_loc_stack = []; ptyp_attributes = []}}); + pvb_attributes = []; + pvb_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}}]); + pstr_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}} |}] (* --------- poly Ppat_constraint to pvb_constraint --------- *) @@ -105,37 +292,177 @@ let vb = [%%expect{| val vb : structure_item = - Pstr_value - ( Nonrecursive - , [ { pvb_pat = Ppat_var "f" - ; pvb_expr = - Pexp_function - ( [ { pparam_loc = __loc - ; pparam_desc = Pparam_val ( Nolabel, None, Ppat_var "x") - } - ] - , None - , Pfunction_body (Pexp_ident (Lident "unit")) - ) - ; pvb_constraint = - Some - (Pvc_constraint - { locally_abstract_univars = [] - ; typ = - Ptyp_poly - ( [ "a"] - , Ptyp_arrow - ( Nolabel - , Ptyp_var "a" - , Ptyp_constr ( Lident "unit", []) - ) - ) - }) - ; pvb_attributes = __attrs - ; pvb_loc = __loc - } - ] - ) + {Ppxlib__.Import.pstr_desc = + Ppxlib__.Import.Pstr_value (Ppxlib__.Import.Nonrecursive, + [{Ppxlib__.Import.pvb_pat = + {Ppxlib__.Import.ppat_desc = + Ppxlib__.Import.Ppat_var + {Ppxlib__.Import.txt = "f"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}; + ppat_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}; + ppat_loc_stack = []; ppat_attributes = []}; + pvb_expr = + {Ppxlib__.Import.pexp_desc = + Ppxlib__.Import.Pexp_function + ([{Ppxlib__.Import.pparam_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + pparam_desc = + Ppxlib__.Import.Pparam_val (Ppxlib__.Import.Nolabel, None, + {Ppxlib__.Import.ppat_desc = + Ppxlib__.Import.Ppat_var + {Ppxlib__.Import.txt = "x"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}; + ppat_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ppat_loc_stack = []; ppat_attributes = []})}], + None, + Ppxlib__.Import.Pfunction_body + {Ppxlib__.Import.pexp_desc = + Ppxlib__.Import.Pexp_ident + {Ppxlib__.Import.txt = Ppxlib__.Import.Lident "unit"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}; + pexp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + pexp_loc_stack = []; pexp_attributes = []}); + pexp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}; + pexp_loc_stack = []; pexp_attributes = []}; + pvb_constraint = + Some + (Ppxlib__.Import.Pvc_constraint + {Ppxlib__.Import.locally_abstract_univars = []; + typ = + {Ppxlib__.Import.ptyp_desc = + Ppxlib__.Import.Ptyp_poly + ([{Ppxlib__.Import.txt = "a"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}], + {Ppxlib__.Import.ptyp_desc = + Ppxlib__.Import.Ptyp_arrow (Ppxlib__.Import.Nolabel, + {Ppxlib__.Import.ptyp_desc = Ppxlib__.Import.Ptyp_var "a"; + ptyp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ptyp_loc_stack = []; ptyp_attributes = []}, + {Ppxlib__.Import.ptyp_desc = + Ppxlib__.Import.Ptyp_constr + ({Ppxlib__.Import.txt = Ppxlib__.Import.Lident "unit"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; + pos_lnum = 0; pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; + pos_lnum = 0; pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}, + []); + ptyp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ptyp_loc_stack = []; ptyp_attributes = []}); + ptyp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ptyp_loc_stack = []; ptyp_attributes = []}); + ptyp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ptyp_loc_stack = []; ptyp_attributes = []}}); + pvb_attributes = []; + pvb_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}}]); + pstr_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}} |}] (* --------- desugared locally abstract univars to pvb_constraint --------- *) @@ -157,34 +484,167 @@ let vb = [%%expect{| val vb : structure_item = - Pstr_value - ( Nonrecursive - , [ { pvb_pat = Ppat_var "f" - ; pvb_expr = - Pexp_function - ( [ { pparam_loc = __loc - ; pparam_desc = Pparam_val ( Nolabel, None, Ppat_any) - } - ] - , None - , Pfunction_body (Pexp_ident (Lident "unit")) - ) - ; pvb_constraint = - Some - (Pvc_constraint - { locally_abstract_univars = [ "a"] - ; typ = - Ptyp_arrow - ( Nolabel - , Ptyp_constr ( Lident "a", []) - , Ptyp_constr ( Lident "unit", []) - ) - }) - ; pvb_attributes = __attrs - ; pvb_loc = __loc - } - ] - ) + {Ppxlib__.Import.pstr_desc = + Ppxlib__.Import.Pstr_value (Ppxlib__.Import.Nonrecursive, + [{Ppxlib__.Import.pvb_pat = + {Ppxlib__.Import.ppat_desc = + Ppxlib__.Import.Ppat_var + {Ppxlib__.Import.txt = "f"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}; + ppat_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}; + ppat_loc_stack = []; ppat_attributes = []}; + pvb_expr = + {Ppxlib__.Import.pexp_desc = + Ppxlib__.Import.Pexp_function + ([{Ppxlib__.Import.pparam_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + pparam_desc = + Ppxlib__.Import.Pparam_val (Ppxlib__.Import.Nolabel, None, + {Ppxlib__.Import.ppat_desc = Ppxlib__.Import.Ppat_any; + ppat_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ppat_loc_stack = []; ppat_attributes = []})}], + None, + Ppxlib__.Import.Pfunction_body + {Ppxlib__.Import.pexp_desc = + Ppxlib__.Import.Pexp_ident + {Ppxlib__.Import.txt = Ppxlib__.Import.Lident "unit"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}; + pexp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + pexp_loc_stack = []; pexp_attributes = []}); + pexp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}; + pexp_loc_stack = []; pexp_attributes = []}; + pvb_constraint = + Some + (Ppxlib__.Import.Pvc_constraint + {Ppxlib__.Import.locally_abstract_univars = + [{Ppxlib__.Import.txt = "a"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}]; + typ = + {Ppxlib__.Import.ptyp_desc = + Ppxlib__.Import.Ptyp_arrow (Ppxlib__.Import.Nolabel, + {Ppxlib__.Import.ptyp_desc = + Ppxlib__.Import.Ptyp_constr + ({Ppxlib__.Import.txt = Ppxlib__.Import.Lident "a"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}, + []); + ptyp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ptyp_loc_stack = []; ptyp_attributes = []}, + {Ppxlib__.Import.ptyp_desc = + Ppxlib__.Import.Ptyp_constr + ({Ppxlib__.Import.txt = Ppxlib__.Import.Lident "unit"; + loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}}, + []); + ptyp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ptyp_loc_stack = []; ptyp_attributes = []}); + ptyp_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; + pos_bol = 0; pos_cnum = -1}; + loc_ghost = true}; + ptyp_loc_stack = []; ptyp_attributes = []}}); + pvb_attributes = []; + pvb_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}}]); + pstr_loc = + {Ppxlib__.Import.loc_start = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_end = + {Ppxlib__.Import.pos_fname = "_none_"; pos_lnum = 0; pos_bol = 0; + pos_cnum = -1}; + loc_ghost = true}} |}] (* As expected here, the matching constraint from the pattern and expression or @@ -194,3 +654,5 @@ val vb : structure_item = (* --------- coercion to pvb_constraint --------- *) (*TODO*) +[%%expect{| +|}] jail: /usr/bin/su -l opam -c cd '/src' && env OCAMLCI='true' CI='true' DEPS='base.v0.16.4 base-bigarray.base base-threads.base base-unix.base cinaps.v0.15.1 cmdliner.1.3.0 csexp.1.5.2 dune.3.19.1 dune-configurator.3.19.1 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-compiler-libs.v0.12.4 ocaml-config.2 ocaml-options-vanilla.1 ocamlfind.1.9.8 ppx_derivers.1.2.1 re.1.13.2 seq.base sexplib0.v0.16.0 stdlib-shims.0.3.0 yojson.3.0.0' OPAMCOLOR='always' CLICOLOR_FORCE='1' '/usr/bin/env' 'bash' '-c' 'opam exec -- dune build @install @check @runtest && rm -rf _build': failed "jail" "-c" "name=obuilder_61147_19744" "mount.devfs" "path=/obuilder/result/e55ef33be61cb1ad036291b47d58a83a5bc16265940993f1b5fd2d039dab893c/rootfs" "vnet" "exec.start=/sbin/ifconfig lo0 127.0.0.1/8" "command=/usr/bin/su" "-l" "opam" "-c" "cd '/src' && env OCAMLCI='true' CI='true' DEPS='base.v0.16.4 base-bigarray.base base-threads.base base-unix.base cinaps.v0.15.1 cmdliner.1.3.0 csexp.1.5.2 dune.3.19.1 dune-configurator.3.19.1 ocaml.4.14.2 ocaml-base-compiler.4.14.2 ocaml-compiler-libs.v0.12.4 ocaml-config.2 ocaml-options-vanilla.1 ocamlfind.1.9.8 ppx_derivers.1.2.1 re.1.13.2 seq.base sexplib0.v0.16.0 stdlib-shims.0.3.0 yojson.3.0.0' OPAMCOLOR='always' CLICOLOR_FORCE='1' '/usr/bin/env' 'bash' '-c' 'opam exec -- dune build @install @check @runtest && rm -rf _build'" failed with exit status 1 2025-08-11 12:17.19: Job failed: Failed: Build failed