├── .gitignore ├── 402.esy.lock ├── .gitattributes ├── .gitignore ├── index.json ├── opam │ ├── base-ocamlbuild.base │ │ └── opam │ ├── base-threads.base │ │ └── opam │ ├── base-unix.base │ │ └── opam │ ├── biniou.1.2.1 │ │ └── opam │ ├── conf-m4.1 │ │ └── opam │ ├── cppo.1.6.5 │ │ └── opam │ ├── dune.1.11.4 │ │ └── opam │ ├── easy-format.1.3.2 │ │ └── opam │ ├── jbuilder.transition │ │ └── opam │ ├── menhir.20190924 │ │ └── opam │ ├── merlin-extend.0.5 │ │ └── opam │ ├── merlin.3.3.2 │ │ └── opam │ ├── ocaml-migrate-parsetree.1.4.0 │ │ └── opam │ ├── ocamlbuild.0 │ │ └── opam │ ├── ocamlfind.1.8.1 │ │ ├── files │ │ │ ├── ocaml-stub │ │ │ └── ocamlfind.install │ │ └── opam │ ├── ppx_derivers.1.2.1 │ │ └── opam │ ├── reason.3.5.2 │ │ └── opam │ ├── result.1.4 │ │ └── opam │ └── yojson.1.7.0 │ │ └── opam └── overrides │ ├── opam__s__dune_opam__c__1.11.4_opam_override │ └── package.json │ └── opam__s__ocamlfind_opam__c__1.8.1_opam_override │ ├── files │ └── findlib-1.8.1.patch │ └── package.json ├── 402.json ├── Let_anything.opam ├── Readme.md ├── bsconfig.json ├── dune-project ├── esy.json ├── esy.lock ├── .gitattributes ├── .gitignore ├── index.json ├── opam │ ├── base-threads.base │ │ └── opam │ ├── base-unix.base │ │ └── opam │ ├── biniou.1.2.1 │ │ └── opam │ ├── conf-m4.1 │ │ └── opam │ ├── cppo.1.6.6 │ │ └── opam │ ├── dune.1.11.4 │ │ └── opam │ ├── easy-format.1.3.2 │ │ └── opam │ ├── menhir.20190924 │ │ └── opam │ ├── merlin-extend.0.5 │ │ └── opam │ ├── merlin.3.3.2 │ │ └── opam │ ├── ocaml-migrate-parsetree.1.4.0 │ │ └── opam │ ├── ocamlbuild.0.14.0 │ │ └── opam │ ├── ocamlfind.1.8.1 │ │ ├── files │ │ │ ├── ocaml-stub │ │ │ └── ocamlfind.install │ │ └── opam │ ├── ppx_derivers.1.2.1 │ │ └── opam │ ├── reason.3.5.2 │ │ └── opam │ ├── result.1.4 │ │ └── opam │ └── yojson.1.7.0 │ │ └── opam └── overrides │ ├── opam__s__dune_opam__c__1.11.4_opam_override │ └── package.json │ ├── opam__s__ocamlbuild_opam__c__0.14.0_opam_override │ ├── files │ │ └── ocamlbuild-0.14.0.patch │ └── package.json │ └── opam__s__ocamlfind_opam__c__1.8.1_opam_override │ ├── files │ └── findlib-1.8.1.patch │ └── package.json ├── package-lock.json ├── package.json ├── src ├── Let_anything.re └── dune └── tests ├── Tests.re └── dune /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | lib 3 | .merlin 4 | _esy 5 | *.install 6 | -------------------------------------------------------------------------------- /402.esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf 4 | -------------------------------------------------------------------------------- /402.esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /402.esy.lock/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "checksum": "d234e7dbd1b82a9bef6c9be2aa35f355", 3 | "root": "let-anything@link-dev:./402.json", 4 | "node": { 5 | "ocaml@4.2.3007@d41d8cd9": { 6 | "id": "ocaml@4.2.3007@d41d8cd9", 7 | "name": "ocaml", 8 | "version": "4.2.3007", 9 | "source": { 10 | "type": "install", 11 | "source": [ 12 | "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.2.3007.tgz#sha1:b36f3357f7da99e43e19d60c2c2cfb69bd8ab66d" 13 | ] 14 | }, 15 | "overrides": [], 16 | "dependencies": [ "flexdll-prebuilt@0.37.4@d41d8cd9" ], 17 | "devDependencies": [] 18 | }, 19 | "let-anything@link-dev:./402.json": { 20 | "id": "let-anything@link-dev:./402.json", 21 | "name": "let-anything", 22 | "version": "link-dev:./402.json", 23 | "source": { "type": "link-dev", "path": ".", "manifest": "402.json" }, 24 | "overrides": [], 25 | "dependencies": [ 26 | "ocaml@4.2.3007@d41d8cd9", "@opam/reason@opam:3.5.2@f689c2cb", 27 | "@opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d", 28 | "@opam/dune@opam:1.11.4@21d66ccd" 29 | ], 30 | "devDependencies": [ "@opam/merlin@opam:3.3.2@7a364181" ] 31 | }, 32 | "flexdll-prebuilt@0.37.4@d41d8cd9": { 33 | "id": "flexdll-prebuilt@0.37.4@d41d8cd9", 34 | "name": "flexdll-prebuilt", 35 | "version": "0.37.4", 36 | "source": { 37 | "type": "install", 38 | "source": [ 39 | "archive:https://registry.npmjs.org/flexdll-prebuilt/-/flexdll-prebuilt-0.37.4.tgz#sha1:c48478f4b2420a75e8dac9172f89c57bbf192598" 40 | ] 41 | }, 42 | "overrides": [], 43 | "dependencies": [], 44 | "devDependencies": [] 45 | }, 46 | "@opam/yojson@opam:1.7.0@7056d985": { 47 | "id": "@opam/yojson@opam:1.7.0@7056d985", 48 | "name": "@opam/yojson", 49 | "version": "opam:1.7.0", 50 | "source": { 51 | "type": "install", 52 | "source": [ 53 | "archive:https://opam.ocaml.org/cache/md5/b8/b89d39ca3f8c532abe5f547ad3b8f84d#md5:b89d39ca3f8c532abe5f547ad3b8f84d", 54 | "archive:https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz#md5:b89d39ca3f8c532abe5f547ad3b8f84d" 55 | ], 56 | "opam": { 57 | "name": "yojson", 58 | "version": "1.7.0", 59 | "path": "402.esy.lock/opam/yojson.1.7.0" 60 | } 61 | }, 62 | "overrides": [], 63 | "dependencies": [ 64 | "ocaml@4.2.3007@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 65 | "@opam/dune@opam:1.11.4@21d66ccd", "@opam/cppo@opam:1.6.5@bec3dbd9", 66 | "@opam/biniou@opam:1.2.1@d7570399", 67 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 68 | ], 69 | "devDependencies": [ 70 | "ocaml@4.2.3007@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 71 | "@opam/dune@opam:1.11.4@21d66ccd", "@opam/biniou@opam:1.2.1@d7570399" 72 | ] 73 | }, 74 | "@opam/result@opam:1.4@dc720aef": { 75 | "id": "@opam/result@opam:1.4@dc720aef", 76 | "name": "@opam/result", 77 | "version": "opam:1.4", 78 | "source": { 79 | "type": "install", 80 | "source": [ 81 | "archive:https://opam.ocaml.org/cache/md5/d3/d3162dbc501a2af65c8c71e0866541da#md5:d3162dbc501a2af65c8c71e0866541da", 82 | "archive:https://github.com/janestreet/result/archive/1.4.tar.gz#md5:d3162dbc501a2af65c8c71e0866541da" 83 | ], 84 | "opam": { 85 | "name": "result", 86 | "version": "1.4", 87 | "path": "402.esy.lock/opam/result.1.4" 88 | } 89 | }, 90 | "overrides": [], 91 | "dependencies": [ 92 | "ocaml@4.2.3007@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 93 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 94 | ], 95 | "devDependencies": [ 96 | "ocaml@4.2.3007@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd" 97 | ] 98 | }, 99 | "@opam/reason@opam:3.5.2@f689c2cb": { 100 | "id": "@opam/reason@opam:3.5.2@f689c2cb", 101 | "name": "@opam/reason", 102 | "version": "opam:3.5.2", 103 | "source": { 104 | "type": "install", 105 | "source": [ 106 | "archive:https://opam.ocaml.org/cache/md5/66/66c54296009e0f6cbc8e93aa01105cbb#md5:66c54296009e0f6cbc8e93aa01105cbb", 107 | "archive:https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz#md5:66c54296009e0f6cbc8e93aa01105cbb" 108 | ], 109 | "opam": { 110 | "name": "reason", 111 | "version": "3.5.2", 112 | "path": "402.esy.lock/opam/reason.3.5.2" 113 | } 114 | }, 115 | "overrides": [], 116 | "dependencies": [ 117 | "ocaml@4.2.3007@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 118 | "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 119 | "@opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d", 120 | "@opam/merlin-extend@opam:0.5@a5dd7d4b", 121 | "@opam/menhir@opam:20190924@004407ff", 122 | "@opam/dune@opam:1.11.4@21d66ccd", "@esy-ocaml/substs@0.0.1@d41d8cd9" 123 | ], 124 | "devDependencies": [ 125 | "ocaml@4.2.3007@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 126 | "@opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d", 127 | "@opam/merlin-extend@opam:0.5@a5dd7d4b", 128 | "@opam/menhir@opam:20190924@004407ff", 129 | "@opam/dune@opam:1.11.4@21d66ccd" 130 | ] 131 | }, 132 | "@opam/ppx_derivers@opam:1.2.1@ecf0aa45": { 133 | "id": "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", 134 | "name": "@opam/ppx_derivers", 135 | "version": "opam:1.2.1", 136 | "source": { 137 | "type": "install", 138 | "source": [ 139 | "archive:https://opam.ocaml.org/cache/md5/5d/5dc2bf130c1db3c731fe0fffc5648b41#md5:5dc2bf130c1db3c731fe0fffc5648b41", 140 | "archive:https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz#md5:5dc2bf130c1db3c731fe0fffc5648b41" 141 | ], 142 | "opam": { 143 | "name": "ppx_derivers", 144 | "version": "1.2.1", 145 | "path": "402.esy.lock/opam/ppx_derivers.1.2.1" 146 | } 147 | }, 148 | "overrides": [], 149 | "dependencies": [ 150 | "ocaml@4.2.3007@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 151 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 152 | ], 153 | "devDependencies": [ 154 | "ocaml@4.2.3007@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd" 155 | ] 156 | }, 157 | "@opam/ocamlfind@opam:1.8.1@ff07b0f9": { 158 | "id": "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 159 | "name": "@opam/ocamlfind", 160 | "version": "opam:1.8.1", 161 | "source": { 162 | "type": "install", 163 | "source": [ 164 | "archive:https://opam.ocaml.org/cache/md5/18/18ca650982c15536616dea0e422cbd8c#md5:18ca650982c15536616dea0e422cbd8c", 165 | "archive:http://download2.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c", 166 | "archive:http://download.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c" 167 | ], 168 | "opam": { 169 | "name": "ocamlfind", 170 | "version": "1.8.1", 171 | "path": "402.esy.lock/opam/ocamlfind.1.8.1" 172 | } 173 | }, 174 | "overrides": [ 175 | { 176 | "opamoverride": 177 | "402.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override" 178 | } 179 | ], 180 | "dependencies": [ 181 | "ocaml@4.2.3007@d41d8cd9", "@opam/conf-m4@opam:1@3b2b148a", 182 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 183 | ], 184 | "devDependencies": [ "ocaml@4.2.3007@d41d8cd9" ] 185 | }, 186 | "@opam/ocamlbuild@opam:0@0bebfc9d": { 187 | "id": "@opam/ocamlbuild@opam:0@0bebfc9d", 188 | "name": "@opam/ocamlbuild", 189 | "version": "opam:0", 190 | "source": { 191 | "type": "install", 192 | "source": [ "no-source:" ], 193 | "opam": { 194 | "name": "ocamlbuild", 195 | "version": "0", 196 | "path": "402.esy.lock/opam/ocamlbuild.0" 197 | } 198 | }, 199 | "overrides": [], 200 | "dependencies": [ 201 | "ocaml@4.2.3007@d41d8cd9", 202 | "@opam/base-ocamlbuild@opam:base@78c02864", 203 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 204 | ], 205 | "devDependencies": [ 206 | "ocaml@4.2.3007@d41d8cd9", "@opam/base-ocamlbuild@opam:base@78c02864" 207 | ] 208 | }, 209 | "@opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d": { 210 | "id": "@opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d", 211 | "name": "@opam/ocaml-migrate-parsetree", 212 | "version": "opam:1.4.0", 213 | "source": { 214 | "type": "install", 215 | "source": [ 216 | "archive:https://opam.ocaml.org/cache/sha256/23/231fbdc205187b3ee266b535d9cfe44b599067b2f6e97883c782ea7bb577d3b8#sha256:231fbdc205187b3ee266b535d9cfe44b599067b2f6e97883c782ea7bb577d3b8", 217 | "archive:https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.4.0/ocaml-migrate-parsetree-v1.4.0.tbz#sha256:231fbdc205187b3ee266b535d9cfe44b599067b2f6e97883c782ea7bb577d3b8" 218 | ], 219 | "opam": { 220 | "name": "ocaml-migrate-parsetree", 221 | "version": "1.4.0", 222 | "path": "402.esy.lock/opam/ocaml-migrate-parsetree.1.4.0" 223 | } 224 | }, 225 | "overrides": [], 226 | "dependencies": [ 227 | "ocaml@4.2.3007@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 228 | "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", 229 | "@opam/dune@opam:1.11.4@21d66ccd", "@esy-ocaml/substs@0.0.1@d41d8cd9" 230 | ], 231 | "devDependencies": [ 232 | "ocaml@4.2.3007@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 233 | "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", 234 | "@opam/dune@opam:1.11.4@21d66ccd" 235 | ] 236 | }, 237 | "@opam/merlin-extend@opam:0.5@a5dd7d4b": { 238 | "id": "@opam/merlin-extend@opam:0.5@a5dd7d4b", 239 | "name": "@opam/merlin-extend", 240 | "version": "opam:0.5", 241 | "source": { 242 | "type": "install", 243 | "source": [ 244 | "archive:https://opam.ocaml.org/cache/sha256/ca/ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227#sha256:ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227", 245 | "archive:https://github.com/let-def/merlin-extend/releases/download/v0.5/merlin-extend-v0.5.tbz#sha256:ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227" 246 | ], 247 | "opam": { 248 | "name": "merlin-extend", 249 | "version": "0.5", 250 | "path": "402.esy.lock/opam/merlin-extend.0.5" 251 | } 252 | }, 253 | "overrides": [], 254 | "dependencies": [ 255 | "ocaml@4.2.3007@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 256 | "@opam/cppo@opam:1.6.5@bec3dbd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" 257 | ], 258 | "devDependencies": [ 259 | "ocaml@4.2.3007@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd" 260 | ] 261 | }, 262 | "@opam/merlin@opam:3.3.2@7a364181": { 263 | "id": "@opam/merlin@opam:3.3.2@7a364181", 264 | "name": "@opam/merlin", 265 | "version": "opam:3.3.2", 266 | "source": { 267 | "type": "install", 268 | "source": [ 269 | "archive:https://opam.ocaml.org/cache/sha256/1d/1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801#sha256:1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801", 270 | "archive:https://github.com/ocaml/merlin/releases/download/v3.3.2/merlin-v3.3.2.tbz#sha256:1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801" 271 | ], 272 | "opam": { 273 | "name": "merlin", 274 | "version": "3.3.2", 275 | "path": "402.esy.lock/opam/merlin.3.3.2" 276 | } 277 | }, 278 | "overrides": [], 279 | "dependencies": [ 280 | "ocaml@4.2.3007@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 281 | "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 282 | "@opam/dune@opam:1.11.4@21d66ccd", "@esy-ocaml/substs@0.0.1@d41d8cd9" 283 | ], 284 | "devDependencies": [ 285 | "ocaml@4.2.3007@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 286 | "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 287 | "@opam/dune@opam:1.11.4@21d66ccd" 288 | ] 289 | }, 290 | "@opam/menhir@opam:20190924@004407ff": { 291 | "id": "@opam/menhir@opam:20190924@004407ff", 292 | "name": "@opam/menhir", 293 | "version": "opam:20190924", 294 | "source": { 295 | "type": "install", 296 | "source": [ 297 | "archive:https://opam.ocaml.org/cache/md5/67/677f1997fb73177d5a00fa1b8d61c3ef#md5:677f1997fb73177d5a00fa1b8d61c3ef", 298 | "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20190924/archive.tar.gz#md5:677f1997fb73177d5a00fa1b8d61c3ef" 299 | ], 300 | "opam": { 301 | "name": "menhir", 302 | "version": "20190924", 303 | "path": "402.esy.lock/opam/menhir.20190924" 304 | } 305 | }, 306 | "overrides": [], 307 | "dependencies": [ 308 | "ocaml@4.2.3007@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 309 | "@opam/ocamlbuild@opam:0@0bebfc9d", 310 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 311 | ], 312 | "devDependencies": [ "ocaml@4.2.3007@d41d8cd9" ] 313 | }, 314 | "@opam/jbuilder@opam:transition@58bdfe0a": { 315 | "id": "@opam/jbuilder@opam:transition@58bdfe0a", 316 | "name": "@opam/jbuilder", 317 | "version": "opam:transition", 318 | "source": { 319 | "type": "install", 320 | "source": [ "no-source:" ], 321 | "opam": { 322 | "name": "jbuilder", 323 | "version": "transition", 324 | "path": "402.esy.lock/opam/jbuilder.transition" 325 | } 326 | }, 327 | "overrides": [], 328 | "dependencies": [ 329 | "ocaml@4.2.3007@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 330 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 331 | ], 332 | "devDependencies": [ 333 | "ocaml@4.2.3007@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd" 334 | ] 335 | }, 336 | "@opam/easy-format@opam:1.3.2@0484b3c4": { 337 | "id": "@opam/easy-format@opam:1.3.2@0484b3c4", 338 | "name": "@opam/easy-format", 339 | "version": "opam:1.3.2", 340 | "source": { 341 | "type": "install", 342 | "source": [ 343 | "archive:https://opam.ocaml.org/cache/sha256/34/3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926#sha256:3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926", 344 | "archive:https://github.com/mjambon/easy-format/releases/download/1.3.2/easy-format-1.3.2.tbz#sha256:3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" 345 | ], 346 | "opam": { 347 | "name": "easy-format", 348 | "version": "1.3.2", 349 | "path": "402.esy.lock/opam/easy-format.1.3.2" 350 | } 351 | }, 352 | "overrides": [], 353 | "dependencies": [ 354 | "ocaml@4.2.3007@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 355 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 356 | ], 357 | "devDependencies": [ 358 | "ocaml@4.2.3007@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd" 359 | ] 360 | }, 361 | "@opam/dune@opam:1.11.4@21d66ccd": { 362 | "id": "@opam/dune@opam:1.11.4@21d66ccd", 363 | "name": "@opam/dune", 364 | "version": "opam:1.11.4", 365 | "source": { 366 | "type": "install", 367 | "source": [ 368 | "archive:https://opam.ocaml.org/cache/sha256/77/77cb5f483221b266ded2b85fc84173ae0089a25134a086be922e82c131456ce6#sha256:77cb5f483221b266ded2b85fc84173ae0089a25134a086be922e82c131456ce6", 369 | "archive:https://github.com/ocaml/dune/releases/download/1.11.4/dune-build-info-1.11.4.tbz#sha256:77cb5f483221b266ded2b85fc84173ae0089a25134a086be922e82c131456ce6" 370 | ], 371 | "opam": { 372 | "name": "dune", 373 | "version": "1.11.4", 374 | "path": "402.esy.lock/opam/dune.1.11.4" 375 | } 376 | }, 377 | "overrides": [ 378 | { 379 | "opamoverride": 380 | "402.esy.lock/overrides/opam__s__dune_opam__c__1.11.4_opam_override" 381 | } 382 | ], 383 | "dependencies": [ 384 | "ocaml@4.2.3007@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb", 385 | "@opam/base-threads@opam:base@36803084", 386 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 387 | ], 388 | "devDependencies": [ 389 | "ocaml@4.2.3007@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb", 390 | "@opam/base-threads@opam:base@36803084" 391 | ] 392 | }, 393 | "@opam/cppo@opam:1.6.5@bec3dbd9": { 394 | "id": "@opam/cppo@opam:1.6.5@bec3dbd9", 395 | "name": "@opam/cppo", 396 | "version": "opam:1.6.5", 397 | "source": { 398 | "type": "install", 399 | "source": [ 400 | "archive:https://opam.ocaml.org/cache/md5/1c/1cd25741d31417995b0973fe0b6f6c82#md5:1cd25741d31417995b0973fe0b6f6c82", 401 | "archive:https://github.com/mjambon/cppo/archive/v1.6.5.tar.gz#md5:1cd25741d31417995b0973fe0b6f6c82" 402 | ], 403 | "opam": { 404 | "name": "cppo", 405 | "version": "1.6.5", 406 | "path": "402.esy.lock/opam/cppo.1.6.5" 407 | } 408 | }, 409 | "overrides": [], 410 | "dependencies": [ 411 | "ocaml@4.2.3007@d41d8cd9", "@opam/jbuilder@opam:transition@58bdfe0a", 412 | "@opam/base-unix@opam:base@87d0b2eb", 413 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 414 | ], 415 | "devDependencies": [ 416 | "ocaml@4.2.3007@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb" 417 | ] 418 | }, 419 | "@opam/conf-m4@opam:1@3b2b148a": { 420 | "id": "@opam/conf-m4@opam:1@3b2b148a", 421 | "name": "@opam/conf-m4", 422 | "version": "opam:1", 423 | "source": { 424 | "type": "install", 425 | "source": [ "no-source:" ], 426 | "opam": { 427 | "name": "conf-m4", 428 | "version": "1", 429 | "path": "402.esy.lock/opam/conf-m4.1" 430 | } 431 | }, 432 | "overrides": [], 433 | "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 434 | "devDependencies": [] 435 | }, 436 | "@opam/biniou@opam:1.2.1@d7570399": { 437 | "id": "@opam/biniou@opam:1.2.1@d7570399", 438 | "name": "@opam/biniou", 439 | "version": "opam:1.2.1", 440 | "source": { 441 | "type": "install", 442 | "source": [ 443 | "archive:https://opam.ocaml.org/cache/sha256/35/35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335#sha256:35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335", 444 | "archive:https://github.com/mjambon/biniou/releases/download/1.2.1/biniou-1.2.1.tbz#sha256:35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" 445 | ], 446 | "opam": { 447 | "name": "biniou", 448 | "version": "1.2.1", 449 | "path": "402.esy.lock/opam/biniou.1.2.1" 450 | } 451 | }, 452 | "overrides": [], 453 | "dependencies": [ 454 | "ocaml@4.2.3007@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 455 | "@opam/dune@opam:1.11.4@21d66ccd", "@esy-ocaml/substs@0.0.1@d41d8cd9" 456 | ], 457 | "devDependencies": [ 458 | "ocaml@4.2.3007@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 459 | "@opam/dune@opam:1.11.4@21d66ccd" 460 | ] 461 | }, 462 | "@opam/base-unix@opam:base@87d0b2eb": { 463 | "id": "@opam/base-unix@opam:base@87d0b2eb", 464 | "name": "@opam/base-unix", 465 | "version": "opam:base", 466 | "source": { 467 | "type": "install", 468 | "source": [ "no-source:" ], 469 | "opam": { 470 | "name": "base-unix", 471 | "version": "base", 472 | "path": "402.esy.lock/opam/base-unix.base" 473 | } 474 | }, 475 | "overrides": [], 476 | "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 477 | "devDependencies": [] 478 | }, 479 | "@opam/base-threads@opam:base@36803084": { 480 | "id": "@opam/base-threads@opam:base@36803084", 481 | "name": "@opam/base-threads", 482 | "version": "opam:base", 483 | "source": { 484 | "type": "install", 485 | "source": [ "no-source:" ], 486 | "opam": { 487 | "name": "base-threads", 488 | "version": "base", 489 | "path": "402.esy.lock/opam/base-threads.base" 490 | } 491 | }, 492 | "overrides": [], 493 | "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 494 | "devDependencies": [] 495 | }, 496 | "@opam/base-ocamlbuild@opam:base@78c02864": { 497 | "id": "@opam/base-ocamlbuild@opam:base@78c02864", 498 | "name": "@opam/base-ocamlbuild", 499 | "version": "opam:base", 500 | "source": { 501 | "type": "install", 502 | "source": [ "no-source:" ], 503 | "opam": { 504 | "name": "base-ocamlbuild", 505 | "version": "base", 506 | "path": "402.esy.lock/opam/base-ocamlbuild.base" 507 | } 508 | }, 509 | "overrides": [], 510 | "dependencies": [ 511 | "ocaml@4.2.3007@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" 512 | ], 513 | "devDependencies": [ "ocaml@4.2.3007@d41d8cd9" ] 514 | }, 515 | "@esy-ocaml/substs@0.0.1@d41d8cd9": { 516 | "id": "@esy-ocaml/substs@0.0.1@d41d8cd9", 517 | "name": "@esy-ocaml/substs", 518 | "version": "0.0.1", 519 | "source": { 520 | "type": "install", 521 | "source": [ 522 | "archive:https://registry.npmjs.org/@esy-ocaml/substs/-/substs-0.0.1.tgz#sha1:59ebdbbaedcda123fc7ed8fb2b302b7d819e9a46" 523 | ] 524 | }, 525 | "overrides": [], 526 | "dependencies": [], 527 | "devDependencies": [] 528 | } 529 | } 530 | } -------------------------------------------------------------------------------- /402.esy.lock/opam/base-ocamlbuild.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "gabriel.scherer@gmail.com" 3 | 4 | synopsis: 5 | "OCamlbuild binary and libraries distributed with the OCaml compiler" 6 | depends: [ 7 | "ocaml" {>= "3.10" & < "4.03"} 8 | ] 9 | -------------------------------------------------------------------------------- /402.esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /402.esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /402.esy.lock/opam/biniou.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | build: [ 3 | ["dune" "subst"] {pinned} 4 | ["dune" "build" "-p" name "-j" jobs] 5 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 6 | ["dune" "build" "-p" name "@doc"] {with-doc} 7 | ] 8 | maintainer: ["martin@mjambon.com"] 9 | authors: ["Martin Jambon"] 10 | bug-reports: "https://github.com/mjambon/biniou/issues" 11 | homepage: "https://github.com/mjambon/biniou" 12 | doc: "https://mjambon.github.io/biniou/" 13 | license: "BSD-3-Clause" 14 | dev-repo: "git+https://github.com/mjambon/biniou.git" 15 | synopsis: 16 | "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve" 17 | description: """ 18 | 19 | Biniou (pronounced "be new") is a binary data format designed for speed, safety, 20 | ease of use and backward compatibility as protocols evolve. Biniou is vastly 21 | equivalent to JSON in terms of functionality but allows implementations several 22 | times faster (4 times faster than yojson), with 25-35% space savings. 23 | 24 | Biniou data can be decoded into human-readable form without knowledge of type 25 | definitions except for field and variant names which are represented by 31-bit 26 | hashes. A program named bdump is provided for routine visualization of biniou 27 | data files. 28 | 29 | The program atdgen is used to derive OCaml-Biniou serializers and deserializers 30 | from type definitions. 31 | 32 | Biniou format specification: mjambon.github.io/atdgen-doc/biniou-format.txt""" 33 | depends: [ 34 | "easy-format" 35 | "dune" {>= "1.10"} 36 | "ocaml" {>= "4.02.3"} 37 | ] 38 | url { 39 | src: 40 | "https://github.com/mjambon/biniou/releases/download/1.2.1/biniou-1.2.1.tbz" 41 | checksum: [ 42 | "sha256=35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" 43 | "sha512=82670cc77bf3e869ee26e5fbe5a5affa45a22bc8b6c4bd7e85473912780e0111baca59b34a2c14feae3543ce6e239d7fddaeab24b686a65bfe642cdb91d27ebf" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /402.esy.lock/opam/conf-m4.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "http://www.gnu.org/software/m4/m4.html" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | authors: "GNU Project" 6 | license: "GPL-3.0-only" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-family = "debian"} 10 | ["m4"] {os-distribution = "fedora"} 11 | ["m4"] {os-distribution = "rhel"} 12 | ["m4"] {os-distribution = "centos"} 13 | ["m4"] {os-distribution = "alpine"} 14 | ["m4"] {os-distribution = "nixos"} 15 | ["m4"] {os-family = "suse"} 16 | ["m4"] {os-distribution = "ol"} 17 | ["m4"] {os-distribution = "arch"} 18 | ] 19 | synopsis: "Virtual package relying on m4" 20 | description: 21 | "This package can only install if the m4 binary is installed on the system." 22 | flags: conf 23 | -------------------------------------------------------------------------------- /402.esy.lock/opam/cppo.1.6.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | homepage: "https://github.com/mjambon/cppo" 5 | dev-repo: "git+https://github.com/mjambon/cppo.git" 6 | bug-reports: "https://github.com/mjambon/cppo/issues" 7 | license: "BSD-3-Clause" 8 | 9 | build: [ 10 | ["jbuilder" "subst" "-p" name] {pinned} 11 | ["jbuilder" "build" "-p" name "-j" jobs] 12 | ["jbuilder" "runtest" "-p" name] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" 16 | "jbuilder" {build & >= "1.0+beta17"} 17 | "base-unix" 18 | ] 19 | synopsis: "Equivalent of the C preprocessor for OCaml programs" 20 | url { 21 | src: "https://github.com/mjambon/cppo/archive/v1.6.5.tar.gz" 22 | checksum: "md5=1cd25741d31417995b0973fe0b6f6c82" 23 | } 24 | -------------------------------------------------------------------------------- /402.esy.lock/opam/dune.1.11.4/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "Fast, portable and opinionated build system" 3 | description: """ 4 | 5 | dune is a build system that was designed to simplify the release of 6 | Jane Street packages. It reads metadata from "dune" files following a 7 | very simple s-expression syntax. 8 | 9 | dune is fast, it has very low-overhead and support parallel builds on 10 | all platforms. It has no system dependencies, all you need to build 11 | dune and packages using dune is OCaml. You don't need or make or bash 12 | as long as the packages themselves don't use bash explicitly. 13 | 14 | dune supports multi-package development by simply dropping multiple 15 | repositories into the same directory. 16 | 17 | It also supports multi-context builds, such as building against 18 | several opam roots/switches simultaneously. This helps maintaining 19 | packages across several versions of OCaml and gives cross-compilation 20 | for free. 21 | """ 22 | maintainer: ["Jane Street Group, LLC "] 23 | authors: ["Jane Street Group, LLC "] 24 | license: "MIT" 25 | homepage: "https://github.com/ocaml/dune" 26 | doc: "https://dune.readthedocs.io/" 27 | bug-reports: "https://github.com/ocaml/dune/issues" 28 | depends: [ 29 | "ocaml" {>= "4.02"} 30 | "base-unix" 31 | "base-threads" 32 | ] 33 | conflicts: [ 34 | "jbuilder" {!= "transition"} 35 | "odoc" {< "1.3.0"} 36 | "dune-release" {< "1.3.0"} 37 | ] 38 | dev-repo: "git+https://github.com/ocaml/dune.git" 39 | build: [ 40 | # opam 2 sets OPAM_SWITCH_PREFIX, so we don't need a hardcoded path 41 | ["ocaml" "configure.ml" "--libdir" lib] {opam-version < "2"} 42 | ["ocaml" "bootstrap.ml"] 43 | ["./boot.exe" "--release" "--subst"] {pinned} 44 | ["./boot.exe" "--release" "-j" jobs] 45 | ] 46 | url { 47 | src: 48 | "https://github.com/ocaml/dune/releases/download/1.11.4/dune-build-info-1.11.4.tbz" 49 | checksum: [ 50 | "sha256=77cb5f483221b266ded2b85fc84173ae0089a25134a086be922e82c131456ce6" 51 | "sha512=02f00fd872aa49b832fc8c1e928409f23c79ddf84a53009a58875f222cca36fbb92c905e12c539caec9cbad723f195a8aa24218382dca35a903b3f52b11f06f2" 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /402.esy.lock/opam/easy-format.1.3.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | build: [ 3 | ["dune" "subst"] {pinned} 4 | ["dune" "build" "-p" name "-j" jobs] 5 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 6 | ["dune" "build" "-p" name "@doc"] {with-doc} 7 | ] 8 | maintainer: ["martin@mjambon.com" "rudi.grinberg@gmail.com"] 9 | authors: ["Martin Jambon"] 10 | bug-reports: "https://github.com/mjambon/easy-format/issues" 11 | homepage: "https://github.com/mjambon/easy-format" 12 | doc: "https://mjambon.github.io/easy-format/" 13 | license: "BSD-3-Clause" 14 | dev-repo: "git+https://github.com/mjambon/easy-format.git" 15 | synopsis: 16 | "High-level and functional interface to the Format module of the OCaml standard library" 17 | description: """ 18 | 19 | This module offers a high-level and functional interface to the Format module of 20 | the OCaml standard library. It is a pretty-printing facility, i.e. it takes as 21 | input some code represented as a tree and formats this code into the most 22 | visually satisfying result, breaking and indenting lines of code where 23 | appropriate. 24 | 25 | Input data must be first modelled and converted into a tree using 3 kinds of 26 | nodes: 27 | 28 | * atoms 29 | * lists 30 | * labelled nodes 31 | 32 | Atoms represent any text that is guaranteed to be printed as-is. Lists can model 33 | any sequence of items such as arrays of data or lists of definitions that are 34 | labelled with something like "int main", "let x =" or "x:".""" 35 | depends: [ 36 | "dune" {>= "1.10"} 37 | "ocaml" {>= "4.02.3"} 38 | ] 39 | url { 40 | src: 41 | "https://github.com/mjambon/easy-format/releases/download/1.3.2/easy-format-1.3.2.tbz" 42 | checksum: [ 43 | "sha256=3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" 44 | "sha512=e39377a2ff020ceb9ac29e8515a89d9bdbc91dfcfa871c4e3baafa56753fac2896768e5d9822a050dc1e2ade43c8967afb69391a386c0a8ecd4e1f774e236135" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /402.esy.lock/opam/jbuilder.transition/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/ocaml/dune" 5 | bug-reports: "https://github.com/ocaml/dune/issues" 6 | dev-repo: "git+https://github.com/ocaml/dune.git" 7 | license: "MIT" 8 | depends: ["ocaml" "dune"] 9 | post-messages: [ 10 | "Jbuilder has been renamed and the jbuilder package is now a transition \ 11 | package. Use the dune package instead." 12 | ] 13 | synopsis: 14 | "This is a transition package, jbuilder is now named dune. Use the dune" 15 | description: "package instead." 16 | -------------------------------------------------------------------------------- /402.esy.lock/opam/menhir.20190924/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "francois.pottier@inria.fr" 3 | authors: [ 4 | "François Pottier " 5 | "Yann Régis-Gianas " 6 | ] 7 | homepage: "http://gitlab.inria.fr/fpottier/menhir" 8 | dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" 9 | bug-reports: "menhir@inria.fr" 10 | build: [ 11 | [make "-f" "Makefile" "PREFIX=%{prefix}%" "USE_OCAMLFIND=true" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 12 | ] 13 | install: [ 14 | [make "-f" "Makefile" "install" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 15 | ] 16 | depends: [ 17 | "ocaml" {>= "4.02"} 18 | "ocamlfind" {build} 19 | "ocamlbuild" {build} 20 | ] 21 | synopsis: "An LR(1) parser generator" 22 | url { 23 | src: 24 | "https://gitlab.inria.fr/fpottier/menhir/repository/20190924/archive.tar.gz" 25 | checksum: [ 26 | "md5=677f1997fb73177d5a00fa1b8d61c3ef" 27 | "sha512=ea8a9a6d773529cf6ac05e4c6c4532770fbb8e574c9b646efcefe90d9f24544741e3e8cfd94c8afea0447e34059a8c79c2829b46764ce3a3d6dcb3e7f75980fc" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /402.esy.lock/opam/merlin-extend.0.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Frederic Bour " 3 | authors: "Frederic Bour " 4 | homepage: "https://github.com/let-def/merlin-extend" 5 | bug-reports: "https://github.com/let-def/merlin-extend" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/let-def/merlin-extend.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "dune" {>= "1.0"} 14 | "cppo" {build} 15 | "ocaml" {>= "4.02.3"} 16 | ] 17 | synopsis: "A protocol to provide custom frontend to Merlin" 18 | description: """ 19 | This protocol allows to replace the OCaml frontend of Merlin. 20 | It extends what used to be done with the `-pp' flag to handle a few more cases.""" 21 | doc: "https://let-def.github.io/merlin-extend" 22 | url { 23 | src: 24 | "https://github.com/let-def/merlin-extend/releases/download/v0.5/merlin-extend-v0.5.tbz" 25 | checksum: [ 26 | "sha256=ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227" 27 | "sha512=55c5a3637337abb8ca8db679128a81ca8ccce567bc214d55b2e6444dc0e905b74c64d629bdea2457d0fe4be5306414feefcdbc4d4761fdafd59aa107550936b6" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /402.esy.lock/opam/merlin.3.3.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "merlin" 3 | maintainer: "defree@gmail.com" 4 | authors: "The Merlin team" 5 | homepage: "https://github.com/ocaml/merlin" 6 | bug-reports: "https://github.com/ocaml/merlin/issues" 7 | dev-repo: "git+https://github.com/ocaml/merlin.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.02.1" & < "4.09"} 14 | "dune" {>= "1.8.0"} 15 | "ocamlfind" {>= "1.5.2"} 16 | "yojson" 17 | "mdx" {with-test & >= "1.3.0"} 18 | ] 19 | synopsis: 20 | "Editor helper, provides completion, typing and source browsing in Vim and Emacs" 21 | description: 22 | "Merlin is an assistant for editing OCaml code. It aims to provide the features available in modern IDEs: error reporting, auto completion, source browsing and much more." 23 | post-messages: [ 24 | "merlin installed. 25 | 26 | Quick setup for VIM 27 | ------------------- 28 | Append this to your .vimrc to add merlin to vim's runtime-path: 29 | let g:opamshare = substitute(system('opam config var share'),'\\n$','','''') 30 | execute \"set rtp+=\" . g:opamshare . \"/merlin/vim\" 31 | 32 | Also run the following line in vim to index the documentation: 33 | :execute \"helptags \" . g:opamshare . \"/merlin/vim/doc\" 34 | 35 | Quick setup for EMACS 36 | ------------------- 37 | Add opam emacs directory to your load-path by appending this to your .emacs: 38 | (let ((opam-share (ignore-errors (car (process-lines \"opam\" \"config\" \"var\" \"share\"))))) 39 | (when (and opam-share (file-directory-p opam-share)) 40 | ;; Register Merlin 41 | (add-to-list 'load-path (expand-file-name \"emacs/site-lisp\" opam-share)) 42 | (autoload 'merlin-mode \"merlin\" nil t nil) 43 | ;; Automatically start it in OCaml buffers 44 | (add-hook 'tuareg-mode-hook 'merlin-mode t) 45 | (add-hook 'caml-mode-hook 'merlin-mode t) 46 | ;; Use opam switch to lookup ocamlmerlin binary 47 | (setq merlin-command 'opam))) 48 | 49 | Take a look at https://github.com/ocaml/merlin for more information 50 | 51 | Quick setup with opam-user-setup 52 | -------------------------------- 53 | 54 | Opam-user-setup support Merlin. 55 | 56 | $ opam user-setup install 57 | 58 | should take care of basic setup. 59 | See https://github.com/OCamlPro/opam-user-setup 60 | " 61 | {success & !user-setup:installed} 62 | ] 63 | url { 64 | src: 65 | "https://github.com/ocaml/merlin/releases/download/v3.3.2/merlin-v3.3.2.tbz" 66 | checksum: [ 67 | "sha256=1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801" 68 | "sha512=3ae021669808a40b4449f1cbdaca40b605ea5779a6204addd8b0ee4af9f14f528d55ca43a8dd3c7d547fb8e4cb256c09a9151d5559ef24dad83b5ab05aa146a2" 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /402.esy.lock/opam/ocaml-migrate-parsetree.1.4.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "frederic.bour@lakaban.net" 3 | authors: [ 4 | "Frédéric Bour " 5 | "Jérémie Dimino " 6 | ] 7 | license: "LGPL-2.1-only with OCaml-LGPL-linking-exception" 8 | homepage: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree" 9 | bug-reports: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/issues" 10 | dev-repo: "git+https://github.com/ocaml-ppx/ocaml-migrate-parsetree.git" 11 | doc: "https://ocaml-ppx.github.io/ocaml-migrate-parsetree/" 12 | tags: [ "syntax" "org:ocamllabs" ] 13 | build: [ 14 | ["dune" "build" "-p" name "-j" jobs] 15 | ] 16 | depends: [ 17 | "result" 18 | "ppx_derivers" 19 | "dune" {>= "1.9.0"} 20 | "ocaml" {>= "4.02.3"} 21 | ] 22 | synopsis: "Convert OCaml parsetrees between different versions" 23 | description: """ 24 | Convert OCaml parsetrees between different versions 25 | 26 | This library converts parsetrees, outcometree and ast mappers between 27 | different OCaml versions. High-level functions help making PPX 28 | rewriters independent of a compiler version. 29 | """ 30 | url { 31 | src: 32 | "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.4.0/ocaml-migrate-parsetree-v1.4.0.tbz" 33 | checksum: [ 34 | "sha256=231fbdc205187b3ee266b535d9cfe44b599067b2f6e97883c782ea7bb577d3b8" 35 | "sha512=61ee91d2d146cc2d2ff2d5dc4ef5dea4dc4d3c8dbd8b4c9586d64b6ad7302327ab35547aa0a5b0103c3f07b66b13d416a1bee6d4d117293cd3cabe44113ec6d4" 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /402.esy.lock/opam/ocamlbuild.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Gabriel Scherer " 3 | authors: [ 4 | "Nicolas Pouillard" 5 | "Berke Durak" 6 | ] 7 | license: "LGPL-2.1-only with OCaml-LGPL-linking-exception" 8 | 9 | homepage: "https://github.com/ocaml/ocaml" 10 | dev-repo: "git+https://github.com/ocaml/ocaml.git" 11 | bug-reports: "http://caml.inria.fr/mantis/" 12 | 13 | doc: [ 14 | "http://caml.inria.fr/pub/docs/manual-ocaml/ocamlbuild.html" 15 | "https://github.com/gasche/manual-ocamlbuild/blob/master/manual.md" 16 | ] 17 | 18 | depends: ["ocaml" "base-ocamlbuild"] 19 | synopsis: 20 | "Build system distributed with the OCaml compiler since OCaml 3.10.0" 21 | -------------------------------------------------------------------------------- /402.esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /402.esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /402.esy.lock/opam/ocamlfind.1.8.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "A library manager for OCaml" 3 | maintainer: "Thomas Gazagnaire " 4 | authors: "Gerd Stolpmann " 5 | homepage: "http://projects.camlcity.org/projects/findlib.html" 6 | bug-reports: "https://gitlab.camlcity.org/gerd/lib-findlib/issues" 7 | dev-repo: "git+https://gitlab.camlcity.org/gerd/lib-findlib.git" 8 | description: """ 9 | Findlib is a library manager for OCaml. It provides a convention how 10 | to store libraries, and a file format ("META") to describe the 11 | properties of libraries. There is also a tool (ocamlfind) for 12 | interpreting the META files, so that it is very easy to use libraries 13 | in programs and scripts. 14 | """ 15 | build: [ 16 | [ 17 | "./configure" 18 | "-bindir" 19 | bin 20 | "-sitelib" 21 | lib 22 | "-mandir" 23 | man 24 | "-config" 25 | "%{lib}%/findlib.conf" 26 | "-no-custom" 27 | "-no-camlp4" {!ocaml:preinstalled & ocaml:version >= "4.02.0"} 28 | "-no-topfind" {ocaml:preinstalled} 29 | ] 30 | [make "all"] 31 | [make "opt"] {ocaml:native} 32 | ] 33 | install: [ 34 | [make "install"] 35 | ["install" "-m" "0755" "ocaml-stub" "%{bin}%/ocaml"] {ocaml:preinstalled} 36 | ] 37 | depends: [ 38 | "ocaml" {>= "4.00.0"} 39 | "conf-m4" {build} 40 | ] 41 | extra-files: [ 42 | ["ocamlfind.install" "md5=06f2c282ab52d93aa6adeeadd82a2543"] 43 | ["ocaml-stub" "md5=181f259c9e0bad9ef523e7d4abfdf87a"] 44 | ] 45 | url { 46 | src: "http://download.camlcity.org/download/findlib-1.8.1.tar.gz" 47 | checksum: "md5=18ca650982c15536616dea0e422cbd8c" 48 | mirrors: "http://download2.camlcity.org/download/findlib-1.8.1.tar.gz" 49 | } 50 | depopts: ["graphics"] 51 | -------------------------------------------------------------------------------- /402.esy.lock/opam/ppx_derivers.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | license: "BSD-3-Clause" 5 | homepage: "https://github.com/ocaml-ppx/ppx_derivers" 6 | bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" 7 | dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" 13 | "dune" 14 | ] 15 | synopsis: "Shared [@@deriving] plugin registry" 16 | description: """ 17 | Ppx_derivers is a tiny package whose sole purpose is to allow 18 | ppx_deriving and ppx_type_conv to inter-operate gracefully when linked 19 | as part of the same ocaml-migrate-parsetree driver.""" 20 | url { 21 | src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz" 22 | checksum: "md5=5dc2bf130c1db3c731fe0fffc5648b41" 23 | } 24 | -------------------------------------------------------------------------------- /402.esy.lock/opam/reason.3.5.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Jordan Walke " 3 | authors: [ "Jordan Walke " ] 4 | license: "MIT" 5 | homepage: "https://github.com/facebook/reason" 6 | doc: "http://reasonml.github.io/" 7 | bug-reports: "https://github.com/facebook/reason/issues" 8 | dev-repo: "git://github.com/facebook/reason.git" 9 | tags: [ "syntax" ] 10 | build: [ 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" {>= "4.02" & < "4.10"} 16 | "dune" {>= "1.4"} 17 | "ocamlfind" {build} 18 | "menhir" {>= "20170418"} 19 | "merlin-extend" {>= "0.4"} 20 | "result" 21 | "ocaml-migrate-parsetree" 22 | ] 23 | synopsis: "Reason: Syntax & Toolchain for OCaml" 24 | description: """ 25 | Reason gives OCaml a new syntax that is remniscient of languages like 26 | JavaScript. It's also the umbrella project for a set of tools for the OCaml & 27 | JavaScript ecosystem.""" 28 | url { 29 | src: "https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz" 30 | checksum: "md5=66c54296009e0f6cbc8e93aa01105cbb" 31 | } 32 | -------------------------------------------------------------------------------- /402.esy.lock/opam/result.1.4/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD-3-Clause" 8 | build: [["dune" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "dune" {>= "1.0"} 12 | ] 13 | synopsis: "Compatibility Result module" 14 | description: """ 15 | Projects that want to use the new result type defined in OCaml >= 4.03 16 | while staying compatible with older version of OCaml should use the 17 | Result module defined in this library.""" 18 | url { 19 | src: 20 | "https://github.com/janestreet/result/archive/1.4.tar.gz" 21 | checksum: "md5=d3162dbc501a2af65c8c71e0866541da" 22 | } 23 | -------------------------------------------------------------------------------- /402.esy.lock/opam/yojson.1.7.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | homepage: "https://github.com/ocaml-community/yojson" 5 | bug-reports: "https://github.com/ocaml-community/yojson/issues" 6 | dev-repo: "git+https://github.com/ocaml-community/yojson.git" 7 | doc: "https://ocaml-community.github.io/yojson/" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | run-test: [["dune" "runtest" "-p" name "-j" jobs]] 13 | depends: [ 14 | "ocaml" {>= "4.02.3"} 15 | "dune" 16 | "cppo" {build} 17 | "easy-format" 18 | "biniou" {>= "1.2.0"} 19 | "alcotest" {with-test & >= "0.8.5"} 20 | ] 21 | synopsis: 22 | "Yojson is an optimized parsing and printing library for the JSON format" 23 | description: """ 24 | Yojson is an optimized parsing and printing library for the JSON format. 25 | 26 | It addresses a few shortcomings of json-wheel including 2x speedup, 27 | polymorphic variants and optional syntax for tuples and variants. 28 | 29 | ydump is a pretty-printing command-line program provided with the 30 | yojson package. 31 | 32 | The program atdgen can be used to derive OCaml-JSON serializers and 33 | deserializers from type definitions.""" 34 | url { 35 | src: 36 | "https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz" 37 | checksum: "md5=b89d39ca3f8c532abe5f547ad3b8f84d" 38 | } 39 | -------------------------------------------------------------------------------- /402.esy.lock/overrides/opam__s__dune_opam__c__1.11.4_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "ocaml", 5 | "bootstrap.ml" 6 | ], 7 | [ 8 | "./boot.exe", 9 | "--release", 10 | "-j", 11 | "4" 12 | ] 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /402.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch: -------------------------------------------------------------------------------- 1 | --- ./Makefile 2 | +++ ./Makefile 3 | @@ -57,16 +57,16 @@ 4 | cat findlib.conf.in | \ 5 | $(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf 6 | if ./tools/cmd_from_same_dir ocamlc; then \ 7 | - echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \ 8 | + echo 'ocamlc="ocamlc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 9 | fi 10 | if ./tools/cmd_from_same_dir ocamlopt; then \ 11 | - echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \ 12 | + echo 'ocamlopt="ocamlopt.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 13 | fi 14 | if ./tools/cmd_from_same_dir ocamldep; then \ 15 | - echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \ 16 | + echo 'ocamldep="ocamldep.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 17 | fi 18 | if ./tools/cmd_from_same_dir ocamldoc; then \ 19 | - echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \ 20 | + echo 'ocamldoc="ocamldoc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 21 | fi 22 | 23 | .PHONY: install-doc 24 | --- ./src/findlib/findlib_config.mlp 25 | +++ ./src/findlib/findlib_config.mlp 26 | @@ -24,3 +24,5 @@ 27 | | "MacOS" -> "" (* don't know *) 28 | | _ -> failwith "Unknown Sys.os_type" 29 | ;; 30 | + 31 | +let exec_suffix = "@EXEC_SUFFIX@";; 32 | --- ./src/findlib/findlib.ml 33 | +++ ./src/findlib/findlib.ml 34 | @@ -28,15 +28,20 @@ 35 | let conf_ldconf = ref "";; 36 | let conf_ignore_dups_in = ref ([] : string list);; 37 | 38 | -let ocamlc_default = "ocamlc";; 39 | -let ocamlopt_default = "ocamlopt";; 40 | -let ocamlcp_default = "ocamlcp";; 41 | -let ocamloptp_default = "ocamloptp";; 42 | -let ocamlmklib_default = "ocamlmklib";; 43 | -let ocamlmktop_default = "ocamlmktop";; 44 | -let ocamldep_default = "ocamldep";; 45 | -let ocamlbrowser_default = "ocamlbrowser";; 46 | -let ocamldoc_default = "ocamldoc";; 47 | +let add_exec str = 48 | + match Findlib_config.exec_suffix with 49 | + | "" -> str 50 | + | a -> str ^ a ;; 51 | +let ocamlc_default = add_exec "ocamlc";; 52 | +let ocamlopt_default = add_exec "ocamlopt";; 53 | +let ocamlcp_default = add_exec "ocamlcp";; 54 | +let ocamloptp_default = add_exec "ocamloptp";; 55 | +let ocamlmklib_default = add_exec "ocamlmklib";; 56 | +let ocamlmktop_default = add_exec "ocamlmktop";; 57 | +let ocamldep_default = add_exec "ocamldep";; 58 | +let ocamlbrowser_default = add_exec "ocamlbrowser";; 59 | +let ocamldoc_default = add_exec "ocamldoc";; 60 | + 61 | 62 | 63 | let init_manually 64 | --- ./src/findlib/fl_package_base.ml 65 | +++ ./src/findlib/fl_package_base.ml 66 | @@ -133,7 +133,15 @@ 67 | List.find (fun def -> def.def_var = "exists_if") p.package_defs in 68 | let files = Fl_split.in_words def.def_value in 69 | List.exists 70 | - (fun file -> Sys.file_exists (Filename.concat d' file)) 71 | + (fun file -> 72 | + let fln = Filename.concat d' file in 73 | + let e = Sys.file_exists fln in 74 | + (* necessary for ppx executables *) 75 | + if e || Sys.os_type <> "Win32" || Filename.check_suffix fln ".exe" then 76 | + e 77 | + else 78 | + Sys.file_exists (fln ^ ".exe") 79 | + ) 80 | files 81 | with Not_found -> true in 82 | 83 | --- ./src/findlib/fl_split.ml 84 | +++ ./src/findlib/fl_split.ml 85 | @@ -126,10 +126,17 @@ 86 | | '/' | '\\' -> true 87 | | _ -> false in 88 | let norm_dir_win() = 89 | - if l >= 1 && s.[0] = '/' then 90 | - Buffer.add_char b '\\' else Buffer.add_char b s.[0]; 91 | - if l >= 2 && s.[1] = '/' then 92 | - Buffer.add_char b '\\' else Buffer.add_char b s.[1]; 93 | + if l >= 1 then ( 94 | + if s.[0] = '/' then 95 | + Buffer.add_char b '\\' 96 | + else 97 | + Buffer.add_char b s.[0] ; 98 | + if l >= 2 then 99 | + if s.[1] = '/' then 100 | + Buffer.add_char b '\\' 101 | + else 102 | + Buffer.add_char b s.[1]; 103 | + ); 104 | for k = 2 to l - 1 do 105 | let c = s.[k] in 106 | if is_slash c then ( 107 | --- ./src/findlib/frontend.ml 108 | +++ ./src/findlib/frontend.ml 109 | @@ -31,10 +31,18 @@ 110 | else 111 | Sys_error (arg ^ ": " ^ Unix.error_message code) 112 | 113 | +let is_win = Sys.os_type = "Win32" 114 | + 115 | +let () = 116 | + match Findlib_config.system with 117 | + | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> 118 | + (try set_binary_mode_out stdout true with _ -> ()); 119 | + (try set_binary_mode_out stderr true with _ -> ()); 120 | + | _ -> () 121 | 122 | let slashify s = 123 | match Findlib_config.system with 124 | - | "mingw" | "mingw64" | "cygwin" -> 125 | + | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> 126 | let b = Buffer.create 80 in 127 | String.iter 128 | (function 129 | @@ -49,7 +57,7 @@ 130 | 131 | let out_path ?(prefix="") s = 132 | match Findlib_config.system with 133 | - | "mingw" | "mingw64" | "cygwin" -> 134 | + | "win32" | "win64" | "mingw" | "mingw64" | "cygwin" -> 135 | let u = slashify s in 136 | prefix ^ 137 | (if String.contains u ' ' then 138 | @@ -273,11 +281,9 @@ 139 | 140 | 141 | let identify_dir d = 142 | - match Sys.os_type with 143 | - | "Win32" -> 144 | - failwith "identify_dir" (* not available *) 145 | - | _ -> 146 | - let s = Unix.stat d in 147 | + if is_win then 148 | + failwith "identify_dir"; (* not available *) 149 | + let s = Unix.stat d in 150 | (s.Unix.st_dev, s.Unix.st_ino) 151 | ;; 152 | 153 | @@ -459,6 +465,96 @@ 154 | ) 155 | packages 156 | 157 | +let rewrite_cmd s = 158 | + if s = "" || not is_win then 159 | + s 160 | + else 161 | + let s = 162 | + let l = String.length s in 163 | + let b = Buffer.create l in 164 | + for i = 0 to pred l do 165 | + match s.[i] with 166 | + | '/' -> Buffer.add_char b '\\' 167 | + | x -> Buffer.add_char b x 168 | + done; 169 | + Buffer.contents b 170 | + in 171 | + if (Filename.is_implicit s && String.contains s '\\' = false) || 172 | + Filename.check_suffix (String.lowercase s) ".exe" then 173 | + s 174 | + else 175 | + let s' = s ^ ".exe" in 176 | + if Sys.file_exists s' then 177 | + s' 178 | + else 179 | + s 180 | + 181 | +let rewrite_cmd s = 182 | + if s = "" || not is_win then s else 183 | + let s = 184 | + let l = String.length s in 185 | + let b = Buffer.create l in 186 | + for i = 0 to pred l do 187 | + match s.[i] with 188 | + | '/' -> Buffer.add_char b '\\' 189 | + | x -> Buffer.add_char b x 190 | + done; 191 | + Buffer.contents b 192 | + in 193 | + if (Filename.is_implicit s && String.contains s '\\' = false) || 194 | + Filename.check_suffix (String.lowercase s) ".exe" then 195 | + s 196 | + else 197 | + let s' = s ^ ".exe" in 198 | + if Sys.file_exists s' then 199 | + s' 200 | + else 201 | + s 202 | + 203 | +let rewrite_pp cmd = 204 | + if not is_win then cmd else 205 | + let module T = struct exception Keep end in 206 | + let is_whitespace = function 207 | + | ' ' | '\011' | '\012' | '\n' | '\r' | '\t' -> true 208 | + | _ -> false in 209 | + (* characters that triggers special behaviour (cmd.exe, not unix shell) *) 210 | + let is_unsafe_char = function 211 | + | '(' | ')' | '%' | '!' | '^' | '<' | '>' | '&' -> true 212 | + | _ -> false in 213 | + let len = String.length cmd in 214 | + let buf = Buffer.create (len + 4) in 215 | + let buf_cmd = Buffer.create len in 216 | + let rec iter_ws i = 217 | + if i >= len then () else 218 | + let cur = cmd.[i] in 219 | + if is_whitespace cur then ( 220 | + Buffer.add_char buf cur; 221 | + iter_ws (succ i) 222 | + ) 223 | + else 224 | + iter_cmd i 225 | + and iter_cmd i = 226 | + if i >= len then add_buf_cmd () else 227 | + let cur = cmd.[i] in 228 | + if is_unsafe_char cur || cur = '"' || cur = '\'' then 229 | + raise T.Keep; 230 | + if is_whitespace cur then ( 231 | + add_buf_cmd (); 232 | + Buffer.add_substring buf cmd i (len - i) 233 | + ) 234 | + else ( 235 | + Buffer.add_char buf_cmd cur; 236 | + iter_cmd (succ i) 237 | + ) 238 | + and add_buf_cmd () = 239 | + if Buffer.length buf_cmd > 0 then 240 | + Buffer.add_string buf (rewrite_cmd (Buffer.contents buf_cmd)) 241 | + in 242 | + try 243 | + iter_ws 0; 244 | + Buffer.contents buf 245 | + with 246 | + | T.Keep -> cmd 247 | 248 | let process_pp_spec syntax_preds packages pp_opts = 249 | (* Returns: pp_command *) 250 | @@ -549,7 +645,7 @@ 251 | None -> [] 252 | | Some cmd -> 253 | ["-pp"; 254 | - cmd ^ " " ^ 255 | + (rewrite_cmd cmd) ^ " " ^ 256 | String.concat " " (List.map Filename.quote pp_i_options) ^ " " ^ 257 | String.concat " " (List.map Filename.quote pp_archives) ^ " " ^ 258 | String.concat " " (List.map Filename.quote pp_opts)] 259 | @@ -625,9 +721,11 @@ 260 | in 261 | try 262 | let preprocessor = 263 | + rewrite_cmd ( 264 | resolve_path 265 | ~base ~explicit:true 266 | - (package_property predicates pname "ppx") in 267 | + (package_property predicates pname "ppx") ) 268 | + in 269 | ["-ppx"; String.concat " " (preprocessor :: options)] 270 | with Not_found -> [] 271 | ) 272 | @@ -895,6 +993,14 @@ 273 | switch (e.g. -L instead of -L ) 274 | *) 275 | 276 | +(* We may need to remove files on which we do not have complete control. 277 | + On Windows, removing a read-only file fails so try to change the 278 | + mode of the file first. *) 279 | +let remove_file fname = 280 | + try Sys.remove fname 281 | + with Sys_error _ when is_win -> 282 | + (try Unix.chmod fname 0o666 with Unix.Unix_error _ -> ()); 283 | + Sys.remove fname 284 | 285 | let ocamlc which () = 286 | 287 | @@ -1022,9 +1128,12 @@ 288 | 289 | "-intf", 290 | Arg.String (fun s -> pass_files := !pass_files @ [ Intf(slashify s) ]); 291 | - 292 | + 293 | "-pp", 294 | - Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" s); 295 | + Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" (rewrite_pp s)); 296 | + 297 | + "-ppx", 298 | + Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); 299 | 300 | "-thread", 301 | Arg.Unit (fun _ -> threads := threads_default); 302 | @@ -1237,7 +1346,7 @@ 303 | with 304 | any -> 305 | close_out initl; 306 | - Sys.remove initl_file_name; 307 | + remove_file initl_file_name; 308 | raise any 309 | end; 310 | 311 | @@ -1245,9 +1354,9 @@ 312 | at_exit 313 | (fun () -> 314 | let tr f x = try f x with _ -> () in 315 | - tr Sys.remove initl_file_name; 316 | - tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmi"); 317 | - tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmo"); 318 | + tr remove_file initl_file_name; 319 | + tr remove_file (Filename.chop_extension initl_file_name ^ ".cmi"); 320 | + tr remove_file (Filename.chop_extension initl_file_name ^ ".cmo"); 321 | ); 322 | 323 | let exclude_list = [ stdlibdir; threads_dir; vmthreads_dir ] in 324 | @@ -1493,7 +1602,9 @@ 325 | [ "-v", Arg.Unit (fun () -> verbose := Verbose); 326 | "-pp", Arg.String (fun s -> 327 | pp_specified := true; 328 | - options := !options @ ["-pp"; s]); 329 | + options := !options @ ["-pp"; rewrite_pp s]); 330 | + "-ppx", Arg.String (fun s -> 331 | + options := !options @ ["-ppx"; rewrite_pp s]); 332 | ] 333 | ) 334 | ) 335 | @@ -1672,7 +1783,9 @@ 336 | Arg.String (fun s -> add_spec_fn "-I" (slashify (resolve_path s))); 337 | 338 | "-pp", Arg.String (fun s -> pp_specified := true; 339 | - add_spec_fn "-pp" s); 340 | + add_spec_fn "-pp" (rewrite_pp s)); 341 | + "-ppx", Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); 342 | + 343 | ] 344 | ) 345 | ) 346 | @@ -1830,7 +1943,10 @@ 347 | output_string ch_out append; 348 | close_out ch_out; 349 | close_in ch_in; 350 | - Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime; 351 | + (try Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime 352 | + with Unix.Unix_error(e,_,_) -> 353 | + prerr_endline("Warning: setting utimes for " ^ outpath 354 | + ^ ": " ^ Unix.error_message e)); 355 | 356 | prerr_endline("Installed " ^ outpath); 357 | with 358 | @@ -1882,6 +1998,8 @@ 359 | Unix.openfile (Filename.concat dir owner_file) [Unix.O_RDONLY] 0 in 360 | let f = 361 | Unix.in_channel_of_descr fd in 362 | + if is_win then 363 | + set_binary_mode_in f false; 364 | try 365 | let line = input_line f in 366 | let is_my_file = (line = pkg) in 367 | @@ -2208,7 +2326,7 @@ 368 | let lines = read_ldconf !ldconf in 369 | let dlldir_norm = Fl_split.norm_dir dlldir in 370 | let dlldir_norm_lc = string_lowercase_ascii dlldir_norm in 371 | - let ci_filesys = (Sys.os_type = "Win32") in 372 | + let ci_filesys = is_win in 373 | let check_dir d = 374 | let d' = Fl_split.norm_dir d in 375 | (d' = dlldir_norm) || 376 | @@ -2356,7 +2474,7 @@ 377 | List.iter 378 | (fun file -> 379 | let absfile = Filename.concat dlldir file in 380 | - Sys.remove absfile; 381 | + remove_file absfile; 382 | prerr_endline ("Removed " ^ absfile) 383 | ) 384 | dll_files 385 | @@ -2365,7 +2483,7 @@ 386 | (* Remove the files from the package directory: *) 387 | if Sys.file_exists pkgdir then begin 388 | let files = Sys.readdir pkgdir in 389 | - Array.iter (fun f -> Sys.remove (Filename.concat pkgdir f)) files; 390 | + Array.iter (fun f -> remove_file (Filename.concat pkgdir f)) files; 391 | Unix.rmdir pkgdir; 392 | prerr_endline ("Removed " ^ pkgdir) 393 | end 394 | @@ -2415,7 +2533,9 @@ 395 | 396 | 397 | let print_configuration() = 398 | + let sl = slashify in 399 | let dir s = 400 | + let s = sl s in 401 | if Sys.file_exists s then 402 | s 403 | else 404 | @@ -2453,27 +2573,27 @@ 405 | if md = "" then "the corresponding package directories" else dir md 406 | ); 407 | Printf.printf "The standard library is assumed to reside in:\n %s\n" 408 | - (Findlib.ocaml_stdlib()); 409 | + (sl (Findlib.ocaml_stdlib())); 410 | Printf.printf "The ld.conf file can be found here:\n %s\n" 411 | - (Findlib.ocaml_ldconf()); 412 | + (sl (Findlib.ocaml_ldconf())); 413 | flush stdout 414 | | Some "conf" -> 415 | - print_endline (Findlib.config_file()) 416 | + print_endline (sl (Findlib.config_file())) 417 | | Some "path" -> 418 | - List.iter print_endline (Findlib.search_path()) 419 | + List.iter ( fun x -> print_endline (sl x)) (Findlib.search_path()) 420 | | Some "destdir" -> 421 | - print_endline (Findlib.default_location()) 422 | + print_endline ( sl (Findlib.default_location())) 423 | | Some "metadir" -> 424 | - print_endline (Findlib.meta_directory()) 425 | + print_endline ( sl (Findlib.meta_directory())) 426 | | Some "metapath" -> 427 | let mdir = Findlib.meta_directory() in 428 | let ddir = Findlib.default_location() in 429 | - print_endline 430 | - (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META") 431 | + print_endline ( sl 432 | + (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META")) 433 | | Some "stdlib" -> 434 | - print_endline (Findlib.ocaml_stdlib()) 435 | + print_endline ( sl (Findlib.ocaml_stdlib())) 436 | | Some "ldconf" -> 437 | - print_endline (Findlib.ocaml_ldconf()) 438 | + print_endline ( sl (Findlib.ocaml_ldconf())) 439 | | _ -> 440 | assert false 441 | ;; 442 | @@ -2481,7 +2601,7 @@ 443 | 444 | let ocamlcall pkg cmd = 445 | let dir = package_directory pkg in 446 | - let path = Filename.concat dir cmd in 447 | + let path = rewrite_cmd (Filename.concat dir cmd) in 448 | begin 449 | try Unix.access path [ Unix.X_OK ] 450 | with 451 | @@ -2647,6 +2767,10 @@ 452 | | Sys_error f -> 453 | prerr_endline ("ocamlfind: " ^ f); 454 | exit 2 455 | + | Unix.Unix_error (e, fn, f) -> 456 | + prerr_endline ("ocamlfind: " ^ fn ^ " " ^ f 457 | + ^ ": " ^ Unix.error_message e); 458 | + exit 2 459 | | Findlib.No_such_package(pkg,info) -> 460 | prerr_endline ("ocamlfind: Package `" ^ pkg ^ "' not found" ^ 461 | (if info <> "" then " - " ^ info else "")); 462 | --- ./src/findlib/Makefile 463 | +++ ./src/findlib/Makefile 464 | @@ -90,6 +90,7 @@ 465 | cat findlib_config.mlp | \ 466 | $(SH) $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \ 467 | $(SH) $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \ 468 | + $(SH) $(TOP)/tools/patch '@EXEC_SUFFIX@' '$(EXEC_SUFFIX)' | \ 469 | sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \ 470 | -e 's;@SYSTEM@;$(SYSTEM);g' \ 471 | >findlib_config.ml 472 | -------------------------------------------------------------------------------- /402.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < findlib-1.8.1.patch' : 'true'}" 7 | ], 8 | [ 9 | "./configure", 10 | "-bindir", 11 | "#{self.bin}", 12 | "-sitelib", 13 | "#{self.lib}", 14 | "-mandir", 15 | "#{self.man}", 16 | "-config", 17 | "#{self.lib}/findlib.conf", 18 | "-no-custom", 19 | "-no-topfind" 20 | ], 21 | [ 22 | "make", 23 | "all" 24 | ], 25 | [ 26 | "make", 27 | "opt" 28 | ] 29 | ], 30 | "install": [ 31 | [ 32 | "make", 33 | "install" 34 | ], 35 | [ 36 | "install", 37 | "-m", 38 | "0755", 39 | "ocaml-stub", 40 | "#{self.bin}/ocaml" 41 | ], 42 | [ 43 | "mkdir", 44 | "-p", 45 | "#{self.toplevel}" 46 | ], 47 | [ 48 | "install", 49 | "-m", 50 | "0644", 51 | "src/findlib/topfind", 52 | "#{self.toplevel}/topfind" 53 | ] 54 | ], 55 | "exportedEnv": { 56 | "OCAML_TOPLEVEL_PATH": { 57 | "val": "#{self.toplevel}", 58 | "scope": "global" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /402.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "let-anything", 3 | "dependencies": { 4 | "ocaml": "~4.2.3000", 5 | "@opam/dune": "*", 6 | "@opam/reason": "*", 7 | "@opam/ocaml-migrate-parsetree": "*" 8 | }, 9 | "devDependencies": { 10 | "@opam/merlin": "*" 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /Let_anything.opam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jaredly/let-anything/840ec715be3e539f79d870d9361a60440043deb6/Let_anything.opam -------------------------------------------------------------------------------- /Readme.md: -------------------------------------------------------------------------------- 1 | # Deprecated, use the [reasonml-community](https://github.com/reasonml-community/let-anything) one 2 | 3 | # let%Anything 4 | 5 | This is a ppx that looks for `let%Anything`, where Anything is a valid module identifier (e.g. captialized), and turns it into `Anything.let_(value, pattern => continuation)`. 6 | 7 | It's an exploration of [this PR to the reason repo](https://github.com/facebook/reason/pull/2140). 8 | 9 | Here's an example of using it ([source](https://github.com/notablemind/renm/blob/949e1583d4df5e6d61ea066767a52828f8f8069b/src/core/Store.re#L116 10 | )) 11 | ```re 12 | let%Opt node = get(store, id); 13 | let%Opt parent = get(store, node.parent); 14 | Some(( 15 | [NodeChildren(parent.id, parent.children |. List.keep((!=)(node.id))), DeleteNode(node.id), 16 | View({...store.view, active: nextId}) 17 | ], 18 | [Event.Node(parent.id), Event.View(Node(nextId))] 19 | )) 20 | ``` 21 | 22 | ### try%Anything 23 | 24 | Let's make a `try_` function for the `result` type that does a *bind* over the error case: 25 | ``` 26 | module Res = { 27 | let try_ = (result, handler) => switch result { 28 | | Ok(v) => Ok(v) 29 | | Error(e) => handler(e) 30 | } 31 | } 32 | ``` 33 | This will come in handy for the case where we want to transform the error side of a result -- either turning it into a different error type, or turning it into a successful value. For example: 34 | ``` 35 | let v = Error("bad") 36 | try%Res v { 37 | | "invalid username/password" => Error(UserError) 38 | | "no user - use default" => Ok(defaultUser) 39 | | message => Error(ServerError) 40 | } 41 | ``` 42 | 43 | #### In the general case 44 | 45 | If you have a data type that has a "failure" case (like promises, or the `result` type), the `try%Anything` syntax can be helpful. 46 | Here's the transform: 47 | 48 | ``` 49 | try%Blah someExpr { 50 | | Something(x) => y 51 | } 52 | ``` 53 | becomes 54 | ``` 55 | Blah.try_(someExpr, result => switch result { 56 | | Something(x) => y 57 | }) 58 | ``` 59 | 60 | ## Addendum 61 | 62 | And here are the modules used ([source](https://github.com/notablemind/renm/blob/949e1583d4df5e6d61ea066767a52828f8f8069b/src/utils/Lets.re)) 63 | ```re 64 | module Opt = { 65 | let let_ = (a, b) => switch (a) { 66 | | None => None 67 | | Some(x) => b(x) 68 | } 69 | }; 70 | 71 | module Result = { 72 | let let_ = (value, fn) => switch value { 73 | | Ok(v) => fn(v) 74 | | Error(_) => value 75 | }; 76 | let try_ = (value, fn) => switch value { 77 | | Ok(_) => value 78 | | Error(err) => fn(err) 79 | }; 80 | } 81 | ``` 82 | 83 | # Usage 84 | 85 | 1. Install the NPM package `let-anything` through your favorite `npm` package manager (npm itself or yarn for example) 86 | 2. Add the following path to the `ppx-flags` defined in your `bsconfig.json` file (see bucklescript.github.io/bucklescript/docson/#build-schema.json): `let-anything/lib/bs/native/let_anything.native` 87 | -------------------------------------------------------------------------------- /bsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "let-anything", 3 | "bsc-flags": "-g", 4 | "ocaml-flags": ["-g", "-bin-annot"], 5 | "warnings": { 6 | "number": "-6+7-26-27-32..40-28-44-45", 7 | "error": "+8" 8 | }, 9 | "sources": [ 10 | {"dir": "src", "type": "ppx"}, 11 | {"dir": "tests", "type": "dev", "subdirs": true, "ppx": ["Let_anything"]} 12 | ], 13 | "ocaml-dependencies": ["compiler-libs", "unix", "bigarray", "str"], 14 | "public": ["Main"], 15 | "entries": [{ 16 | "backend": "native", 17 | "main-module": "Tests" 18 | }, { 19 | "backend": "native", 20 | "type": "ppx", 21 | "main-module": "Let_anything" 22 | }], 23 | "refmt": 3 24 | } 25 | -------------------------------------------------------------------------------- /dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.0) 2 | -------------------------------------------------------------------------------- /esy.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "let-anything", 3 | "dependencies": { 4 | "ocaml": "~4.6.1000", 5 | "@opam/dune": "*", 6 | "@opam/reason": "*", 7 | "@opam/ocaml-migrate-parsetree": "*" 8 | }, 9 | "esy": { 10 | "build": "dune build --profile=release" 11 | }, 12 | "devDependencies": { 13 | "@opam/merlin": "*" 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf 4 | -------------------------------------------------------------------------------- /esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /esy.lock/index.json: -------------------------------------------------------------------------------- 1 | { 2 | "checksum": "71d6b2d86bfcc889f5c89fcc276538f1", 3 | "root": "let-anything@link-dev:./esy.json", 4 | "node": { 5 | "ocaml@4.6.1000@d41d8cd9": { 6 | "id": "ocaml@4.6.1000@d41d8cd9", 7 | "name": "ocaml", 8 | "version": "4.6.1000", 9 | "source": { 10 | "type": "install", 11 | "source": [ 12 | "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.6.1000.tgz#sha1:99525ef559353481396454f9a072dedc96b52f44" 13 | ] 14 | }, 15 | "overrides": [], 16 | "dependencies": [], 17 | "devDependencies": [] 18 | }, 19 | "let-anything@link-dev:./esy.json": { 20 | "id": "let-anything@link-dev:./esy.json", 21 | "name": "let-anything", 22 | "version": "link-dev:./esy.json", 23 | "source": { "type": "link-dev", "path": ".", "manifest": "esy.json" }, 24 | "overrides": [], 25 | "dependencies": [ 26 | "ocaml@4.6.1000@d41d8cd9", "@opam/reason@opam:3.5.2@f689c2cb", 27 | "@opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d", 28 | "@opam/dune@opam:1.11.4@21d66ccd" 29 | ], 30 | "devDependencies": [ "@opam/merlin@opam:3.3.2@7a364181" ] 31 | }, 32 | "@opam/yojson@opam:1.7.0@7056d985": { 33 | "id": "@opam/yojson@opam:1.7.0@7056d985", 34 | "name": "@opam/yojson", 35 | "version": "opam:1.7.0", 36 | "source": { 37 | "type": "install", 38 | "source": [ 39 | "archive:https://opam.ocaml.org/cache/md5/b8/b89d39ca3f8c532abe5f547ad3b8f84d#md5:b89d39ca3f8c532abe5f547ad3b8f84d", 40 | "archive:https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz#md5:b89d39ca3f8c532abe5f547ad3b8f84d" 41 | ], 42 | "opam": { 43 | "name": "yojson", 44 | "version": "1.7.0", 45 | "path": "esy.lock/opam/yojson.1.7.0" 46 | } 47 | }, 48 | "overrides": [], 49 | "dependencies": [ 50 | "ocaml@4.6.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 51 | "@opam/dune@opam:1.11.4@21d66ccd", "@opam/cppo@opam:1.6.6@f4f83858", 52 | "@opam/biniou@opam:1.2.1@d7570399", 53 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 54 | ], 55 | "devDependencies": [ 56 | "ocaml@4.6.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 57 | "@opam/dune@opam:1.11.4@21d66ccd", "@opam/biniou@opam:1.2.1@d7570399" 58 | ] 59 | }, 60 | "@opam/result@opam:1.4@dc720aef": { 61 | "id": "@opam/result@opam:1.4@dc720aef", 62 | "name": "@opam/result", 63 | "version": "opam:1.4", 64 | "source": { 65 | "type": "install", 66 | "source": [ 67 | "archive:https://opam.ocaml.org/cache/md5/d3/d3162dbc501a2af65c8c71e0866541da#md5:d3162dbc501a2af65c8c71e0866541da", 68 | "archive:https://github.com/janestreet/result/archive/1.4.tar.gz#md5:d3162dbc501a2af65c8c71e0866541da" 69 | ], 70 | "opam": { 71 | "name": "result", 72 | "version": "1.4", 73 | "path": "esy.lock/opam/result.1.4" 74 | } 75 | }, 76 | "overrides": [], 77 | "dependencies": [ 78 | "ocaml@4.6.1000@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 79 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 80 | ], 81 | "devDependencies": [ 82 | "ocaml@4.6.1000@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd" 83 | ] 84 | }, 85 | "@opam/reason@opam:3.5.2@f689c2cb": { 86 | "id": "@opam/reason@opam:3.5.2@f689c2cb", 87 | "name": "@opam/reason", 88 | "version": "opam:3.5.2", 89 | "source": { 90 | "type": "install", 91 | "source": [ 92 | "archive:https://opam.ocaml.org/cache/md5/66/66c54296009e0f6cbc8e93aa01105cbb#md5:66c54296009e0f6cbc8e93aa01105cbb", 93 | "archive:https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz#md5:66c54296009e0f6cbc8e93aa01105cbb" 94 | ], 95 | "opam": { 96 | "name": "reason", 97 | "version": "3.5.2", 98 | "path": "esy.lock/opam/reason.3.5.2" 99 | } 100 | }, 101 | "overrides": [], 102 | "dependencies": [ 103 | "ocaml@4.6.1000@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 104 | "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 105 | "@opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d", 106 | "@opam/merlin-extend@opam:0.5@a5dd7d4b", 107 | "@opam/menhir@opam:20190924@004407ff", 108 | "@opam/dune@opam:1.11.4@21d66ccd", "@esy-ocaml/substs@0.0.1@d41d8cd9" 109 | ], 110 | "devDependencies": [ 111 | "ocaml@4.6.1000@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 112 | "@opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d", 113 | "@opam/merlin-extend@opam:0.5@a5dd7d4b", 114 | "@opam/menhir@opam:20190924@004407ff", 115 | "@opam/dune@opam:1.11.4@21d66ccd" 116 | ] 117 | }, 118 | "@opam/ppx_derivers@opam:1.2.1@ecf0aa45": { 119 | "id": "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", 120 | "name": "@opam/ppx_derivers", 121 | "version": "opam:1.2.1", 122 | "source": { 123 | "type": "install", 124 | "source": [ 125 | "archive:https://opam.ocaml.org/cache/md5/5d/5dc2bf130c1db3c731fe0fffc5648b41#md5:5dc2bf130c1db3c731fe0fffc5648b41", 126 | "archive:https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz#md5:5dc2bf130c1db3c731fe0fffc5648b41" 127 | ], 128 | "opam": { 129 | "name": "ppx_derivers", 130 | "version": "1.2.1", 131 | "path": "esy.lock/opam/ppx_derivers.1.2.1" 132 | } 133 | }, 134 | "overrides": [], 135 | "dependencies": [ 136 | "ocaml@4.6.1000@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 137 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 138 | ], 139 | "devDependencies": [ 140 | "ocaml@4.6.1000@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd" 141 | ] 142 | }, 143 | "@opam/ocamlfind@opam:1.8.1@ff07b0f9": { 144 | "id": "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 145 | "name": "@opam/ocamlfind", 146 | "version": "opam:1.8.1", 147 | "source": { 148 | "type": "install", 149 | "source": [ 150 | "archive:https://opam.ocaml.org/cache/md5/18/18ca650982c15536616dea0e422cbd8c#md5:18ca650982c15536616dea0e422cbd8c", 151 | "archive:http://download2.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c", 152 | "archive:http://download.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c" 153 | ], 154 | "opam": { 155 | "name": "ocamlfind", 156 | "version": "1.8.1", 157 | "path": "esy.lock/opam/ocamlfind.1.8.1" 158 | } 159 | }, 160 | "overrides": [ 161 | { 162 | "opamoverride": 163 | "esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override" 164 | } 165 | ], 166 | "dependencies": [ 167 | "ocaml@4.6.1000@d41d8cd9", "@opam/conf-m4@opam:1@3b2b148a", 168 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 169 | ], 170 | "devDependencies": [ "ocaml@4.6.1000@d41d8cd9" ] 171 | }, 172 | "@opam/ocamlbuild@opam:0.14.0@6ac75d03": { 173 | "id": "@opam/ocamlbuild@opam:0.14.0@6ac75d03", 174 | "name": "@opam/ocamlbuild", 175 | "version": "opam:0.14.0", 176 | "source": { 177 | "type": "install", 178 | "source": [ 179 | "archive:https://opam.ocaml.org/cache/sha256/87/87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78#sha256:87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78", 180 | "archive:https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz#sha256:87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78" 181 | ], 182 | "opam": { 183 | "name": "ocamlbuild", 184 | "version": "0.14.0", 185 | "path": "esy.lock/opam/ocamlbuild.0.14.0" 186 | } 187 | }, 188 | "overrides": [ 189 | { 190 | "opamoverride": 191 | "esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override" 192 | } 193 | ], 194 | "dependencies": [ 195 | "ocaml@4.6.1000@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" 196 | ], 197 | "devDependencies": [ "ocaml@4.6.1000@d41d8cd9" ] 198 | }, 199 | "@opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d": { 200 | "id": "@opam/ocaml-migrate-parsetree@opam:1.4.0@0c4ec62d", 201 | "name": "@opam/ocaml-migrate-parsetree", 202 | "version": "opam:1.4.0", 203 | "source": { 204 | "type": "install", 205 | "source": [ 206 | "archive:https://opam.ocaml.org/cache/sha256/23/231fbdc205187b3ee266b535d9cfe44b599067b2f6e97883c782ea7bb577d3b8#sha256:231fbdc205187b3ee266b535d9cfe44b599067b2f6e97883c782ea7bb577d3b8", 207 | "archive:https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.4.0/ocaml-migrate-parsetree-v1.4.0.tbz#sha256:231fbdc205187b3ee266b535d9cfe44b599067b2f6e97883c782ea7bb577d3b8" 208 | ], 209 | "opam": { 210 | "name": "ocaml-migrate-parsetree", 211 | "version": "1.4.0", 212 | "path": "esy.lock/opam/ocaml-migrate-parsetree.1.4.0" 213 | } 214 | }, 215 | "overrides": [], 216 | "dependencies": [ 217 | "ocaml@4.6.1000@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 218 | "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", 219 | "@opam/dune@opam:1.11.4@21d66ccd", "@esy-ocaml/substs@0.0.1@d41d8cd9" 220 | ], 221 | "devDependencies": [ 222 | "ocaml@4.6.1000@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 223 | "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", 224 | "@opam/dune@opam:1.11.4@21d66ccd" 225 | ] 226 | }, 227 | "@opam/merlin-extend@opam:0.5@a5dd7d4b": { 228 | "id": "@opam/merlin-extend@opam:0.5@a5dd7d4b", 229 | "name": "@opam/merlin-extend", 230 | "version": "opam:0.5", 231 | "source": { 232 | "type": "install", 233 | "source": [ 234 | "archive:https://opam.ocaml.org/cache/sha256/ca/ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227#sha256:ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227", 235 | "archive:https://github.com/let-def/merlin-extend/releases/download/v0.5/merlin-extend-v0.5.tbz#sha256:ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227" 236 | ], 237 | "opam": { 238 | "name": "merlin-extend", 239 | "version": "0.5", 240 | "path": "esy.lock/opam/merlin-extend.0.5" 241 | } 242 | }, 243 | "overrides": [], 244 | "dependencies": [ 245 | "ocaml@4.6.1000@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 246 | "@opam/cppo@opam:1.6.6@f4f83858", "@esy-ocaml/substs@0.0.1@d41d8cd9" 247 | ], 248 | "devDependencies": [ 249 | "ocaml@4.6.1000@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd" 250 | ] 251 | }, 252 | "@opam/merlin@opam:3.3.2@7a364181": { 253 | "id": "@opam/merlin@opam:3.3.2@7a364181", 254 | "name": "@opam/merlin", 255 | "version": "opam:3.3.2", 256 | "source": { 257 | "type": "install", 258 | "source": [ 259 | "archive:https://opam.ocaml.org/cache/sha256/1d/1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801#sha256:1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801", 260 | "archive:https://github.com/ocaml/merlin/releases/download/v3.3.2/merlin-v3.3.2.tbz#sha256:1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801" 261 | ], 262 | "opam": { 263 | "name": "merlin", 264 | "version": "3.3.2", 265 | "path": "esy.lock/opam/merlin.3.3.2" 266 | } 267 | }, 268 | "overrides": [], 269 | "dependencies": [ 270 | "ocaml@4.6.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 271 | "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 272 | "@opam/dune@opam:1.11.4@21d66ccd", "@esy-ocaml/substs@0.0.1@d41d8cd9" 273 | ], 274 | "devDependencies": [ 275 | "ocaml@4.6.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 276 | "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 277 | "@opam/dune@opam:1.11.4@21d66ccd" 278 | ] 279 | }, 280 | "@opam/menhir@opam:20190924@004407ff": { 281 | "id": "@opam/menhir@opam:20190924@004407ff", 282 | "name": "@opam/menhir", 283 | "version": "opam:20190924", 284 | "source": { 285 | "type": "install", 286 | "source": [ 287 | "archive:https://opam.ocaml.org/cache/md5/67/677f1997fb73177d5a00fa1b8d61c3ef#md5:677f1997fb73177d5a00fa1b8d61c3ef", 288 | "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20190924/archive.tar.gz#md5:677f1997fb73177d5a00fa1b8d61c3ef" 289 | ], 290 | "opam": { 291 | "name": "menhir", 292 | "version": "20190924", 293 | "path": "esy.lock/opam/menhir.20190924" 294 | } 295 | }, 296 | "overrides": [], 297 | "dependencies": [ 298 | "ocaml@4.6.1000@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 299 | "@opam/ocamlbuild@opam:0.14.0@6ac75d03", 300 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 301 | ], 302 | "devDependencies": [ "ocaml@4.6.1000@d41d8cd9" ] 303 | }, 304 | "@opam/easy-format@opam:1.3.2@0484b3c4": { 305 | "id": "@opam/easy-format@opam:1.3.2@0484b3c4", 306 | "name": "@opam/easy-format", 307 | "version": "opam:1.3.2", 308 | "source": { 309 | "type": "install", 310 | "source": [ 311 | "archive:https://opam.ocaml.org/cache/sha256/34/3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926#sha256:3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926", 312 | "archive:https://github.com/mjambon/easy-format/releases/download/1.3.2/easy-format-1.3.2.tbz#sha256:3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" 313 | ], 314 | "opam": { 315 | "name": "easy-format", 316 | "version": "1.3.2", 317 | "path": "esy.lock/opam/easy-format.1.3.2" 318 | } 319 | }, 320 | "overrides": [], 321 | "dependencies": [ 322 | "ocaml@4.6.1000@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 323 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 324 | ], 325 | "devDependencies": [ 326 | "ocaml@4.6.1000@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd" 327 | ] 328 | }, 329 | "@opam/dune@opam:1.11.4@21d66ccd": { 330 | "id": "@opam/dune@opam:1.11.4@21d66ccd", 331 | "name": "@opam/dune", 332 | "version": "opam:1.11.4", 333 | "source": { 334 | "type": "install", 335 | "source": [ 336 | "archive:https://opam.ocaml.org/cache/sha256/77/77cb5f483221b266ded2b85fc84173ae0089a25134a086be922e82c131456ce6#sha256:77cb5f483221b266ded2b85fc84173ae0089a25134a086be922e82c131456ce6", 337 | "archive:https://github.com/ocaml/dune/releases/download/1.11.4/dune-build-info-1.11.4.tbz#sha256:77cb5f483221b266ded2b85fc84173ae0089a25134a086be922e82c131456ce6" 338 | ], 339 | "opam": { 340 | "name": "dune", 341 | "version": "1.11.4", 342 | "path": "esy.lock/opam/dune.1.11.4" 343 | } 344 | }, 345 | "overrides": [ 346 | { 347 | "opamoverride": 348 | "esy.lock/overrides/opam__s__dune_opam__c__1.11.4_opam_override" 349 | } 350 | ], 351 | "dependencies": [ 352 | "ocaml@4.6.1000@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb", 353 | "@opam/base-threads@opam:base@36803084", 354 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 355 | ], 356 | "devDependencies": [ 357 | "ocaml@4.6.1000@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb", 358 | "@opam/base-threads@opam:base@36803084" 359 | ] 360 | }, 361 | "@opam/cppo@opam:1.6.6@f4f83858": { 362 | "id": "@opam/cppo@opam:1.6.6@f4f83858", 363 | "name": "@opam/cppo", 364 | "version": "opam:1.6.6", 365 | "source": { 366 | "type": "install", 367 | "source": [ 368 | "archive:https://opam.ocaml.org/cache/sha256/e7/e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0#sha256:e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0", 369 | "archive:https://github.com/ocaml-community/cppo/releases/download/v1.6.6/cppo-v1.6.6.tbz#sha256:e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0" 370 | ], 371 | "opam": { 372 | "name": "cppo", 373 | "version": "1.6.6", 374 | "path": "esy.lock/opam/cppo.1.6.6" 375 | } 376 | }, 377 | "overrides": [], 378 | "dependencies": [ 379 | "ocaml@4.6.1000@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 380 | "@opam/base-unix@opam:base@87d0b2eb", 381 | "@esy-ocaml/substs@0.0.1@d41d8cd9" 382 | ], 383 | "devDependencies": [ 384 | "ocaml@4.6.1000@d41d8cd9", "@opam/dune@opam:1.11.4@21d66ccd", 385 | "@opam/base-unix@opam:base@87d0b2eb" 386 | ] 387 | }, 388 | "@opam/conf-m4@opam:1@3b2b148a": { 389 | "id": "@opam/conf-m4@opam:1@3b2b148a", 390 | "name": "@opam/conf-m4", 391 | "version": "opam:1", 392 | "source": { 393 | "type": "install", 394 | "source": [ "no-source:" ], 395 | "opam": { 396 | "name": "conf-m4", 397 | "version": "1", 398 | "path": "esy.lock/opam/conf-m4.1" 399 | } 400 | }, 401 | "overrides": [], 402 | "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 403 | "devDependencies": [] 404 | }, 405 | "@opam/biniou@opam:1.2.1@d7570399": { 406 | "id": "@opam/biniou@opam:1.2.1@d7570399", 407 | "name": "@opam/biniou", 408 | "version": "opam:1.2.1", 409 | "source": { 410 | "type": "install", 411 | "source": [ 412 | "archive:https://opam.ocaml.org/cache/sha256/35/35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335#sha256:35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335", 413 | "archive:https://github.com/mjambon/biniou/releases/download/1.2.1/biniou-1.2.1.tbz#sha256:35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" 414 | ], 415 | "opam": { 416 | "name": "biniou", 417 | "version": "1.2.1", 418 | "path": "esy.lock/opam/biniou.1.2.1" 419 | } 420 | }, 421 | "overrides": [], 422 | "dependencies": [ 423 | "ocaml@4.6.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 424 | "@opam/dune@opam:1.11.4@21d66ccd", "@esy-ocaml/substs@0.0.1@d41d8cd9" 425 | ], 426 | "devDependencies": [ 427 | "ocaml@4.6.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 428 | "@opam/dune@opam:1.11.4@21d66ccd" 429 | ] 430 | }, 431 | "@opam/base-unix@opam:base@87d0b2eb": { 432 | "id": "@opam/base-unix@opam:base@87d0b2eb", 433 | "name": "@opam/base-unix", 434 | "version": "opam:base", 435 | "source": { 436 | "type": "install", 437 | "source": [ "no-source:" ], 438 | "opam": { 439 | "name": "base-unix", 440 | "version": "base", 441 | "path": "esy.lock/opam/base-unix.base" 442 | } 443 | }, 444 | "overrides": [], 445 | "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 446 | "devDependencies": [] 447 | }, 448 | "@opam/base-threads@opam:base@36803084": { 449 | "id": "@opam/base-threads@opam:base@36803084", 450 | "name": "@opam/base-threads", 451 | "version": "opam:base", 452 | "source": { 453 | "type": "install", 454 | "source": [ "no-source:" ], 455 | "opam": { 456 | "name": "base-threads", 457 | "version": "base", 458 | "path": "esy.lock/opam/base-threads.base" 459 | } 460 | }, 461 | "overrides": [], 462 | "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 463 | "devDependencies": [] 464 | }, 465 | "@esy-ocaml/substs@0.0.1@d41d8cd9": { 466 | "id": "@esy-ocaml/substs@0.0.1@d41d8cd9", 467 | "name": "@esy-ocaml/substs", 468 | "version": "0.0.1", 469 | "source": { 470 | "type": "install", 471 | "source": [ 472 | "archive:https://registry.npmjs.org/@esy-ocaml/substs/-/substs-0.0.1.tgz#sha1:59ebdbbaedcda123fc7ed8fb2b302b7d819e9a46" 473 | ] 474 | }, 475 | "overrides": [], 476 | "dependencies": [], 477 | "devDependencies": [] 478 | } 479 | } 480 | } -------------------------------------------------------------------------------- /esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /esy.lock/opam/biniou.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | build: [ 3 | ["dune" "subst"] {pinned} 4 | ["dune" "build" "-p" name "-j" jobs] 5 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 6 | ["dune" "build" "-p" name "@doc"] {with-doc} 7 | ] 8 | maintainer: ["martin@mjambon.com"] 9 | authors: ["Martin Jambon"] 10 | bug-reports: "https://github.com/mjambon/biniou/issues" 11 | homepage: "https://github.com/mjambon/biniou" 12 | doc: "https://mjambon.github.io/biniou/" 13 | license: "BSD-3-Clause" 14 | dev-repo: "git+https://github.com/mjambon/biniou.git" 15 | synopsis: 16 | "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve" 17 | description: """ 18 | 19 | Biniou (pronounced "be new") is a binary data format designed for speed, safety, 20 | ease of use and backward compatibility as protocols evolve. Biniou is vastly 21 | equivalent to JSON in terms of functionality but allows implementations several 22 | times faster (4 times faster than yojson), with 25-35% space savings. 23 | 24 | Biniou data can be decoded into human-readable form without knowledge of type 25 | definitions except for field and variant names which are represented by 31-bit 26 | hashes. A program named bdump is provided for routine visualization of biniou 27 | data files. 28 | 29 | The program atdgen is used to derive OCaml-Biniou serializers and deserializers 30 | from type definitions. 31 | 32 | Biniou format specification: mjambon.github.io/atdgen-doc/biniou-format.txt""" 33 | depends: [ 34 | "easy-format" 35 | "dune" {>= "1.10"} 36 | "ocaml" {>= "4.02.3"} 37 | ] 38 | url { 39 | src: 40 | "https://github.com/mjambon/biniou/releases/download/1.2.1/biniou-1.2.1.tbz" 41 | checksum: [ 42 | "sha256=35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" 43 | "sha512=82670cc77bf3e869ee26e5fbe5a5affa45a22bc8b6c4bd7e85473912780e0111baca59b34a2c14feae3543ce6e239d7fddaeab24b686a65bfe642cdb91d27ebf" 44 | ] 45 | } 46 | -------------------------------------------------------------------------------- /esy.lock/opam/conf-m4.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "tim@gfxmonk.net" 3 | homepage: "http://www.gnu.org/software/m4/m4.html" 4 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 5 | authors: "GNU Project" 6 | license: "GPL-3.0-only" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-family = "debian"} 10 | ["m4"] {os-distribution = "fedora"} 11 | ["m4"] {os-distribution = "rhel"} 12 | ["m4"] {os-distribution = "centos"} 13 | ["m4"] {os-distribution = "alpine"} 14 | ["m4"] {os-distribution = "nixos"} 15 | ["m4"] {os-family = "suse"} 16 | ["m4"] {os-distribution = "ol"} 17 | ["m4"] {os-distribution = "arch"} 18 | ] 19 | synopsis: "Virtual package relying on m4" 20 | description: 21 | "This package can only install if the m4 binary is installed on the system." 22 | flags: conf 23 | -------------------------------------------------------------------------------- /esy.lock/opam/cppo.1.6.6/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: "Martin Jambon" 4 | license: "BSD-3-Clause" 5 | homepage: "http://mjambon.com/cppo.html" 6 | doc: "https://ocaml-community.github.io/cppo/" 7 | bug-reports: "https://github.com/ocaml-community/cppo/issues" 8 | depends: [ 9 | "ocaml" {>= "4.03"} 10 | "dune" {>= "1.0"} 11 | "base-unix" 12 | ] 13 | build: [ 14 | ["dune" "subst"] {pinned} 15 | ["dune" "build" "-p" name "-j" jobs] 16 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 17 | ] 18 | dev-repo: "git+https://github.com/ocaml-community/cppo.git" 19 | synopsis: "Code preprocessor like cpp for OCaml" 20 | description: """ 21 | Cppo is an equivalent of the C preprocessor for OCaml programs. 22 | It allows the definition of simple macros and file inclusion. 23 | 24 | Cppo is: 25 | 26 | * more OCaml-friendly than cpp 27 | * easy to learn without consulting a manual 28 | * reasonably fast 29 | * simple to install and to maintain 30 | """ 31 | url { 32 | src: "https://github.com/ocaml-community/cppo/releases/download/v1.6.6/cppo-v1.6.6.tbz" 33 | checksum: [ 34 | "sha256=e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0" 35 | "sha512=44ecf9d225d9e45490a2feac0bde04865ca398dba6c3579e3370fcd1ea255707b8883590852af8b2df87123801062b9f3acce2455c092deabf431f9c4fb8d8eb" 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /esy.lock/opam/dune.1.11.4/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "Fast, portable and opinionated build system" 3 | description: """ 4 | 5 | dune is a build system that was designed to simplify the release of 6 | Jane Street packages. It reads metadata from "dune" files following a 7 | very simple s-expression syntax. 8 | 9 | dune is fast, it has very low-overhead and support parallel builds on 10 | all platforms. It has no system dependencies, all you need to build 11 | dune and packages using dune is OCaml. You don't need or make or bash 12 | as long as the packages themselves don't use bash explicitly. 13 | 14 | dune supports multi-package development by simply dropping multiple 15 | repositories into the same directory. 16 | 17 | It also supports multi-context builds, such as building against 18 | several opam roots/switches simultaneously. This helps maintaining 19 | packages across several versions of OCaml and gives cross-compilation 20 | for free. 21 | """ 22 | maintainer: ["Jane Street Group, LLC "] 23 | authors: ["Jane Street Group, LLC "] 24 | license: "MIT" 25 | homepage: "https://github.com/ocaml/dune" 26 | doc: "https://dune.readthedocs.io/" 27 | bug-reports: "https://github.com/ocaml/dune/issues" 28 | depends: [ 29 | "ocaml" {>= "4.02"} 30 | "base-unix" 31 | "base-threads" 32 | ] 33 | conflicts: [ 34 | "jbuilder" {!= "transition"} 35 | "odoc" {< "1.3.0"} 36 | "dune-release" {< "1.3.0"} 37 | ] 38 | dev-repo: "git+https://github.com/ocaml/dune.git" 39 | build: [ 40 | # opam 2 sets OPAM_SWITCH_PREFIX, so we don't need a hardcoded path 41 | ["ocaml" "configure.ml" "--libdir" lib] {opam-version < "2"} 42 | ["ocaml" "bootstrap.ml"] 43 | ["./boot.exe" "--release" "--subst"] {pinned} 44 | ["./boot.exe" "--release" "-j" jobs] 45 | ] 46 | url { 47 | src: 48 | "https://github.com/ocaml/dune/releases/download/1.11.4/dune-build-info-1.11.4.tbz" 49 | checksum: [ 50 | "sha256=77cb5f483221b266ded2b85fc84173ae0089a25134a086be922e82c131456ce6" 51 | "sha512=02f00fd872aa49b832fc8c1e928409f23c79ddf84a53009a58875f222cca36fbb92c905e12c539caec9cbad723f195a8aa24218382dca35a903b3f52b11f06f2" 52 | ] 53 | } 54 | -------------------------------------------------------------------------------- /esy.lock/opam/easy-format.1.3.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | build: [ 3 | ["dune" "subst"] {pinned} 4 | ["dune" "build" "-p" name "-j" jobs] 5 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 6 | ["dune" "build" "-p" name "@doc"] {with-doc} 7 | ] 8 | maintainer: ["martin@mjambon.com" "rudi.grinberg@gmail.com"] 9 | authors: ["Martin Jambon"] 10 | bug-reports: "https://github.com/mjambon/easy-format/issues" 11 | homepage: "https://github.com/mjambon/easy-format" 12 | doc: "https://mjambon.github.io/easy-format/" 13 | license: "BSD-3-Clause" 14 | dev-repo: "git+https://github.com/mjambon/easy-format.git" 15 | synopsis: 16 | "High-level and functional interface to the Format module of the OCaml standard library" 17 | description: """ 18 | 19 | This module offers a high-level and functional interface to the Format module of 20 | the OCaml standard library. It is a pretty-printing facility, i.e. it takes as 21 | input some code represented as a tree and formats this code into the most 22 | visually satisfying result, breaking and indenting lines of code where 23 | appropriate. 24 | 25 | Input data must be first modelled and converted into a tree using 3 kinds of 26 | nodes: 27 | 28 | * atoms 29 | * lists 30 | * labelled nodes 31 | 32 | Atoms represent any text that is guaranteed to be printed as-is. Lists can model 33 | any sequence of items such as arrays of data or lists of definitions that are 34 | labelled with something like "int main", "let x =" or "x:".""" 35 | depends: [ 36 | "dune" {>= "1.10"} 37 | "ocaml" {>= "4.02.3"} 38 | ] 39 | url { 40 | src: 41 | "https://github.com/mjambon/easy-format/releases/download/1.3.2/easy-format-1.3.2.tbz" 42 | checksum: [ 43 | "sha256=3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" 44 | "sha512=e39377a2ff020ceb9ac29e8515a89d9bdbc91dfcfa871c4e3baafa56753fac2896768e5d9822a050dc1e2ade43c8967afb69391a386c0a8ecd4e1f774e236135" 45 | ] 46 | } 47 | -------------------------------------------------------------------------------- /esy.lock/opam/menhir.20190924/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "francois.pottier@inria.fr" 3 | authors: [ 4 | "François Pottier " 5 | "Yann Régis-Gianas " 6 | ] 7 | homepage: "http://gitlab.inria.fr/fpottier/menhir" 8 | dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" 9 | bug-reports: "menhir@inria.fr" 10 | build: [ 11 | [make "-f" "Makefile" "PREFIX=%{prefix}%" "USE_OCAMLFIND=true" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 12 | ] 13 | install: [ 14 | [make "-f" "Makefile" "install" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 15 | ] 16 | depends: [ 17 | "ocaml" {>= "4.02"} 18 | "ocamlfind" {build} 19 | "ocamlbuild" {build} 20 | ] 21 | synopsis: "An LR(1) parser generator" 22 | url { 23 | src: 24 | "https://gitlab.inria.fr/fpottier/menhir/repository/20190924/archive.tar.gz" 25 | checksum: [ 26 | "md5=677f1997fb73177d5a00fa1b8d61c3ef" 27 | "sha512=ea8a9a6d773529cf6ac05e4c6c4532770fbb8e574c9b646efcefe90d9f24544741e3e8cfd94c8afea0447e34059a8c79c2829b46764ce3a3d6dcb3e7f75980fc" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /esy.lock/opam/merlin-extend.0.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Frederic Bour " 3 | authors: "Frederic Bour " 4 | homepage: "https://github.com/let-def/merlin-extend" 5 | bug-reports: "https://github.com/let-def/merlin-extend" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/let-def/merlin-extend.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "dune" {>= "1.0"} 14 | "cppo" {build} 15 | "ocaml" {>= "4.02.3"} 16 | ] 17 | synopsis: "A protocol to provide custom frontend to Merlin" 18 | description: """ 19 | This protocol allows to replace the OCaml frontend of Merlin. 20 | It extends what used to be done with the `-pp' flag to handle a few more cases.""" 21 | doc: "https://let-def.github.io/merlin-extend" 22 | url { 23 | src: 24 | "https://github.com/let-def/merlin-extend/releases/download/v0.5/merlin-extend-v0.5.tbz" 25 | checksum: [ 26 | "sha256=ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227" 27 | "sha512=55c5a3637337abb8ca8db679128a81ca8ccce567bc214d55b2e6444dc0e905b74c64d629bdea2457d0fe4be5306414feefcdbc4d4761fdafd59aa107550936b6" 28 | ] 29 | } 30 | -------------------------------------------------------------------------------- /esy.lock/opam/merlin.3.3.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "merlin" 3 | maintainer: "defree@gmail.com" 4 | authors: "The Merlin team" 5 | homepage: "https://github.com/ocaml/merlin" 6 | bug-reports: "https://github.com/ocaml/merlin/issues" 7 | dev-repo: "git+https://github.com/ocaml/merlin.git" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | depends: [ 13 | "ocaml" {>= "4.02.1" & < "4.09"} 14 | "dune" {>= "1.8.0"} 15 | "ocamlfind" {>= "1.5.2"} 16 | "yojson" 17 | "mdx" {with-test & >= "1.3.0"} 18 | ] 19 | synopsis: 20 | "Editor helper, provides completion, typing and source browsing in Vim and Emacs" 21 | description: 22 | "Merlin is an assistant for editing OCaml code. It aims to provide the features available in modern IDEs: error reporting, auto completion, source browsing and much more." 23 | post-messages: [ 24 | "merlin installed. 25 | 26 | Quick setup for VIM 27 | ------------------- 28 | Append this to your .vimrc to add merlin to vim's runtime-path: 29 | let g:opamshare = substitute(system('opam config var share'),'\\n$','','''') 30 | execute \"set rtp+=\" . g:opamshare . \"/merlin/vim\" 31 | 32 | Also run the following line in vim to index the documentation: 33 | :execute \"helptags \" . g:opamshare . \"/merlin/vim/doc\" 34 | 35 | Quick setup for EMACS 36 | ------------------- 37 | Add opam emacs directory to your load-path by appending this to your .emacs: 38 | (let ((opam-share (ignore-errors (car (process-lines \"opam\" \"config\" \"var\" \"share\"))))) 39 | (when (and opam-share (file-directory-p opam-share)) 40 | ;; Register Merlin 41 | (add-to-list 'load-path (expand-file-name \"emacs/site-lisp\" opam-share)) 42 | (autoload 'merlin-mode \"merlin\" nil t nil) 43 | ;; Automatically start it in OCaml buffers 44 | (add-hook 'tuareg-mode-hook 'merlin-mode t) 45 | (add-hook 'caml-mode-hook 'merlin-mode t) 46 | ;; Use opam switch to lookup ocamlmerlin binary 47 | (setq merlin-command 'opam))) 48 | 49 | Take a look at https://github.com/ocaml/merlin for more information 50 | 51 | Quick setup with opam-user-setup 52 | -------------------------------- 53 | 54 | Opam-user-setup support Merlin. 55 | 56 | $ opam user-setup install 57 | 58 | should take care of basic setup. 59 | See https://github.com/OCamlPro/opam-user-setup 60 | " 61 | {success & !user-setup:installed} 62 | ] 63 | url { 64 | src: 65 | "https://github.com/ocaml/merlin/releases/download/v3.3.2/merlin-v3.3.2.tbz" 66 | checksum: [ 67 | "sha256=1d1c71e663b1e58acf19069cebd1e8d18f7dbe513c6065347d162cdd2c2de801" 68 | "sha512=3ae021669808a40b4449f1cbdaca40b605ea5779a6204addd8b0ee4af9f14f528d55ca43a8dd3c7d547fb8e4cb256c09a9151d5559ef24dad83b5ab05aa146a2" 69 | ] 70 | } 71 | -------------------------------------------------------------------------------- /esy.lock/opam/ocaml-migrate-parsetree.1.4.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "frederic.bour@lakaban.net" 3 | authors: [ 4 | "Frédéric Bour " 5 | "Jérémie Dimino " 6 | ] 7 | license: "LGPL-2.1-only with OCaml-LGPL-linking-exception" 8 | homepage: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree" 9 | bug-reports: "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/issues" 10 | dev-repo: "git+https://github.com/ocaml-ppx/ocaml-migrate-parsetree.git" 11 | doc: "https://ocaml-ppx.github.io/ocaml-migrate-parsetree/" 12 | tags: [ "syntax" "org:ocamllabs" ] 13 | build: [ 14 | ["dune" "build" "-p" name "-j" jobs] 15 | ] 16 | depends: [ 17 | "result" 18 | "ppx_derivers" 19 | "dune" {>= "1.9.0"} 20 | "ocaml" {>= "4.02.3"} 21 | ] 22 | synopsis: "Convert OCaml parsetrees between different versions" 23 | description: """ 24 | Convert OCaml parsetrees between different versions 25 | 26 | This library converts parsetrees, outcometree and ast mappers between 27 | different OCaml versions. High-level functions help making PPX 28 | rewriters independent of a compiler version. 29 | """ 30 | url { 31 | src: 32 | "https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.4.0/ocaml-migrate-parsetree-v1.4.0.tbz" 33 | checksum: [ 34 | "sha256=231fbdc205187b3ee266b535d9cfe44b599067b2f6e97883c782ea7bb577d3b8" 35 | "sha512=61ee91d2d146cc2d2ff2d5dc4ef5dea4dc4d3c8dbd8b4c9586d64b6ad7302327ab35547aa0a5b0103c3f07b66b13d416a1bee6d4d117293cd3cabe44113ec6d4" 36 | ] 37 | } 38 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlbuild.0.14.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Gabriel Scherer " 3 | authors: ["Nicolas Pouillard" "Berke Durak"] 4 | homepage: "https://github.com/ocaml/ocamlbuild/" 5 | bug-reports: "https://github.com/ocaml/ocamlbuild/issues" 6 | license: "LGPL-2.1-only with OCaml-LGPL-linking-exception" 7 | doc: "https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc" 8 | dev-repo: "git+https://github.com/ocaml/ocamlbuild.git" 9 | build: [ 10 | [ 11 | make 12 | "-f" 13 | "configure.make" 14 | "all" 15 | "OCAMLBUILD_PREFIX=%{prefix}%" 16 | "OCAMLBUILD_BINDIR=%{bin}%" 17 | "OCAMLBUILD_LIBDIR=%{lib}%" 18 | "OCAMLBUILD_MANDIR=%{man}%" 19 | "OCAML_NATIVE=%{ocaml:native}%" 20 | "OCAML_NATIVE_TOOLS=%{ocaml:native}%" 21 | ] 22 | [make "check-if-preinstalled" "all" "opam-install"] 23 | ] 24 | conflicts: [ 25 | "base-ocamlbuild" 26 | "ocamlfind" {< "1.6.2"} 27 | ] 28 | synopsis: 29 | "OCamlbuild is a build system with builtin rules to easily build most OCaml projects." 30 | depends: [ 31 | "ocaml" {>= "4.03"} 32 | ] 33 | url { 34 | src: "https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz" 35 | checksum: "sha256=87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78" 36 | } 37 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /esy.lock/opam/ocamlfind.1.8.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | synopsis: "A library manager for OCaml" 3 | maintainer: "Thomas Gazagnaire " 4 | authors: "Gerd Stolpmann " 5 | homepage: "http://projects.camlcity.org/projects/findlib.html" 6 | bug-reports: "https://gitlab.camlcity.org/gerd/lib-findlib/issues" 7 | dev-repo: "git+https://gitlab.camlcity.org/gerd/lib-findlib.git" 8 | description: """ 9 | Findlib is a library manager for OCaml. It provides a convention how 10 | to store libraries, and a file format ("META") to describe the 11 | properties of libraries. There is also a tool (ocamlfind) for 12 | interpreting the META files, so that it is very easy to use libraries 13 | in programs and scripts. 14 | """ 15 | build: [ 16 | [ 17 | "./configure" 18 | "-bindir" 19 | bin 20 | "-sitelib" 21 | lib 22 | "-mandir" 23 | man 24 | "-config" 25 | "%{lib}%/findlib.conf" 26 | "-no-custom" 27 | "-no-camlp4" {!ocaml:preinstalled & ocaml:version >= "4.02.0"} 28 | "-no-topfind" {ocaml:preinstalled} 29 | ] 30 | [make "all"] 31 | [make "opt"] {ocaml:native} 32 | ] 33 | install: [ 34 | [make "install"] 35 | ["install" "-m" "0755" "ocaml-stub" "%{bin}%/ocaml"] {ocaml:preinstalled} 36 | ] 37 | depends: [ 38 | "ocaml" {>= "4.00.0"} 39 | "conf-m4" {build} 40 | ] 41 | extra-files: [ 42 | ["ocamlfind.install" "md5=06f2c282ab52d93aa6adeeadd82a2543"] 43 | ["ocaml-stub" "md5=181f259c9e0bad9ef523e7d4abfdf87a"] 44 | ] 45 | url { 46 | src: "http://download.camlcity.org/download/findlib-1.8.1.tar.gz" 47 | checksum: "md5=18ca650982c15536616dea0e422cbd8c" 48 | mirrors: "http://download2.camlcity.org/download/findlib-1.8.1.tar.gz" 49 | } 50 | depopts: ["graphics"] 51 | -------------------------------------------------------------------------------- /esy.lock/opam/ppx_derivers.1.2.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | license: "BSD-3-Clause" 5 | homepage: "https://github.com/ocaml-ppx/ppx_derivers" 6 | bug-reports: "https://github.com/ocaml-ppx/ppx_derivers/issues" 7 | dev-repo: "git://github.com/ocaml-ppx/ppx_derivers.git" 8 | build: [ 9 | ["dune" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" 13 | "dune" 14 | ] 15 | synopsis: "Shared [@@deriving] plugin registry" 16 | description: """ 17 | Ppx_derivers is a tiny package whose sole purpose is to allow 18 | ppx_deriving and ppx_type_conv to inter-operate gracefully when linked 19 | as part of the same ocaml-migrate-parsetree driver.""" 20 | url { 21 | src: "https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz" 22 | checksum: "md5=5dc2bf130c1db3c731fe0fffc5648b41" 23 | } 24 | -------------------------------------------------------------------------------- /esy.lock/opam/reason.3.5.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Jordan Walke " 3 | authors: [ "Jordan Walke " ] 4 | license: "MIT" 5 | homepage: "https://github.com/facebook/reason" 6 | doc: "http://reasonml.github.io/" 7 | bug-reports: "https://github.com/facebook/reason/issues" 8 | dev-repo: "git://github.com/facebook/reason.git" 9 | tags: [ "syntax" ] 10 | build: [ 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" {>= "4.02" & < "4.10"} 16 | "dune" {>= "1.4"} 17 | "ocamlfind" {build} 18 | "menhir" {>= "20170418"} 19 | "merlin-extend" {>= "0.4"} 20 | "result" 21 | "ocaml-migrate-parsetree" 22 | ] 23 | synopsis: "Reason: Syntax & Toolchain for OCaml" 24 | description: """ 25 | Reason gives OCaml a new syntax that is remniscient of languages like 26 | JavaScript. It's also the umbrella project for a set of tools for the OCaml & 27 | JavaScript ecosystem.""" 28 | url { 29 | src: "https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz" 30 | checksum: "md5=66c54296009e0f6cbc8e93aa01105cbb" 31 | } 32 | -------------------------------------------------------------------------------- /esy.lock/opam/result.1.4/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD-3-Clause" 8 | build: [["dune" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "dune" {>= "1.0"} 12 | ] 13 | synopsis: "Compatibility Result module" 14 | description: """ 15 | Projects that want to use the new result type defined in OCaml >= 4.03 16 | while staying compatible with older version of OCaml should use the 17 | Result module defined in this library.""" 18 | url { 19 | src: 20 | "https://github.com/janestreet/result/archive/1.4.tar.gz" 21 | checksum: "md5=d3162dbc501a2af65c8c71e0866541da" 22 | } 23 | -------------------------------------------------------------------------------- /esy.lock/opam/yojson.1.7.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | homepage: "https://github.com/ocaml-community/yojson" 5 | bug-reports: "https://github.com/ocaml-community/yojson/issues" 6 | dev-repo: "git+https://github.com/ocaml-community/yojson.git" 7 | doc: "https://ocaml-community.github.io/yojson/" 8 | build: [ 9 | ["dune" "subst"] {pinned} 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ] 12 | run-test: [["dune" "runtest" "-p" name "-j" jobs]] 13 | depends: [ 14 | "ocaml" {>= "4.02.3"} 15 | "dune" 16 | "cppo" {build} 17 | "easy-format" 18 | "biniou" {>= "1.2.0"} 19 | "alcotest" {with-test & >= "0.8.5"} 20 | ] 21 | synopsis: 22 | "Yojson is an optimized parsing and printing library for the JSON format" 23 | description: """ 24 | Yojson is an optimized parsing and printing library for the JSON format. 25 | 26 | It addresses a few shortcomings of json-wheel including 2x speedup, 27 | polymorphic variants and optional syntax for tuples and variants. 28 | 29 | ydump is a pretty-printing command-line program provided with the 30 | yojson package. 31 | 32 | The program atdgen can be used to derive OCaml-JSON serializers and 33 | deserializers from type definitions.""" 34 | url { 35 | src: 36 | "https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz" 37 | checksum: "md5=b89d39ca3f8c532abe5f547ad3b8f84d" 38 | } 39 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__dune_opam__c__1.11.4_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "ocaml", 5 | "bootstrap.ml" 6 | ], 7 | [ 8 | "./boot.exe", 9 | "--release", 10 | "-j", 11 | "4" 12 | ] 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/files/ocamlbuild-0.14.0.patch: -------------------------------------------------------------------------------- 1 | --- ./Makefile 2 | +++ ./Makefile 3 | @@ -213,7 +213,7 @@ 4 | rm -f man/ocamlbuild.1 5 | 6 | man/options_man.byte: src/ocamlbuild_pack.cmo 7 | - $(OCAMLC) $^ -I src man/options_man.ml -o man/options_man.byte 8 | + $(OCAMLC) -I +unix unix.cma $^ -I src man/options_man.ml -o man/options_man.byte 9 | 10 | clean:: 11 | rm -f man/options_man.cm* 12 | --- ./src/command.ml 13 | +++ ./src/command.ml 14 | @@ -148,9 +148,10 @@ 15 | let self = string_of_command_spec_with_calls call_with_tags call_with_target resolve_virtuals in 16 | let b = Buffer.create 256 in 17 | (* The best way to prevent bash from switching to its windows-style 18 | - * quote-handling is to prepend an empty string before the command name. *) 19 | + * quote-handling is to prepend an empty string before the command name. 20 | + * space seems to work, too - and the ouput is nicer *) 21 | if Sys.os_type = "Win32" then 22 | - Buffer.add_string b "''"; 23 | + Buffer.add_char b ' '; 24 | let first = ref true in 25 | let put_space () = 26 | if !first then 27 | @@ -260,7 +261,7 @@ 28 | 29 | let execute_many ?(quiet=false) ?(pretend=false) cmds = 30 | add_parallel_stat (List.length cmds); 31 | - let degraded = !*My_unix.is_degraded || Sys.os_type = "Win32" in 32 | + let degraded = !*My_unix.is_degraded in 33 | let jobs = !jobs in 34 | if jobs < 0 then invalid_arg "jobs < 0"; 35 | let max_jobs = if jobs = 0 then None else Some jobs in 36 | --- ./src/findlib.ml 37 | +++ ./src/findlib.ml 38 | @@ -66,9 +66,6 @@ 39 | (fun command -> lexer & Lexing.from_string & run_and_read command) 40 | command 41 | 42 | -let run_and_read command = 43 | - Printf.ksprintf run_and_read command 44 | - 45 | let rec query name = 46 | try 47 | Hashtbl.find packages name 48 | @@ -135,7 +132,8 @@ 49 | with Not_found -> s 50 | 51 | let list () = 52 | - List.map before_space (split_nl & run_and_read "%s list" ocamlfind) 53 | + let cmd = Shell.quote_filename_if_needed ocamlfind ^ " list" in 54 | + List.map before_space (split_nl & run_and_read cmd) 55 | 56 | (* The closure algorithm is easy because the dependencies are already closed 57 | and sorted for each package. We only have to make the union. We could also 58 | --- ./src/main.ml 59 | +++ ./src/main.ml 60 | @@ -162,6 +162,9 @@ 61 | Tags.mem "traverse" tags 62 | || List.exists (Pathname.is_prefix path_name) !Options.include_dirs 63 | || List.exists (Pathname.is_prefix path_name) target_dirs) 64 | + && ((* beware: !Options.build_dir is an absolute directory *) 65 | + Pathname.normalize !Options.build_dir 66 | + <> Pathname.normalize (Pathname.pwd/path_name)) 67 | end 68 | end 69 | end 70 | --- ./src/my_std.ml 71 | +++ ./src/my_std.ml 72 | @@ -271,13 +271,107 @@ 73 | try Array.iter (fun x -> if x = basename then raise Exit) a; false 74 | with Exit -> true 75 | 76 | +let command_plain = function 77 | +| [| |] -> 0 78 | +| margv -> 79 | + let rec waitpid a b = 80 | + match Unix.waitpid a b with 81 | + | exception (Unix.Unix_error(Unix.EINTR,_,_)) -> waitpid a b 82 | + | x -> x 83 | + in 84 | + let pid = Unix.(create_process margv.(0) margv stdin stdout stderr) in 85 | + let pid', process_status = waitpid [] pid in 86 | + assert (pid = pid'); 87 | + match process_status with 88 | + | Unix.WEXITED n -> n 89 | + | Unix.WSIGNALED _ -> 2 (* like OCaml's uncaught exceptions *) 90 | + | Unix.WSTOPPED _ -> 127 91 | + 92 | +(* can't use Lexers because of circular dependency *) 93 | +let split_path_win str = 94 | + let rec aux pos = 95 | + try 96 | + let i = String.index_from str pos ';' in 97 | + let len = i - pos in 98 | + if len = 0 then 99 | + aux (succ i) 100 | + else 101 | + String.sub str pos (i - pos) :: aux (succ i) 102 | + with Not_found | Invalid_argument _ -> 103 | + let len = String.length str - pos in 104 | + if len = 0 then [] else [String.sub str pos len] 105 | + in 106 | + aux 0 107 | + 108 | +let windows_shell = lazy begin 109 | + let rec iter = function 110 | + | [] -> [| "bash.exe" ; "--norc" ; "--noprofile" |] 111 | + | hd::tl -> 112 | + let dash = Filename.concat hd "dash.exe" in 113 | + if Sys.file_exists dash then [|dash|] else 114 | + let bash = Filename.concat hd "bash.exe" in 115 | + if Sys.file_exists bash = false then iter tl else 116 | + (* if sh.exe and bash.exe exist in the same dir, choose sh.exe *) 117 | + let sh = Filename.concat hd "sh.exe" in 118 | + if Sys.file_exists sh then [|sh|] else [|bash ; "--norc" ; "--noprofile"|] 119 | + in 120 | + split_path_win (try Sys.getenv "PATH" with Not_found -> "") |> iter 121 | +end 122 | + 123 | +let prep_windows_cmd cmd = 124 | + (* workaround known ocaml bug, remove later *) 125 | + if String.contains cmd '\t' && String.contains cmd ' ' = false then 126 | + " " ^ cmd 127 | + else 128 | + cmd 129 | + 130 | +let run_with_shell = function 131 | +| "" -> 0 132 | +| cmd -> 133 | + let cmd = prep_windows_cmd cmd in 134 | + let shell = Lazy.force windows_shell in 135 | + let qlen = Filename.quote cmd |> String.length in 136 | + (* old versions of dash had problems with bs *) 137 | + try 138 | + if qlen < 7_900 then 139 | + command_plain (Array.append shell [| "-ec" ; cmd |]) 140 | + else begin 141 | + (* it can still work, if the called command is a cygwin tool *) 142 | + let ch_closed = ref false in 143 | + let file_deleted = ref false in 144 | + let fln,ch = 145 | + Filename.open_temp_file 146 | + ~mode:[Open_binary] 147 | + "ocamlbuildtmp" 148 | + ".sh" 149 | + in 150 | + try 151 | + let f_slash = String.map ( fun x -> if x = '\\' then '/' else x ) fln in 152 | + output_string ch cmd; 153 | + ch_closed:= true; 154 | + close_out ch; 155 | + let ret = command_plain (Array.append shell [| "-e" ; f_slash |]) in 156 | + file_deleted:= true; 157 | + Sys.remove fln; 158 | + ret 159 | + with 160 | + | x -> 161 | + if !ch_closed = false then 162 | + close_out_noerr ch; 163 | + if !file_deleted = false then 164 | + (try Sys.remove fln with _ -> ()); 165 | + raise x 166 | + end 167 | + with 168 | + | (Unix.Unix_error _) as x -> 169 | + (* Sys.command doesn't raise an exception, so run_with_shell also won't 170 | + raise *) 171 | + Printexc.to_string x ^ ":" ^ cmd |> prerr_endline; 172 | + 1 173 | + 174 | let sys_command = 175 | - match Sys.os_type with 176 | - | "Win32" -> fun cmd -> 177 | - if cmd = "" then 0 else 178 | - let cmd = "bash --norc -c " ^ Filename.quote cmd in 179 | - Sys.command cmd 180 | - | _ -> fun cmd -> if cmd = "" then 0 else Sys.command cmd 181 | + if Sys.win32 then run_with_shell 182 | + else fun cmd -> if cmd = "" then 0 else Sys.command cmd 183 | 184 | (* FIXME warning fix and use Filename.concat *) 185 | let filename_concat x y = 186 | --- ./src/my_std.mli 187 | +++ ./src/my_std.mli 188 | @@ -69,3 +69,6 @@ 189 | 190 | val split_ocaml_version : (int * int * int * string) option 191 | (** (major, minor, patchlevel, rest) *) 192 | + 193 | +val windows_shell : string array Lazy.t 194 | +val prep_windows_cmd : string -> string 195 | --- ./src/ocamlbuild_executor.ml 196 | +++ ./src/ocamlbuild_executor.ml 197 | @@ -34,6 +34,8 @@ 198 | job_stdin : out_channel; 199 | job_stderr : in_channel; 200 | job_buffer : Buffer.t; 201 | + job_pid : int; 202 | + job_tmp_file: string option; 203 | mutable job_dying : bool; 204 | };; 205 | 206 | @@ -76,6 +78,61 @@ 207 | in 208 | loop 0 209 | ;; 210 | + 211 | +let open_process_full_win cmd env = 212 | + let (in_read, in_write) = Unix.pipe () in 213 | + let (out_read, out_write) = Unix.pipe () in 214 | + let (err_read, err_write) = Unix.pipe () in 215 | + Unix.set_close_on_exec in_read; 216 | + Unix.set_close_on_exec out_write; 217 | + Unix.set_close_on_exec err_read; 218 | + let inchan = Unix.in_channel_of_descr in_read in 219 | + let outchan = Unix.out_channel_of_descr out_write in 220 | + let errchan = Unix.in_channel_of_descr err_read in 221 | + let shell = Lazy.force Ocamlbuild_pack.My_std.windows_shell in 222 | + let test_cmd = 223 | + String.concat " " (List.map Filename.quote (Array.to_list shell)) ^ 224 | + "-ec " ^ 225 | + Filename.quote (Ocamlbuild_pack.My_std.prep_windows_cmd cmd) in 226 | + let argv,tmp_file = 227 | + if String.length test_cmd < 7_900 then 228 | + Array.append 229 | + shell 230 | + [| "-ec" ; Ocamlbuild_pack.My_std.prep_windows_cmd cmd |],None 231 | + else 232 | + let fln,ch = Filename.open_temp_file ~mode:[Open_binary] "ocamlbuild" ".sh" in 233 | + output_string ch (Ocamlbuild_pack.My_std.prep_windows_cmd cmd); 234 | + close_out ch; 235 | + let fln' = String.map (function '\\' -> '/' | c -> c) fln in 236 | + Array.append 237 | + shell 238 | + [| "-c" ; fln' |], Some fln in 239 | + let pid = 240 | + Unix.create_process_env argv.(0) argv env out_read in_write err_write in 241 | + Unix.close out_read; 242 | + Unix.close in_write; 243 | + Unix.close err_write; 244 | + (pid, inchan, outchan, errchan,tmp_file) 245 | + 246 | +let close_process_full_win (pid,inchan, outchan, errchan, tmp_file) = 247 | + let delete tmp_file = 248 | + match tmp_file with 249 | + | None -> () 250 | + | Some x -> try Sys.remove x with Sys_error _ -> () in 251 | + let tmp_file_deleted = ref false in 252 | + try 253 | + close_in inchan; 254 | + close_out outchan; 255 | + close_in errchan; 256 | + let res = snd(Unix.waitpid [] pid) in 257 | + tmp_file_deleted := true; 258 | + delete tmp_file; 259 | + res 260 | + with 261 | + | x when tmp_file <> None && !tmp_file_deleted = false -> 262 | + delete tmp_file; 263 | + raise x 264 | + 265 | (* ***) 266 | (*** execute *) 267 | (* XXX: Add test for non reentrancy *) 268 | @@ -130,10 +187,16 @@ 269 | (*** add_job *) 270 | let add_job cmd rest result id = 271 | (*display begin fun oc -> fp oc "Job %a is %s\n%!" print_job_id id cmd; end;*) 272 | - let (stdout', stdin', stderr') = open_process_full cmd env in 273 | + let (pid,stdout', stdin', stderr', tmp_file) = 274 | + if Sys.win32 then open_process_full_win cmd env else 275 | + let a,b,c = open_process_full cmd env in 276 | + -1,a,b,c,None 277 | + in 278 | incr jobs_active; 279 | - set_nonblock (doi stdout'); 280 | - set_nonblock (doi stderr'); 281 | + if not Sys.win32 then ( 282 | + set_nonblock (doi stdout'); 283 | + set_nonblock (doi stderr'); 284 | + ); 285 | let job = 286 | { job_id = id; 287 | job_command = cmd; 288 | @@ -143,7 +206,9 @@ 289 | job_stdin = stdin'; 290 | job_stderr = stderr'; 291 | job_buffer = Buffer.create 1024; 292 | - job_dying = false } 293 | + job_dying = false; 294 | + job_tmp_file = tmp_file; 295 | + job_pid = pid } 296 | in 297 | outputs := FDM.add (doi stdout') job (FDM.add (doi stderr') job !outputs); 298 | jobs := JS.add job !jobs; 299 | @@ -199,6 +264,7 @@ 300 | try 301 | read fd u 0 (Bytes.length u) 302 | with 303 | + | Unix.Unix_error(Unix.EPIPE,_,_) when Sys.win32 -> 0 304 | | Unix.Unix_error(e,_,_) -> 305 | let msg = error_message e in 306 | display (fun oc -> fp oc 307 | @@ -241,14 +307,19 @@ 308 | decr jobs_active; 309 | 310 | (* PR#5371: we would get EAGAIN below otherwise *) 311 | - clear_nonblock (doi job.job_stdout); 312 | - clear_nonblock (doi job.job_stderr); 313 | - 314 | + if not Sys.win32 then ( 315 | + clear_nonblock (doi job.job_stdout); 316 | + clear_nonblock (doi job.job_stderr); 317 | + ); 318 | do_read ~loop:true (doi job.job_stdout) job; 319 | do_read ~loop:true (doi job.job_stderr) job; 320 | outputs := FDM.remove (doi job.job_stdout) (FDM.remove (doi job.job_stderr) !outputs); 321 | jobs := JS.remove job !jobs; 322 | - let status = close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in 323 | + let status = 324 | + if Sys.win32 then 325 | + close_process_full_win (job.job_pid, job.job_stdout, job.job_stdin, job.job_stderr, job.job_tmp_file) 326 | + else 327 | + close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in 328 | 329 | let shown = ref false in 330 | 331 | --- ./src/ocamlbuild_unix_plugin.ml 332 | +++ ./src/ocamlbuild_unix_plugin.ml 333 | @@ -48,12 +48,22 @@ 334 | end 335 | 336 | let run_and_open s kont = 337 | + let s_orig = s in 338 | + let s = 339 | + (* Be consistent! My_unix.run_and_open uses My_std.sys_command and 340 | + sys_command uses bash. *) 341 | + if Sys.win32 = false then s else 342 | + let l = match Lazy.force My_std.windows_shell |> Array.to_list with 343 | + | hd::tl -> (Filename.quote hd)::tl 344 | + | _ -> assert false in 345 | + "\"" ^ (String.concat " " l) ^ " -ec " ^ Filename.quote (" " ^ s) ^ "\"" 346 | + in 347 | let ic = Unix.open_process_in s in 348 | let close () = 349 | match Unix.close_process_in ic with 350 | | Unix.WEXITED 0 -> () 351 | | Unix.WEXITED _ | Unix.WSIGNALED _ | Unix.WSTOPPED _ -> 352 | - failwith (Printf.sprintf "Error while running: %s" s) in 353 | + failwith (Printf.sprintf "Error while running: %s" s_orig) in 354 | let res = try 355 | kont ic 356 | with e -> (close (); raise e) 357 | --- ./src/options.ml 358 | +++ ./src/options.ml 359 | @@ -174,11 +174,24 @@ 360 | build_dir := Filename.concat (Sys.getcwd ()) s 361 | else 362 | build_dir := s 363 | + 364 | +let slashify = 365 | + if Sys.win32 then fun p -> String.map (function '\\' -> '/' | x -> x) p 366 | + else fun p ->p 367 | + 368 | +let sb () = 369 | + match Sys.os_type with 370 | + | "Win32" -> 371 | + (try set_binary_mode_out stdout true with _ -> ()); 372 | + | _ -> () 373 | + 374 | + 375 | let spec = ref ( 376 | let print_version () = 377 | + sb (); 378 | Printf.printf "ocamlbuild %s\n%!" Ocamlbuild_config.version; raise Exit_OK 379 | in 380 | - let print_vnum () = print_endline Ocamlbuild_config.version; raise Exit_OK in 381 | + let print_vnum () = sb (); print_endline Ocamlbuild_config.version; raise Exit_OK in 382 | Arg.align 383 | [ 384 | "-version", Unit print_version , " Display the version"; 385 | @@ -257,8 +270,8 @@ 386 | "-build-dir", String set_build_dir, " Set build directory (implies no-links)"; 387 | "-install-lib-dir", Set_string Ocamlbuild_where.libdir, " Set the install library directory"; 388 | "-install-bin-dir", Set_string Ocamlbuild_where.bindir, " Set the install binary directory"; 389 | - "-where", Unit (fun () -> print_endline !Ocamlbuild_where.libdir; raise Exit_OK), " Display the install library directory"; 390 | - "-which", String (fun cmd -> print_endline (find_tool cmd); raise Exit_OK), " Display path to the tool command"; 391 | + "-where", Unit (fun () -> sb (); print_endline (slashify !Ocamlbuild_where.libdir); raise Exit_OK), " Display the install library directory"; 392 | + "-which", String (fun cmd -> sb (); print_endline (slashify (find_tool cmd)); raise Exit_OK), " Display path to the tool command"; 393 | "-ocamlc", set_cmd ocamlc, " Set the OCaml bytecode compiler"; 394 | "-plugin-ocamlc", set_cmd plugin_ocamlc, " Set the OCaml bytecode compiler \ 395 | used when building myocamlbuild.ml (only)"; 396 | --- ./src/pathname.ml 397 | +++ ./src/pathname.ml 398 | @@ -84,6 +84,26 @@ 399 | | x :: xs -> x :: normalize_list xs 400 | 401 | let normalize x = 402 | + let x = 403 | + if Sys.win32 = false then 404 | + x 405 | + else 406 | + let len = String.length x in 407 | + let b = Bytes.create len in 408 | + for i = 0 to pred len do 409 | + match x.[i] with 410 | + | '\\' -> Bytes.set b i '/' 411 | + | c -> Bytes.set b i c 412 | + done; 413 | + if len > 1 then ( 414 | + let c1 = Bytes.get b 0 in 415 | + let c2 = Bytes.get b 1 in 416 | + if c2 = ':' && c1 >= 'a' && c1 <= 'z' && 417 | + ( len = 2 || Bytes.get b 2 = '/') then 418 | + Bytes.set b 0 (Char.uppercase_ascii c1) 419 | + ); 420 | + Bytes.unsafe_to_string b 421 | + in 422 | if Glob.eval not_normal_form_re x then 423 | let root, paths = split x in 424 | join root (normalize_list paths) 425 | --- ./src/shell.ml 426 | +++ ./src/shell.ml 427 | @@ -24,12 +24,26 @@ 428 | | 'a'..'z' | 'A'..'Z' | '0'..'9' | '.' | '-' | '/' | '_' | ':' | '@' | '+' | ',' -> loop (pos + 1) 429 | | _ -> false in 430 | loop 0 431 | + 432 | +let generic_quote quotequote s = 433 | + let l = String.length s in 434 | + let b = Buffer.create (l + 20) in 435 | + Buffer.add_char b '\''; 436 | + for i = 0 to l - 1 do 437 | + if s.[i] = '\'' 438 | + then Buffer.add_string b quotequote 439 | + else Buffer.add_char b s.[i] 440 | + done; 441 | + Buffer.add_char b '\''; 442 | + Buffer.contents b 443 | +let unix_quote = generic_quote "'\\''" 444 | + 445 | let quote_filename_if_needed s = 446 | if is_simple_filename s then s 447 | (* We should probably be using [Filename.unix_quote] except that function 448 | * isn't exported. Users on Windows will have to live with not being able to 449 | * install OCaml into c:\o'caml. Too bad. *) 450 | - else if Sys.os_type = "Win32" then Printf.sprintf "'%s'" s 451 | + else if Sys.os_type = "Win32" then unix_quote s 452 | else Filename.quote s 453 | let chdir dir = 454 | reset_filesys_cache (); 455 | @@ -37,7 +51,7 @@ 456 | let run args target = 457 | reset_readdir_cache (); 458 | let cmd = String.concat " " (List.map quote_filename_if_needed args) in 459 | - if !*My_unix.is_degraded || Sys.os_type = "Win32" then 460 | + if !*My_unix.is_degraded then 461 | begin 462 | Log.event cmd target Tags.empty; 463 | let st = sys_command cmd in 464 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "make", 10 | "-f", 11 | "configure.make", 12 | "all", 13 | "OCAMLBUILD_PREFIX=#{self.install}", 14 | "OCAMLBUILD_BINDIR=#{self.bin}", 15 | "OCAMLBUILD_LIBDIR=#{self.lib}", 16 | "OCAMLBUILD_MANDIR=#{self.man}", 17 | "OCAMLBUILD_NATIVE=true", 18 | "OCAMLBUILD_NATIVE_TOOLS=true" 19 | ], 20 | [ 21 | "make", 22 | "check-if-preinstalled", 23 | "all", 24 | "#{os == 'windows' ? 'install' : 'opam-install'}" 25 | ] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/files/findlib-1.8.1.patch: -------------------------------------------------------------------------------- 1 | --- ./Makefile 2 | +++ ./Makefile 3 | @@ -57,16 +57,16 @@ 4 | cat findlib.conf.in | \ 5 | $(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf 6 | if ./tools/cmd_from_same_dir ocamlc; then \ 7 | - echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \ 8 | + echo 'ocamlc="ocamlc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 9 | fi 10 | if ./tools/cmd_from_same_dir ocamlopt; then \ 11 | - echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \ 12 | + echo 'ocamlopt="ocamlopt.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 13 | fi 14 | if ./tools/cmd_from_same_dir ocamldep; then \ 15 | - echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \ 16 | + echo 'ocamldep="ocamldep.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 17 | fi 18 | if ./tools/cmd_from_same_dir ocamldoc; then \ 19 | - echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \ 20 | + echo 'ocamldoc="ocamldoc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 21 | fi 22 | 23 | .PHONY: install-doc 24 | --- ./src/findlib/findlib_config.mlp 25 | +++ ./src/findlib/findlib_config.mlp 26 | @@ -24,3 +24,5 @@ 27 | | "MacOS" -> "" (* don't know *) 28 | | _ -> failwith "Unknown Sys.os_type" 29 | ;; 30 | + 31 | +let exec_suffix = "@EXEC_SUFFIX@";; 32 | --- ./src/findlib/findlib.ml 33 | +++ ./src/findlib/findlib.ml 34 | @@ -28,15 +28,20 @@ 35 | let conf_ldconf = ref "";; 36 | let conf_ignore_dups_in = ref ([] : string list);; 37 | 38 | -let ocamlc_default = "ocamlc";; 39 | -let ocamlopt_default = "ocamlopt";; 40 | -let ocamlcp_default = "ocamlcp";; 41 | -let ocamloptp_default = "ocamloptp";; 42 | -let ocamlmklib_default = "ocamlmklib";; 43 | -let ocamlmktop_default = "ocamlmktop";; 44 | -let ocamldep_default = "ocamldep";; 45 | -let ocamlbrowser_default = "ocamlbrowser";; 46 | -let ocamldoc_default = "ocamldoc";; 47 | +let add_exec str = 48 | + match Findlib_config.exec_suffix with 49 | + | "" -> str 50 | + | a -> str ^ a ;; 51 | +let ocamlc_default = add_exec "ocamlc";; 52 | +let ocamlopt_default = add_exec "ocamlopt";; 53 | +let ocamlcp_default = add_exec "ocamlcp";; 54 | +let ocamloptp_default = add_exec "ocamloptp";; 55 | +let ocamlmklib_default = add_exec "ocamlmklib";; 56 | +let ocamlmktop_default = add_exec "ocamlmktop";; 57 | +let ocamldep_default = add_exec "ocamldep";; 58 | +let ocamlbrowser_default = add_exec "ocamlbrowser";; 59 | +let ocamldoc_default = add_exec "ocamldoc";; 60 | + 61 | 62 | 63 | let init_manually 64 | --- ./src/findlib/fl_package_base.ml 65 | +++ ./src/findlib/fl_package_base.ml 66 | @@ -133,7 +133,15 @@ 67 | List.find (fun def -> def.def_var = "exists_if") p.package_defs in 68 | let files = Fl_split.in_words def.def_value in 69 | List.exists 70 | - (fun file -> Sys.file_exists (Filename.concat d' file)) 71 | + (fun file -> 72 | + let fln = Filename.concat d' file in 73 | + let e = Sys.file_exists fln in 74 | + (* necessary for ppx executables *) 75 | + if e || Sys.os_type <> "Win32" || Filename.check_suffix fln ".exe" then 76 | + e 77 | + else 78 | + Sys.file_exists (fln ^ ".exe") 79 | + ) 80 | files 81 | with Not_found -> true in 82 | 83 | --- ./src/findlib/fl_split.ml 84 | +++ ./src/findlib/fl_split.ml 85 | @@ -126,10 +126,17 @@ 86 | | '/' | '\\' -> true 87 | | _ -> false in 88 | let norm_dir_win() = 89 | - if l >= 1 && s.[0] = '/' then 90 | - Buffer.add_char b '\\' else Buffer.add_char b s.[0]; 91 | - if l >= 2 && s.[1] = '/' then 92 | - Buffer.add_char b '\\' else Buffer.add_char b s.[1]; 93 | + if l >= 1 then ( 94 | + if s.[0] = '/' then 95 | + Buffer.add_char b '\\' 96 | + else 97 | + Buffer.add_char b s.[0] ; 98 | + if l >= 2 then 99 | + if s.[1] = '/' then 100 | + Buffer.add_char b '\\' 101 | + else 102 | + Buffer.add_char b s.[1]; 103 | + ); 104 | for k = 2 to l - 1 do 105 | let c = s.[k] in 106 | if is_slash c then ( 107 | --- ./src/findlib/frontend.ml 108 | +++ ./src/findlib/frontend.ml 109 | @@ -31,10 +31,18 @@ 110 | else 111 | Sys_error (arg ^ ": " ^ Unix.error_message code) 112 | 113 | +let is_win = Sys.os_type = "Win32" 114 | + 115 | +let () = 116 | + match Findlib_config.system with 117 | + | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> 118 | + (try set_binary_mode_out stdout true with _ -> ()); 119 | + (try set_binary_mode_out stderr true with _ -> ()); 120 | + | _ -> () 121 | 122 | let slashify s = 123 | match Findlib_config.system with 124 | - | "mingw" | "mingw64" | "cygwin" -> 125 | + | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> 126 | let b = Buffer.create 80 in 127 | String.iter 128 | (function 129 | @@ -49,7 +57,7 @@ 130 | 131 | let out_path ?(prefix="") s = 132 | match Findlib_config.system with 133 | - | "mingw" | "mingw64" | "cygwin" -> 134 | + | "win32" | "win64" | "mingw" | "mingw64" | "cygwin" -> 135 | let u = slashify s in 136 | prefix ^ 137 | (if String.contains u ' ' then 138 | @@ -273,11 +281,9 @@ 139 | 140 | 141 | let identify_dir d = 142 | - match Sys.os_type with 143 | - | "Win32" -> 144 | - failwith "identify_dir" (* not available *) 145 | - | _ -> 146 | - let s = Unix.stat d in 147 | + if is_win then 148 | + failwith "identify_dir"; (* not available *) 149 | + let s = Unix.stat d in 150 | (s.Unix.st_dev, s.Unix.st_ino) 151 | ;; 152 | 153 | @@ -459,6 +465,96 @@ 154 | ) 155 | packages 156 | 157 | +let rewrite_cmd s = 158 | + if s = "" || not is_win then 159 | + s 160 | + else 161 | + let s = 162 | + let l = String.length s in 163 | + let b = Buffer.create l in 164 | + for i = 0 to pred l do 165 | + match s.[i] with 166 | + | '/' -> Buffer.add_char b '\\' 167 | + | x -> Buffer.add_char b x 168 | + done; 169 | + Buffer.contents b 170 | + in 171 | + if (Filename.is_implicit s && String.contains s '\\' = false) || 172 | + Filename.check_suffix (String.lowercase s) ".exe" then 173 | + s 174 | + else 175 | + let s' = s ^ ".exe" in 176 | + if Sys.file_exists s' then 177 | + s' 178 | + else 179 | + s 180 | + 181 | +let rewrite_cmd s = 182 | + if s = "" || not is_win then s else 183 | + let s = 184 | + let l = String.length s in 185 | + let b = Buffer.create l in 186 | + for i = 0 to pred l do 187 | + match s.[i] with 188 | + | '/' -> Buffer.add_char b '\\' 189 | + | x -> Buffer.add_char b x 190 | + done; 191 | + Buffer.contents b 192 | + in 193 | + if (Filename.is_implicit s && String.contains s '\\' = false) || 194 | + Filename.check_suffix (String.lowercase s) ".exe" then 195 | + s 196 | + else 197 | + let s' = s ^ ".exe" in 198 | + if Sys.file_exists s' then 199 | + s' 200 | + else 201 | + s 202 | + 203 | +let rewrite_pp cmd = 204 | + if not is_win then cmd else 205 | + let module T = struct exception Keep end in 206 | + let is_whitespace = function 207 | + | ' ' | '\011' | '\012' | '\n' | '\r' | '\t' -> true 208 | + | _ -> false in 209 | + (* characters that triggers special behaviour (cmd.exe, not unix shell) *) 210 | + let is_unsafe_char = function 211 | + | '(' | ')' | '%' | '!' | '^' | '<' | '>' | '&' -> true 212 | + | _ -> false in 213 | + let len = String.length cmd in 214 | + let buf = Buffer.create (len + 4) in 215 | + let buf_cmd = Buffer.create len in 216 | + let rec iter_ws i = 217 | + if i >= len then () else 218 | + let cur = cmd.[i] in 219 | + if is_whitespace cur then ( 220 | + Buffer.add_char buf cur; 221 | + iter_ws (succ i) 222 | + ) 223 | + else 224 | + iter_cmd i 225 | + and iter_cmd i = 226 | + if i >= len then add_buf_cmd () else 227 | + let cur = cmd.[i] in 228 | + if is_unsafe_char cur || cur = '"' || cur = '\'' then 229 | + raise T.Keep; 230 | + if is_whitespace cur then ( 231 | + add_buf_cmd (); 232 | + Buffer.add_substring buf cmd i (len - i) 233 | + ) 234 | + else ( 235 | + Buffer.add_char buf_cmd cur; 236 | + iter_cmd (succ i) 237 | + ) 238 | + and add_buf_cmd () = 239 | + if Buffer.length buf_cmd > 0 then 240 | + Buffer.add_string buf (rewrite_cmd (Buffer.contents buf_cmd)) 241 | + in 242 | + try 243 | + iter_ws 0; 244 | + Buffer.contents buf 245 | + with 246 | + | T.Keep -> cmd 247 | 248 | let process_pp_spec syntax_preds packages pp_opts = 249 | (* Returns: pp_command *) 250 | @@ -549,7 +645,7 @@ 251 | None -> [] 252 | | Some cmd -> 253 | ["-pp"; 254 | - cmd ^ " " ^ 255 | + (rewrite_cmd cmd) ^ " " ^ 256 | String.concat " " (List.map Filename.quote pp_i_options) ^ " " ^ 257 | String.concat " " (List.map Filename.quote pp_archives) ^ " " ^ 258 | String.concat " " (List.map Filename.quote pp_opts)] 259 | @@ -625,9 +721,11 @@ 260 | in 261 | try 262 | let preprocessor = 263 | + rewrite_cmd ( 264 | resolve_path 265 | ~base ~explicit:true 266 | - (package_property predicates pname "ppx") in 267 | + (package_property predicates pname "ppx") ) 268 | + in 269 | ["-ppx"; String.concat " " (preprocessor :: options)] 270 | with Not_found -> [] 271 | ) 272 | @@ -895,6 +993,14 @@ 273 | switch (e.g. -L instead of -L ) 274 | *) 275 | 276 | +(* We may need to remove files on which we do not have complete control. 277 | + On Windows, removing a read-only file fails so try to change the 278 | + mode of the file first. *) 279 | +let remove_file fname = 280 | + try Sys.remove fname 281 | + with Sys_error _ when is_win -> 282 | + (try Unix.chmod fname 0o666 with Unix.Unix_error _ -> ()); 283 | + Sys.remove fname 284 | 285 | let ocamlc which () = 286 | 287 | @@ -1022,9 +1128,12 @@ 288 | 289 | "-intf", 290 | Arg.String (fun s -> pass_files := !pass_files @ [ Intf(slashify s) ]); 291 | - 292 | + 293 | "-pp", 294 | - Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" s); 295 | + Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" (rewrite_pp s)); 296 | + 297 | + "-ppx", 298 | + Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); 299 | 300 | "-thread", 301 | Arg.Unit (fun _ -> threads := threads_default); 302 | @@ -1237,7 +1346,7 @@ 303 | with 304 | any -> 305 | close_out initl; 306 | - Sys.remove initl_file_name; 307 | + remove_file initl_file_name; 308 | raise any 309 | end; 310 | 311 | @@ -1245,9 +1354,9 @@ 312 | at_exit 313 | (fun () -> 314 | let tr f x = try f x with _ -> () in 315 | - tr Sys.remove initl_file_name; 316 | - tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmi"); 317 | - tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmo"); 318 | + tr remove_file initl_file_name; 319 | + tr remove_file (Filename.chop_extension initl_file_name ^ ".cmi"); 320 | + tr remove_file (Filename.chop_extension initl_file_name ^ ".cmo"); 321 | ); 322 | 323 | let exclude_list = [ stdlibdir; threads_dir; vmthreads_dir ] in 324 | @@ -1493,7 +1602,9 @@ 325 | [ "-v", Arg.Unit (fun () -> verbose := Verbose); 326 | "-pp", Arg.String (fun s -> 327 | pp_specified := true; 328 | - options := !options @ ["-pp"; s]); 329 | + options := !options @ ["-pp"; rewrite_pp s]); 330 | + "-ppx", Arg.String (fun s -> 331 | + options := !options @ ["-ppx"; rewrite_pp s]); 332 | ] 333 | ) 334 | ) 335 | @@ -1672,7 +1783,9 @@ 336 | Arg.String (fun s -> add_spec_fn "-I" (slashify (resolve_path s))); 337 | 338 | "-pp", Arg.String (fun s -> pp_specified := true; 339 | - add_spec_fn "-pp" s); 340 | + add_spec_fn "-pp" (rewrite_pp s)); 341 | + "-ppx", Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); 342 | + 343 | ] 344 | ) 345 | ) 346 | @@ -1830,7 +1943,10 @@ 347 | output_string ch_out append; 348 | close_out ch_out; 349 | close_in ch_in; 350 | - Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime; 351 | + (try Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime 352 | + with Unix.Unix_error(e,_,_) -> 353 | + prerr_endline("Warning: setting utimes for " ^ outpath 354 | + ^ ": " ^ Unix.error_message e)); 355 | 356 | prerr_endline("Installed " ^ outpath); 357 | with 358 | @@ -1882,6 +1998,8 @@ 359 | Unix.openfile (Filename.concat dir owner_file) [Unix.O_RDONLY] 0 in 360 | let f = 361 | Unix.in_channel_of_descr fd in 362 | + if is_win then 363 | + set_binary_mode_in f false; 364 | try 365 | let line = input_line f in 366 | let is_my_file = (line = pkg) in 367 | @@ -2208,7 +2326,7 @@ 368 | let lines = read_ldconf !ldconf in 369 | let dlldir_norm = Fl_split.norm_dir dlldir in 370 | let dlldir_norm_lc = string_lowercase_ascii dlldir_norm in 371 | - let ci_filesys = (Sys.os_type = "Win32") in 372 | + let ci_filesys = is_win in 373 | let check_dir d = 374 | let d' = Fl_split.norm_dir d in 375 | (d' = dlldir_norm) || 376 | @@ -2356,7 +2474,7 @@ 377 | List.iter 378 | (fun file -> 379 | let absfile = Filename.concat dlldir file in 380 | - Sys.remove absfile; 381 | + remove_file absfile; 382 | prerr_endline ("Removed " ^ absfile) 383 | ) 384 | dll_files 385 | @@ -2365,7 +2483,7 @@ 386 | (* Remove the files from the package directory: *) 387 | if Sys.file_exists pkgdir then begin 388 | let files = Sys.readdir pkgdir in 389 | - Array.iter (fun f -> Sys.remove (Filename.concat pkgdir f)) files; 390 | + Array.iter (fun f -> remove_file (Filename.concat pkgdir f)) files; 391 | Unix.rmdir pkgdir; 392 | prerr_endline ("Removed " ^ pkgdir) 393 | end 394 | @@ -2415,7 +2533,9 @@ 395 | 396 | 397 | let print_configuration() = 398 | + let sl = slashify in 399 | let dir s = 400 | + let s = sl s in 401 | if Sys.file_exists s then 402 | s 403 | else 404 | @@ -2453,27 +2573,27 @@ 405 | if md = "" then "the corresponding package directories" else dir md 406 | ); 407 | Printf.printf "The standard library is assumed to reside in:\n %s\n" 408 | - (Findlib.ocaml_stdlib()); 409 | + (sl (Findlib.ocaml_stdlib())); 410 | Printf.printf "The ld.conf file can be found here:\n %s\n" 411 | - (Findlib.ocaml_ldconf()); 412 | + (sl (Findlib.ocaml_ldconf())); 413 | flush stdout 414 | | Some "conf" -> 415 | - print_endline (Findlib.config_file()) 416 | + print_endline (sl (Findlib.config_file())) 417 | | Some "path" -> 418 | - List.iter print_endline (Findlib.search_path()) 419 | + List.iter ( fun x -> print_endline (sl x)) (Findlib.search_path()) 420 | | Some "destdir" -> 421 | - print_endline (Findlib.default_location()) 422 | + print_endline ( sl (Findlib.default_location())) 423 | | Some "metadir" -> 424 | - print_endline (Findlib.meta_directory()) 425 | + print_endline ( sl (Findlib.meta_directory())) 426 | | Some "metapath" -> 427 | let mdir = Findlib.meta_directory() in 428 | let ddir = Findlib.default_location() in 429 | - print_endline 430 | - (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META") 431 | + print_endline ( sl 432 | + (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META")) 433 | | Some "stdlib" -> 434 | - print_endline (Findlib.ocaml_stdlib()) 435 | + print_endline ( sl (Findlib.ocaml_stdlib())) 436 | | Some "ldconf" -> 437 | - print_endline (Findlib.ocaml_ldconf()) 438 | + print_endline ( sl (Findlib.ocaml_ldconf())) 439 | | _ -> 440 | assert false 441 | ;; 442 | @@ -2481,7 +2601,7 @@ 443 | 444 | let ocamlcall pkg cmd = 445 | let dir = package_directory pkg in 446 | - let path = Filename.concat dir cmd in 447 | + let path = rewrite_cmd (Filename.concat dir cmd) in 448 | begin 449 | try Unix.access path [ Unix.X_OK ] 450 | with 451 | @@ -2647,6 +2767,10 @@ 452 | | Sys_error f -> 453 | prerr_endline ("ocamlfind: " ^ f); 454 | exit 2 455 | + | Unix.Unix_error (e, fn, f) -> 456 | + prerr_endline ("ocamlfind: " ^ fn ^ " " ^ f 457 | + ^ ": " ^ Unix.error_message e); 458 | + exit 2 459 | | Findlib.No_such_package(pkg,info) -> 460 | prerr_endline ("ocamlfind: Package `" ^ pkg ^ "' not found" ^ 461 | (if info <> "" then " - " ^ info else "")); 462 | --- ./src/findlib/Makefile 463 | +++ ./src/findlib/Makefile 464 | @@ -90,6 +90,7 @@ 465 | cat findlib_config.mlp | \ 466 | $(SH) $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \ 467 | $(SH) $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \ 468 | + $(SH) $(TOP)/tools/patch '@EXEC_SUFFIX@' '$(EXEC_SUFFIX)' | \ 469 | sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \ 470 | -e 's;@SYSTEM@;$(SYSTEM);g' \ 471 | >findlib_config.ml 472 | -------------------------------------------------------------------------------- /esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < findlib-1.8.1.patch' : 'true'}" 7 | ], 8 | [ 9 | "./configure", 10 | "-bindir", 11 | "#{self.bin}", 12 | "-sitelib", 13 | "#{self.lib}", 14 | "-mandir", 15 | "#{self.man}", 16 | "-config", 17 | "#{self.lib}/findlib.conf", 18 | "-no-custom", 19 | "-no-topfind" 20 | ], 21 | [ 22 | "make", 23 | "all" 24 | ], 25 | [ 26 | "make", 27 | "opt" 28 | ] 29 | ], 30 | "install": [ 31 | [ 32 | "make", 33 | "install" 34 | ], 35 | [ 36 | "install", 37 | "-m", 38 | "0755", 39 | "ocaml-stub", 40 | "#{self.bin}/ocaml" 41 | ], 42 | [ 43 | "mkdir", 44 | "-p", 45 | "#{self.toplevel}" 46 | ], 47 | [ 48 | "install", 49 | "-m", 50 | "0644", 51 | "src/findlib/topfind", 52 | "#{self.toplevel}/topfind" 53 | ] 54 | ], 55 | "exportedEnv": { 56 | "OCAML_TOPLEVEL_PATH": { 57 | "val": "#{self.toplevel}", 58 | "scope": "global" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "let-anything", 3 | "version": "1.0.1", 4 | "lockfileVersion": 1, 5 | "requires": true, 6 | "dependencies": { 7 | "bsb-native": { 8 | "version": "4.0.6", 9 | "resolved": "https://registry.npmjs.org/bsb-native/-/bsb-native-4.0.6.tgz", 10 | "integrity": "sha512-T1MkndnmA4StiKK2UvEftrqANN+h9StlLghBbwmKa833d97D86np+2wmIOw5Rqy6rNW3D076A2G51mooWTUwfQ==", 11 | "requires": { 12 | "yauzl": "2.10.0" 13 | } 14 | }, 15 | "buffer-crc32": { 16 | "version": "0.2.13", 17 | "resolved": "https://registry.npmjs.org/buffer-crc32/-/buffer-crc32-0.2.13.tgz", 18 | "integrity": "sha1-DTM+PwDqxQqhRUq9MO+MKl2ackI=" 19 | }, 20 | "fd-slicer": { 21 | "version": "1.1.0", 22 | "resolved": "https://registry.npmjs.org/fd-slicer/-/fd-slicer-1.1.0.tgz", 23 | "integrity": "sha1-JcfInLH5B3+IkbvmHY85Dq4lbx4=", 24 | "requires": { 25 | "pend": "1.2.0" 26 | } 27 | }, 28 | "pend": { 29 | "version": "1.2.0", 30 | "resolved": "https://registry.npmjs.org/pend/-/pend-1.2.0.tgz", 31 | "integrity": "sha1-elfrVQpng/kRUzH89GY9XI4AelA=" 32 | }, 33 | "yauzl": { 34 | "version": "2.10.0", 35 | "resolved": "https://registry.npmjs.org/yauzl/-/yauzl-2.10.0.tgz", 36 | "integrity": "sha1-x+sXyT4RLLEIb6bY5R+wZnt5pfk=", 37 | "requires": { 38 | "buffer-crc32": "0.2.13", 39 | "fd-slicer": "1.1.0" 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "let-anything", 3 | "version": "1.0.1", 4 | "scripts": { 5 | "start": "bsb -make-world -backend native -w", 6 | "postinstall": "bsb -make-world -backend native", 7 | "clean": "bsb -clean-world", 8 | "test": "./lib/bs/native/tests.native", 9 | "watch": "bsb -make-world -backend native -w" 10 | }, 11 | "keywords": [ 12 | "Reason", 13 | "Async" 14 | ], 15 | "repository": { 16 | "url": "jaredly/let-anything", 17 | "type": "git" 18 | }, 19 | "description": "let%Anything ppx for async/options/results/etc.", 20 | "author": "Jared Forsyth", 21 | "license": "ISC", 22 | "dependencies": { 23 | "bsb-native": "4.0.6" 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /src/Let_anything.re: -------------------------------------------------------------------------------- 1 | open Migrate_parsetree; 2 | open Ast_406; 3 | 4 | /*** 5 | * https://ocsigen.org/lwt/dev/api/Ppx_lwt 6 | * https://github.com/zepalmer/ocaml-monadic 7 | */ 8 | let fail = (loc, txt) => raise(Location.Error(Location.error(~loc, txt))); 9 | 10 | let rec process_bindings = (bindings, ident) => 11 | Parsetree.( 12 | switch bindings { 13 | | [] => assert false 14 | | [binding] => (binding.pvb_pat, binding.pvb_expr) 15 | | [binding, ...rest] => 16 | let (pattern, expr) = process_bindings(rest, ident); 17 | ( 18 | Ast_helper.Pat.tuple(~loc=binding.pvb_loc, [binding.pvb_pat, pattern]), 19 | Ast_helper.Exp.apply( 20 | ~loc=binding.pvb_loc, 21 | Ast_helper.Exp.ident(~loc=binding.pvb_loc, Location.mkloc(Longident.Ldot(ident, "and_"), binding.pvb_loc)), 22 | [ 23 | (Nolabel, binding.pvb_expr), 24 | (Nolabel, expr) 25 | ] 26 | ) 27 | ) 28 | } 29 | ); 30 | 31 | let parseLongident = txt => { 32 | let parts = Str.split(Str.regexp_string("."), txt); 33 | let rec loop = (current, parts) => switch (current, parts) { 34 | | (None, []) => assert(false) 35 | | (Some(c), []) => c 36 | | (None, [one, ...more]) => loop(Some(Longident.Lident(one)), more) 37 | | (Some(c), [one, ...more]) => loop(Some(Longident.Ldot(c, one)), more) 38 | }; 39 | loop(None, parts) 40 | }; 41 | 42 | let mapper = (_config, _cookies) => 43 | { 44 | ...Ast_mapper.default_mapper, 45 | /* TODO throw error on structure items */ 46 | expr: (mapper, expr) => 47 | switch expr.pexp_desc { 48 | | Pexp_extension(({txt, loc}, PStr([{pstr_desc: Pstr_eval({pexp_loc, pexp_desc: Pexp_try(value, handlers)}, _attributes)}]))) => { 49 | let ident = parseLongident(txt); 50 | let last = Longident.last(ident); 51 | if (last != String.capitalize(last)) { 52 | Ast_mapper.default_mapper.expr(mapper, expr) 53 | } else { 54 | let handlerLocStart = List.hd(handlers).pc_lhs.ppat_loc; 55 | let handlerLocEnd = List.nth(handlers, List.length(handlers) - 1).pc_rhs.pexp_loc; 56 | let handlerLoc = {...handlerLocStart, loc_end: handlerLocEnd.loc_end}; 57 | let try_ = Ast_helper.Exp.ident(~loc=pexp_loc, Location.mkloc(Longident.Ldot(ident, "try_"), loc)); 58 | Ast_helper.Exp.apply( 59 | ~loc, 60 | try_, 61 | [ 62 | (Nolabel, mapper.expr(mapper, value)), 63 | (Nolabel, Ast_helper.Exp.function_(~loc=handlerLoc, handlers)) 64 | ] 65 | ) 66 | } 67 | } 68 | | Pexp_extension(({txt, loc}, PStr([{pstr_desc: Pstr_eval({pexp_desc: Pexp_let(Nonrecursive, bindings, continuation)}, _attributes)}]))) => { 69 | let ident = parseLongident(txt); 70 | let last = Longident.last(ident); 71 | if (last != String.capitalize(last)) { 72 | Ast_mapper.default_mapper.expr(mapper, expr) 73 | } else { 74 | let (pat, expr) = process_bindings(bindings, ident); 75 | let let_ = Ast_helper.Exp.ident(~loc, Location.mkloc(Longident.Ldot(ident, "let_"), loc)); 76 | Ast_helper.Exp.apply( 77 | ~loc, 78 | let_, 79 | [ 80 | (Nolabel, mapper.expr(mapper, expr)), 81 | (Nolabel, Ast_helper.Exp.fun_(~loc, Nolabel, None, pat, mapper.expr(mapper, continuation))) 82 | ] 83 | ) 84 | } 85 | } 86 | | _ => Ast_mapper.default_mapper.expr(mapper, expr) 87 | } 88 | }; 89 | 90 | let () = 91 | Migrate_parsetree.Driver.register( 92 | ~name="let-anything", 93 | ~args=[], 94 | Migrate_parsetree.Versions.ocaml_406, 95 | mapper, 96 | ); 97 | -------------------------------------------------------------------------------- /src/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name let_anything) 3 | (public_name Let_anything) 4 | (flags 5 | (:standard -w -9-3)) 6 | (kind ppx_rewriter) 7 | (libraries reason compiler-libs unix bigarray str)) 8 | -------------------------------------------------------------------------------- /tests/Tests.re: -------------------------------------------------------------------------------- 1 | 2 | module Opt = { 3 | let let_ = (a, b) => switch (a) { 4 | | None => None 5 | | Some(x) => b(x) 6 | } 7 | }; 8 | 9 | module Opt_map = { 10 | let let_ = (a, b) => switch (a) { 11 | | None => None 12 | | Some(x) => Some(b(x)) 13 | } 14 | }; 15 | 16 | module Result = { 17 | type t('a, 'b) = 18 | | Ok('a) 19 | | Error('b); 20 | 21 | let let_ = (v, fn) => switch v { 22 | | Ok(o) => fn(o) 23 | | Error(_) => v 24 | }; 25 | let try_ = (v, fn) => switch v { 26 | | Ok(_) => v 27 | | Error(e) => fn(e) 28 | }; 29 | }; 30 | 31 | let z = { 32 | let%Result x = Ok(5); 33 | let%Result y = try%Result (Error("fail")) { 34 | | _x => Ok(40) 35 | }; 36 | Ok(x + y) 37 | } 38 | 39 | let _x = { 40 | let%Opt y = Some(2); 41 | let%Opt_map x = Some(10); 42 | x + 2 + y 43 | }; 44 | -------------------------------------------------------------------------------- /tests/dune: -------------------------------------------------------------------------------- 1 | (executable 2 | (name tests) 3 | (preprocess 4 | (pps Let_anything))) 5 | --------------------------------------------------------------------------------