Mirror: 🎩 A tiny but capable push & pull stream library for TypeScript and Flow
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Delete OCaml/Esy/Reason files

-5249
-52
bsconfig.json
··· 1 - { 2 - "name": "wonka", 3 - "version": "3.1.0", 4 - "namespace": false, 5 - "bsc-flags": ["-bs-super-errors", "-bs-no-version-header"], 6 - "refmt": 3, 7 - "gentypeconfig": { 8 - "language": "typescript", 9 - "importPath": "relative", 10 - "shims": { 11 - "Js": "Js", 12 - "Dom": "Dom", 13 - "ReasonPervasives": "ReasonPervasives" 14 - } 15 - }, 16 - "suffix": ".bs.js", 17 - "package-specs": { 18 - "module": "es6", 19 - "in-source": true 20 - }, 21 - "sources": [ 22 - { 23 - "dir": "src", 24 - "subdirs": [ 25 - { 26 - "dir": "shims" 27 - }, 28 - { 29 - "dir": "helpers" 30 - }, 31 - { 32 - "dir": "web", 33 - "backend": ["js"] 34 - }, 35 - { 36 - "dir": "include", 37 - "subdirs": [ 38 - { 39 - "dir": "rebel_native" 40 - }, 41 - { 42 - "dir": "rebel_js", 43 - "backend": ["js"] 44 - } 45 - ] 46 - } 47 - ] 48 - } 49 - ], 50 - "bs-dependencies": [], 51 - "bs-dev-dependencies": [] 52 - }
-1
dune-project
··· 1 - (lang dune 1.6)
-20
esy.json
··· 1 - { 2 - "name": "wonka", 3 - "version": "4.0.3", 4 - "esy": { 5 - "build": "dune build -p #{self.name}" 6 - }, 7 - "peerDependencies": { 8 - "ocaml": ">= 4.6.0" 9 - }, 10 - "dependencies": { 11 - "@opam/dune": "^1.7.3", 12 - "@esy-ocaml/reason": ">= 3.4.0 < 3.6.0", 13 - "refmterr": "*", 14 - "belt": "jaredly/belt" 15 - }, 16 - "devDependencies": { 17 - "@opam/merlin": "*", 18 - "ocaml": "4.8.1000" 19 - } 20 - }
-3
esy.lock/.gitattributes
··· 1 - 2 - # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 - * text eol=lf
-3
esy.lock/.gitignore
··· 1 - 2 - # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 - !*
-725
esy.lock/index.json
··· 1 - { 2 - "checksum": "f65f3554d6e408990d52199c5e9747c9", 3 - "root": "wonka@link-dev:./esy.json", 4 - "node": { 5 - "wonka@link-dev:./esy.json": { 6 - "id": "wonka@link-dev:./esy.json", 7 - "name": "wonka", 8 - "version": "link-dev:./esy.json", 9 - "source": { "type": "link-dev", "path": ".", "manifest": "esy.json" }, 10 - "overrides": [], 11 - "dependencies": [ 12 - "refmterr@3.3.0@d41d8cd9", "ocaml@4.8.1000@d41d8cd9", 13 - "belt@github:jaredly/belt#4d07f859403fdbd3fbfc5a9547c6066d657a2131@d41d8cd9", 14 - "@opam/dune@opam:2.1.2@94bd8c1b", "@esy-ocaml/reason@3.5.2@d41d8cd9" 15 - ], 16 - "devDependencies": [ 17 - "ocaml@4.8.1000@d41d8cd9", "@opam/merlin@opam:3.3.3@d653b06a" 18 - ] 19 - }, 20 - "refmterr@3.3.0@d41d8cd9": { 21 - "id": "refmterr@3.3.0@d41d8cd9", 22 - "name": "refmterr", 23 - "version": "3.3.0", 24 - "source": { 25 - "type": "install", 26 - "source": [ 27 - "archive:https://registry.npmjs.org/refmterr/-/refmterr-3.3.0.tgz#sha1:45adde80205093c201b491b3c37dd7740c9b036b" 28 - ] 29 - }, 30 - "overrides": [], 31 - "dependencies": [ 32 - "ocaml@4.8.1000@d41d8cd9", "@reason-native/pastel@0.2.3@d41d8cd9", 33 - "@reason-native/console@0.1.0@d41d8cd9", 34 - "@opam/re@opam:1.9.0@d4d5e13d", "@opam/dune@opam:2.1.2@94bd8c1b", 35 - "@opam/atdgen@opam:2.0.0@46af0360", 36 - "@esy-ocaml/reason@3.5.2@d41d8cd9" 37 - ], 38 - "devDependencies": [] 39 - }, 40 - "ocaml@4.8.1000@d41d8cd9": { 41 - "id": "ocaml@4.8.1000@d41d8cd9", 42 - "name": "ocaml", 43 - "version": "4.8.1000", 44 - "source": { 45 - "type": "install", 46 - "source": [ 47 - "archive:https://registry.npmjs.org/ocaml/-/ocaml-4.8.1000.tgz#sha1:abc435b5d4ddea2acba8b2df7efb81e2d1690db1" 48 - ] 49 - }, 50 - "overrides": [], 51 - "dependencies": [], 52 - "devDependencies": [] 53 - }, 54 - "belt@github:jaredly/belt#4d07f859403fdbd3fbfc5a9547c6066d657a2131@d41d8cd9": { 55 - "id": 56 - "belt@github:jaredly/belt#4d07f859403fdbd3fbfc5a9547c6066d657a2131@d41d8cd9", 57 - "name": "belt", 58 - "version": 59 - "github:jaredly/belt#4d07f859403fdbd3fbfc5a9547c6066d657a2131", 60 - "source": { 61 - "type": "install", 62 - "source": [ 63 - "github:jaredly/belt#4d07f859403fdbd3fbfc5a9547c6066d657a2131" 64 - ] 65 - }, 66 - "overrides": [], 67 - "dependencies": [ 68 - "ocaml@4.8.1000@d41d8cd9", 69 - "@opam/ppx_tools_versioned@opam:5.2.3@4994ec80", 70 - "@opam/ocaml-migrate-parsetree@opam:1.5.0@3e319dbc", 71 - "@opam/dune@opam:2.1.2@94bd8c1b", "@esy-ocaml/reason@3.5.2@d41d8cd9" 72 - ], 73 - "devDependencies": [] 74 - }, 75 - "@reason-native/pastel@0.2.3@d41d8cd9": { 76 - "id": "@reason-native/pastel@0.2.3@d41d8cd9", 77 - "name": "@reason-native/pastel", 78 - "version": "0.2.3", 79 - "source": { 80 - "type": "install", 81 - "source": [ 82 - "archive:https://registry.npmjs.org/@reason-native/pastel/-/pastel-0.2.3.tgz#sha1:5c5d420c09874584ce15a38695c5dfd0f0ff5dfa" 83 - ] 84 - }, 85 - "overrides": [], 86 - "dependencies": [ 87 - "ocaml@4.8.1000@d41d8cd9", "@opam/re@opam:1.9.0@d4d5e13d", 88 - "@opam/dune@opam:2.1.2@94bd8c1b", "@esy-ocaml/reason@3.5.2@d41d8cd9" 89 - ], 90 - "devDependencies": [] 91 - }, 92 - "@reason-native/console@0.1.0@d41d8cd9": { 93 - "id": "@reason-native/console@0.1.0@d41d8cd9", 94 - "name": "@reason-native/console", 95 - "version": "0.1.0", 96 - "source": { 97 - "type": "install", 98 - "source": [ 99 - "archive:https://registry.npmjs.org/@reason-native/console/-/console-0.1.0.tgz#sha1:3b56f0e9e1be8464329793df29020aa90e71c22c" 100 - ] 101 - }, 102 - "overrides": [], 103 - "dependencies": [ 104 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b", 105 - "@esy-ocaml/reason@3.5.2@d41d8cd9" 106 - ], 107 - "devDependencies": [] 108 - }, 109 - "@opam/yojson@opam:1.7.0@7056d985": { 110 - "id": "@opam/yojson@opam:1.7.0@7056d985", 111 - "name": "@opam/yojson", 112 - "version": "opam:1.7.0", 113 - "source": { 114 - "type": "install", 115 - "source": [ 116 - "archive:https://opam.ocaml.org/cache/md5/b8/b89d39ca3f8c532abe5f547ad3b8f84d#md5:b89d39ca3f8c532abe5f547ad3b8f84d", 117 - "archive:https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz#md5:b89d39ca3f8c532abe5f547ad3b8f84d" 118 - ], 119 - "opam": { 120 - "name": "yojson", 121 - "version": "1.7.0", 122 - "path": "esy.lock/opam/yojson.1.7.0" 123 - } 124 - }, 125 - "overrides": [], 126 - "dependencies": [ 127 - "ocaml@4.8.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 128 - "@opam/dune@opam:2.1.2@94bd8c1b", "@opam/cppo@opam:1.6.6@f4f83858", 129 - "@opam/biniou@opam:1.2.1@d7570399", 130 - "@esy-ocaml/substs@0.0.1@d41d8cd9" 131 - ], 132 - "devDependencies": [ 133 - "ocaml@4.8.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 134 - "@opam/dune@opam:2.1.2@94bd8c1b", "@opam/biniou@opam:1.2.1@d7570399" 135 - ] 136 - }, 137 - "@opam/seq@opam:base@d8d7de1d": { 138 - "id": "@opam/seq@opam:base@d8d7de1d", 139 - "name": "@opam/seq", 140 - "version": "opam:base", 141 - "source": { 142 - "type": "install", 143 - "source": [ "no-source:" ], 144 - "opam": { 145 - "name": "seq", 146 - "version": "base", 147 - "path": "esy.lock/opam/seq.base" 148 - } 149 - }, 150 - "overrides": [], 151 - "dependencies": [ 152 - "ocaml@4.8.1000@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" 153 - ], 154 - "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ] 155 - }, 156 - "@opam/result@opam:1.4@dc720aef": { 157 - "id": "@opam/result@opam:1.4@dc720aef", 158 - "name": "@opam/result", 159 - "version": "opam:1.4", 160 - "source": { 161 - "type": "install", 162 - "source": [ 163 - "archive:https://opam.ocaml.org/cache/md5/d3/d3162dbc501a2af65c8c71e0866541da#md5:d3162dbc501a2af65c8c71e0866541da", 164 - "archive:https://github.com/janestreet/result/archive/1.4.tar.gz#md5:d3162dbc501a2af65c8c71e0866541da" 165 - ], 166 - "opam": { 167 - "name": "result", 168 - "version": "1.4", 169 - "path": "esy.lock/opam/result.1.4" 170 - } 171 - }, 172 - "overrides": [], 173 - "dependencies": [ 174 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b", 175 - "@esy-ocaml/substs@0.0.1@d41d8cd9" 176 - ], 177 - "devDependencies": [ 178 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b" 179 - ] 180 - }, 181 - "@opam/re@opam:1.9.0@d4d5e13d": { 182 - "id": "@opam/re@opam:1.9.0@d4d5e13d", 183 - "name": "@opam/re", 184 - "version": "opam:1.9.0", 185 - "source": { 186 - "type": "install", 187 - "source": [ 188 - "archive:https://opam.ocaml.org/cache/md5/bd/bddaed4f386a22cace7850c9c7dac296#md5:bddaed4f386a22cace7850c9c7dac296", 189 - "archive:https://github.com/ocaml/ocaml-re/releases/download/1.9.0/re-1.9.0.tbz#md5:bddaed4f386a22cace7850c9c7dac296" 190 - ], 191 - "opam": { 192 - "name": "re", 193 - "version": "1.9.0", 194 - "path": "esy.lock/opam/re.1.9.0" 195 - } 196 - }, 197 - "overrides": [], 198 - "dependencies": [ 199 - "ocaml@4.8.1000@d41d8cd9", "@opam/seq@opam:base@d8d7de1d", 200 - "@opam/dune@opam:2.1.2@94bd8c1b", "@esy-ocaml/substs@0.0.1@d41d8cd9" 201 - ], 202 - "devDependencies": [ 203 - "ocaml@4.8.1000@d41d8cd9", "@opam/seq@opam:base@d8d7de1d", 204 - "@opam/dune@opam:2.1.2@94bd8c1b" 205 - ] 206 - }, 207 - "@opam/ppx_tools_versioned@opam:5.2.3@4994ec80": { 208 - "id": "@opam/ppx_tools_versioned@opam:5.2.3@4994ec80", 209 - "name": "@opam/ppx_tools_versioned", 210 - "version": "opam:5.2.3", 211 - "source": { 212 - "type": "install", 213 - "source": [ 214 - "archive:https://opam.ocaml.org/cache/md5/b1/b1455e5a4a1bcd9ddbfcf712ccbd4262#md5:b1455e5a4a1bcd9ddbfcf712ccbd4262", 215 - "archive:https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.2.3.tar.gz#md5:b1455e5a4a1bcd9ddbfcf712ccbd4262" 216 - ], 217 - "opam": { 218 - "name": "ppx_tools_versioned", 219 - "version": "5.2.3", 220 - "path": "esy.lock/opam/ppx_tools_versioned.5.2.3" 221 - } 222 - }, 223 - "overrides": [], 224 - "dependencies": [ 225 - "ocaml@4.8.1000@d41d8cd9", 226 - "@opam/ocaml-migrate-parsetree@opam:1.5.0@3e319dbc", 227 - "@opam/dune@opam:2.1.2@94bd8c1b", "@esy-ocaml/substs@0.0.1@d41d8cd9" 228 - ], 229 - "devDependencies": [ 230 - "ocaml@4.8.1000@d41d8cd9", 231 - "@opam/ocaml-migrate-parsetree@opam:1.5.0@3e319dbc", 232 - "@opam/dune@opam:2.1.2@94bd8c1b" 233 - ] 234 - }, 235 - "@opam/ppx_derivers@opam:1.2.1@ecf0aa45": { 236 - "id": "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", 237 - "name": "@opam/ppx_derivers", 238 - "version": "opam:1.2.1", 239 - "source": { 240 - "type": "install", 241 - "source": [ 242 - "archive:https://opam.ocaml.org/cache/md5/5d/5dc2bf130c1db3c731fe0fffc5648b41#md5:5dc2bf130c1db3c731fe0fffc5648b41", 243 - "archive:https://github.com/ocaml-ppx/ppx_derivers/archive/1.2.1.tar.gz#md5:5dc2bf130c1db3c731fe0fffc5648b41" 244 - ], 245 - "opam": { 246 - "name": "ppx_derivers", 247 - "version": "1.2.1", 248 - "path": "esy.lock/opam/ppx_derivers.1.2.1" 249 - } 250 - }, 251 - "overrides": [], 252 - "dependencies": [ 253 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b", 254 - "@esy-ocaml/substs@0.0.1@d41d8cd9" 255 - ], 256 - "devDependencies": [ 257 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b" 258 - ] 259 - }, 260 - "@opam/ocamlfind@opam:1.8.1@ff07b0f9": { 261 - "id": "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 262 - "name": "@opam/ocamlfind", 263 - "version": "opam:1.8.1", 264 - "source": { 265 - "type": "install", 266 - "source": [ 267 - "archive:https://opam.ocaml.org/cache/md5/18/18ca650982c15536616dea0e422cbd8c#md5:18ca650982c15536616dea0e422cbd8c", 268 - "archive:http://download2.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c", 269 - "archive:http://download.camlcity.org/download/findlib-1.8.1.tar.gz#md5:18ca650982c15536616dea0e422cbd8c" 270 - ], 271 - "opam": { 272 - "name": "ocamlfind", 273 - "version": "1.8.1", 274 - "path": "esy.lock/opam/ocamlfind.1.8.1" 275 - } 276 - }, 277 - "overrides": [ 278 - { 279 - "opamoverride": 280 - "esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.1_opam_override" 281 - } 282 - ], 283 - "dependencies": [ 284 - "ocaml@4.8.1000@d41d8cd9", "@opam/conf-m4@opam:1@3b2b148a", 285 - "@esy-ocaml/substs@0.0.1@d41d8cd9" 286 - ], 287 - "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ] 288 - }, 289 - "@opam/ocamlbuild@opam:0.14.0@6ac75d03": { 290 - "id": "@opam/ocamlbuild@opam:0.14.0@6ac75d03", 291 - "name": "@opam/ocamlbuild", 292 - "version": "opam:0.14.0", 293 - "source": { 294 - "type": "install", 295 - "source": [ 296 - "archive:https://opam.ocaml.org/cache/sha256/87/87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78#sha256:87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78", 297 - "archive:https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz#sha256:87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78" 298 - ], 299 - "opam": { 300 - "name": "ocamlbuild", 301 - "version": "0.14.0", 302 - "path": "esy.lock/opam/ocamlbuild.0.14.0" 303 - } 304 - }, 305 - "overrides": [ 306 - { 307 - "opamoverride": 308 - "esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override" 309 - } 310 - ], 311 - "dependencies": [ 312 - "ocaml@4.8.1000@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" 313 - ], 314 - "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ] 315 - }, 316 - "@opam/ocaml-migrate-parsetree@opam:1.5.0@3e319dbc": { 317 - "id": "@opam/ocaml-migrate-parsetree@opam:1.5.0@3e319dbc", 318 - "name": "@opam/ocaml-migrate-parsetree", 319 - "version": "opam:1.5.0", 320 - "source": { 321 - "type": "install", 322 - "source": [ 323 - "archive:https://opam.ocaml.org/cache/sha256/7f/7f56679c9561552762666de5b6b81c8e4cc2e9fd92272e2269878a2eb534e3c0#sha256:7f56679c9561552762666de5b6b81c8e4cc2e9fd92272e2269878a2eb534e3c0", 324 - "archive:https://github.com/ocaml-ppx/ocaml-migrate-parsetree/releases/download/v1.5.0/ocaml-migrate-parsetree-v1.5.0.tbz#sha256:7f56679c9561552762666de5b6b81c8e4cc2e9fd92272e2269878a2eb534e3c0" 325 - ], 326 - "opam": { 327 - "name": "ocaml-migrate-parsetree", 328 - "version": "1.5.0", 329 - "path": "esy.lock/opam/ocaml-migrate-parsetree.1.5.0" 330 - } 331 - }, 332 - "overrides": [], 333 - "dependencies": [ 334 - "ocaml@4.8.1000@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 335 - "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", 336 - "@opam/dune@opam:2.1.2@94bd8c1b", "@esy-ocaml/substs@0.0.1@d41d8cd9" 337 - ], 338 - "devDependencies": [ 339 - "ocaml@4.8.1000@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 340 - "@opam/ppx_derivers@opam:1.2.1@ecf0aa45", 341 - "@opam/dune@opam:2.1.2@94bd8c1b" 342 - ] 343 - }, 344 - "@opam/merlin-extend@opam:0.5@a5dd7d4b": { 345 - "id": "@opam/merlin-extend@opam:0.5@a5dd7d4b", 346 - "name": "@opam/merlin-extend", 347 - "version": "opam:0.5", 348 - "source": { 349 - "type": "install", 350 - "source": [ 351 - "archive:https://opam.ocaml.org/cache/sha256/ca/ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227#sha256:ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227", 352 - "archive:https://github.com/let-def/merlin-extend/releases/download/v0.5/merlin-extend-v0.5.tbz#sha256:ca3a38c360c7d4827eb4789abf7a6aa4b6e3b4e3c3ef69a5be64dce4601ec227" 353 - ], 354 - "opam": { 355 - "name": "merlin-extend", 356 - "version": "0.5", 357 - "path": "esy.lock/opam/merlin-extend.0.5" 358 - } 359 - }, 360 - "overrides": [], 361 - "dependencies": [ 362 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b", 363 - "@opam/cppo@opam:1.6.6@f4f83858", "@esy-ocaml/substs@0.0.1@d41d8cd9" 364 - ], 365 - "devDependencies": [ 366 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b" 367 - ] 368 - }, 369 - "@opam/merlin@opam:3.3.3@d653b06a": { 370 - "id": "@opam/merlin@opam:3.3.3@d653b06a", 371 - "name": "@opam/merlin", 372 - "version": "opam:3.3.3", 373 - "source": { 374 - "type": "install", 375 - "source": [ 376 - "archive:https://opam.ocaml.org/cache/sha256/72/72909ef47eea1f6fca13b4109a34dccf8fe3923a3c026f1ed1db9eb5ee9aae15#sha256:72909ef47eea1f6fca13b4109a34dccf8fe3923a3c026f1ed1db9eb5ee9aae15", 377 - "archive:https://github.com/ocaml/merlin/releases/download/v3.3.3/merlin-v3.3.3.tbz#sha256:72909ef47eea1f6fca13b4109a34dccf8fe3923a3c026f1ed1db9eb5ee9aae15" 378 - ], 379 - "opam": { 380 - "name": "merlin", 381 - "version": "3.3.3", 382 - "path": "esy.lock/opam/merlin.3.3.3" 383 - } 384 - }, 385 - "overrides": [], 386 - "dependencies": [ 387 - "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 388 - "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 389 - "@opam/dune@opam:2.1.2@94bd8c1b", "@esy-ocaml/substs@0.0.1@d41d8cd9" 390 - ], 391 - "devDependencies": [ 392 - "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 393 - "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 394 - "@opam/dune@opam:2.1.2@94bd8c1b" 395 - ] 396 - }, 397 - "@opam/menhir@opam:20190924@004407ff": { 398 - "id": "@opam/menhir@opam:20190924@004407ff", 399 - "name": "@opam/menhir", 400 - "version": "opam:20190924", 401 - "source": { 402 - "type": "install", 403 - "source": [ 404 - "archive:https://opam.ocaml.org/cache/md5/67/677f1997fb73177d5a00fa1b8d61c3ef#md5:677f1997fb73177d5a00fa1b8d61c3ef", 405 - "archive:https://gitlab.inria.fr/fpottier/menhir/repository/20190924/archive.tar.gz#md5:677f1997fb73177d5a00fa1b8d61c3ef" 406 - ], 407 - "opam": { 408 - "name": "menhir", 409 - "version": "20190924", 410 - "path": "esy.lock/opam/menhir.20190924" 411 - } 412 - }, 413 - "overrides": [], 414 - "dependencies": [ 415 - "ocaml@4.8.1000@d41d8cd9", "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 416 - "@opam/ocamlbuild@opam:0.14.0@6ac75d03", 417 - "@esy-ocaml/substs@0.0.1@d41d8cd9" 418 - ], 419 - "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ] 420 - }, 421 - "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2": { 422 - "id": "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2", 423 - "name": "@opam/jbuilder", 424 - "version": "opam:1.0+beta20.2", 425 - "source": { 426 - "type": "install", 427 - "source": [ 428 - "archive:https://opam.ocaml.org/cache/md5/fb/fbe8c3b1facb206cac3fb8932b5dd5d9#md5:fbe8c3b1facb206cac3fb8932b5dd5d9", 429 - "archive:https://github.com/ocaml/dune/releases/download/1.0%2Bbeta20.2/jbuilder-1.0+beta20.2.tbz#md5:fbe8c3b1facb206cac3fb8932b5dd5d9" 430 - ], 431 - "opam": { 432 - "name": "jbuilder", 433 - "version": "1.0+beta20.2", 434 - "path": "esy.lock/opam/jbuilder.1.0+beta20.2" 435 - } 436 - }, 437 - "overrides": [], 438 - "dependencies": [ 439 - "ocaml@4.8.1000@d41d8cd9", "@esy-ocaml/substs@0.0.1@d41d8cd9" 440 - ], 441 - "devDependencies": [ "ocaml@4.8.1000@d41d8cd9" ] 442 - }, 443 - "@opam/easy-format@opam:1.3.2@0484b3c4": { 444 - "id": "@opam/easy-format@opam:1.3.2@0484b3c4", 445 - "name": "@opam/easy-format", 446 - "version": "opam:1.3.2", 447 - "source": { 448 - "type": "install", 449 - "source": [ 450 - "archive:https://opam.ocaml.org/cache/sha256/34/3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926#sha256:3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926", 451 - "archive:https://github.com/mjambon/easy-format/releases/download/1.3.2/easy-format-1.3.2.tbz#sha256:3440c2b882d537ae5e9011eb06abb53f5667e651ea4bb3b460ea8230fa8c1926" 452 - ], 453 - "opam": { 454 - "name": "easy-format", 455 - "version": "1.3.2", 456 - "path": "esy.lock/opam/easy-format.1.3.2" 457 - } 458 - }, 459 - "overrides": [], 460 - "dependencies": [ 461 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b", 462 - "@esy-ocaml/substs@0.0.1@d41d8cd9" 463 - ], 464 - "devDependencies": [ 465 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b" 466 - ] 467 - }, 468 - "@opam/dune@opam:2.1.2@94bd8c1b": { 469 - "id": "@opam/dune@opam:2.1.2@94bd8c1b", 470 - "name": "@opam/dune", 471 - "version": "opam:2.1.2", 472 - "source": { 473 - "type": "install", 474 - "source": [ 475 - "archive:https://opam.ocaml.org/cache/sha256/9c/9c3278ebb3ec14dc4b1880671371985edcd6cbb979260dd403f28acabbcc5faf#sha256:9c3278ebb3ec14dc4b1880671371985edcd6cbb979260dd403f28acabbcc5faf", 476 - "archive:https://github.com/ocaml/dune/releases/download/2.1.2/dune-2.1.2.tbz#sha256:9c3278ebb3ec14dc4b1880671371985edcd6cbb979260dd403f28acabbcc5faf" 477 - ], 478 - "opam": { 479 - "name": "dune", 480 - "version": "2.1.2", 481 - "path": "esy.lock/opam/dune.2.1.2" 482 - } 483 - }, 484 - "overrides": [], 485 - "dependencies": [ 486 - "ocaml@4.8.1000@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb", 487 - "@opam/base-threads@opam:base@36803084", 488 - "@esy-ocaml/substs@0.0.1@d41d8cd9" 489 - ], 490 - "devDependencies": [ 491 - "ocaml@4.8.1000@d41d8cd9", "@opam/base-unix@opam:base@87d0b2eb", 492 - "@opam/base-threads@opam:base@36803084" 493 - ] 494 - }, 495 - "@opam/cppo@opam:1.6.6@f4f83858": { 496 - "id": "@opam/cppo@opam:1.6.6@f4f83858", 497 - "name": "@opam/cppo", 498 - "version": "opam:1.6.6", 499 - "source": { 500 - "type": "install", 501 - "source": [ 502 - "archive:https://opam.ocaml.org/cache/sha256/e7/e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0#sha256:e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0", 503 - "archive:https://github.com/ocaml-community/cppo/releases/download/v1.6.6/cppo-v1.6.6.tbz#sha256:e7272996a7789175b87bb998efd079794a8db6625aae990d73f7b4484a07b8a0" 504 - ], 505 - "opam": { 506 - "name": "cppo", 507 - "version": "1.6.6", 508 - "path": "esy.lock/opam/cppo.1.6.6" 509 - } 510 - }, 511 - "overrides": [], 512 - "dependencies": [ 513 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b", 514 - "@opam/base-unix@opam:base@87d0b2eb", 515 - "@esy-ocaml/substs@0.0.1@d41d8cd9" 516 - ], 517 - "devDependencies": [ 518 - "ocaml@4.8.1000@d41d8cd9", "@opam/dune@opam:2.1.2@94bd8c1b", 519 - "@opam/base-unix@opam:base@87d0b2eb" 520 - ] 521 - }, 522 - "@opam/conf-m4@opam:1@3b2b148a": { 523 - "id": "@opam/conf-m4@opam:1@3b2b148a", 524 - "name": "@opam/conf-m4", 525 - "version": "opam:1", 526 - "source": { 527 - "type": "install", 528 - "source": [ "no-source:" ], 529 - "opam": { 530 - "name": "conf-m4", 531 - "version": "1", 532 - "path": "esy.lock/opam/conf-m4.1" 533 - } 534 - }, 535 - "overrides": [], 536 - "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 537 - "devDependencies": [] 538 - }, 539 - "@opam/biniou@opam:1.2.1@d7570399": { 540 - "id": "@opam/biniou@opam:1.2.1@d7570399", 541 - "name": "@opam/biniou", 542 - "version": "opam:1.2.1", 543 - "source": { 544 - "type": "install", 545 - "source": [ 546 - "archive:https://opam.ocaml.org/cache/sha256/35/35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335#sha256:35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335", 547 - "archive:https://github.com/mjambon/biniou/releases/download/1.2.1/biniou-1.2.1.tbz#sha256:35546c68b1929a8e6d27a3b39ecd17b38303a0d47e65eb9d1480c2061ea84335" 548 - ], 549 - "opam": { 550 - "name": "biniou", 551 - "version": "1.2.1", 552 - "path": "esy.lock/opam/biniou.1.2.1" 553 - } 554 - }, 555 - "overrides": [], 556 - "dependencies": [ 557 - "ocaml@4.8.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 558 - "@opam/dune@opam:2.1.2@94bd8c1b", "@esy-ocaml/substs@0.0.1@d41d8cd9" 559 - ], 560 - "devDependencies": [ 561 - "ocaml@4.8.1000@d41d8cd9", "@opam/easy-format@opam:1.3.2@0484b3c4", 562 - "@opam/dune@opam:2.1.2@94bd8c1b" 563 - ] 564 - }, 565 - "@opam/base-unix@opam:base@87d0b2eb": { 566 - "id": "@opam/base-unix@opam:base@87d0b2eb", 567 - "name": "@opam/base-unix", 568 - "version": "opam:base", 569 - "source": { 570 - "type": "install", 571 - "source": [ "no-source:" ], 572 - "opam": { 573 - "name": "base-unix", 574 - "version": "base", 575 - "path": "esy.lock/opam/base-unix.base" 576 - } 577 - }, 578 - "overrides": [], 579 - "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 580 - "devDependencies": [] 581 - }, 582 - "@opam/base-threads@opam:base@36803084": { 583 - "id": "@opam/base-threads@opam:base@36803084", 584 - "name": "@opam/base-threads", 585 - "version": "opam:base", 586 - "source": { 587 - "type": "install", 588 - "source": [ "no-source:" ], 589 - "opam": { 590 - "name": "base-threads", 591 - "version": "base", 592 - "path": "esy.lock/opam/base-threads.base" 593 - } 594 - }, 595 - "overrides": [], 596 - "dependencies": [ "@esy-ocaml/substs@0.0.1@d41d8cd9" ], 597 - "devDependencies": [] 598 - }, 599 - "@opam/atdgen-runtime@opam:2.0.0@60f6faab": { 600 - "id": "@opam/atdgen-runtime@opam:2.0.0@60f6faab", 601 - "name": "@opam/atdgen-runtime", 602 - "version": "opam:2.0.0", 603 - "source": { 604 - "type": "install", 605 - "source": [ 606 - "archive:https://opam.ocaml.org/cache/md5/14/14e47609397c524ea0eae7c3f14f7ccf#md5:14e47609397c524ea0eae7c3f14f7ccf", 607 - "archive:https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz#md5:14e47609397c524ea0eae7c3f14f7ccf" 608 - ], 609 - "opam": { 610 - "name": "atdgen-runtime", 611 - "version": "2.0.0", 612 - "path": "esy.lock/opam/atdgen-runtime.2.0.0" 613 - } 614 - }, 615 - "overrides": [], 616 - "dependencies": [ 617 - "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 618 - "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2", 619 - "@opam/biniou@opam:1.2.1@d7570399", 620 - "@esy-ocaml/substs@0.0.1@d41d8cd9" 621 - ], 622 - "devDependencies": [ 623 - "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 624 - "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2", 625 - "@opam/biniou@opam:1.2.1@d7570399" 626 - ] 627 - }, 628 - "@opam/atdgen@opam:2.0.0@46af0360": { 629 - "id": "@opam/atdgen@opam:2.0.0@46af0360", 630 - "name": "@opam/atdgen", 631 - "version": "opam:2.0.0", 632 - "source": { 633 - "type": "install", 634 - "source": [ 635 - "archive:https://opam.ocaml.org/cache/md5/14/14e47609397c524ea0eae7c3f14f7ccf#md5:14e47609397c524ea0eae7c3f14f7ccf", 636 - "archive:https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz#md5:14e47609397c524ea0eae7c3f14f7ccf" 637 - ], 638 - "opam": { 639 - "name": "atdgen", 640 - "version": "2.0.0", 641 - "path": "esy.lock/opam/atdgen.2.0.0" 642 - } 643 - }, 644 - "overrides": [], 645 - "dependencies": [ 646 - "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 647 - "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2", 648 - "@opam/biniou@opam:1.2.1@d7570399", 649 - "@opam/atdgen-runtime@opam:2.0.0@60f6faab", 650 - "@opam/atd@opam:2.0.0@e0ddd12f", "@esy-ocaml/substs@0.0.1@d41d8cd9" 651 - ], 652 - "devDependencies": [ 653 - "ocaml@4.8.1000@d41d8cd9", "@opam/yojson@opam:1.7.0@7056d985", 654 - "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2", 655 - "@opam/biniou@opam:1.2.1@d7570399", 656 - "@opam/atdgen-runtime@opam:2.0.0@60f6faab", 657 - "@opam/atd@opam:2.0.0@e0ddd12f" 658 - ] 659 - }, 660 - "@opam/atd@opam:2.0.0@e0ddd12f": { 661 - "id": "@opam/atd@opam:2.0.0@e0ddd12f", 662 - "name": "@opam/atd", 663 - "version": "opam:2.0.0", 664 - "source": { 665 - "type": "install", 666 - "source": [ 667 - "archive:https://opam.ocaml.org/cache/md5/14/14e47609397c524ea0eae7c3f14f7ccf#md5:14e47609397c524ea0eae7c3f14f7ccf", 668 - "archive:https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz#md5:14e47609397c524ea0eae7c3f14f7ccf" 669 - ], 670 - "opam": { 671 - "name": "atd", 672 - "version": "2.0.0", 673 - "path": "esy.lock/opam/atd.2.0.0" 674 - } 675 - }, 676 - "overrides": [], 677 - "dependencies": [ 678 - "ocaml@4.8.1000@d41d8cd9", "@opam/menhir@opam:20190924@004407ff", 679 - "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2", 680 - "@opam/easy-format@opam:1.3.2@0484b3c4", 681 - "@esy-ocaml/substs@0.0.1@d41d8cd9" 682 - ], 683 - "devDependencies": [ 684 - "ocaml@4.8.1000@d41d8cd9", 685 - "@opam/jbuilder@opam:1.0+beta20.2@053ddcf2", 686 - "@opam/easy-format@opam:1.3.2@0484b3c4" 687 - ] 688 - }, 689 - "@esy-ocaml/substs@0.0.1@d41d8cd9": { 690 - "id": "@esy-ocaml/substs@0.0.1@d41d8cd9", 691 - "name": "@esy-ocaml/substs", 692 - "version": "0.0.1", 693 - "source": { 694 - "type": "install", 695 - "source": [ 696 - "archive:https://registry.npmjs.org/@esy-ocaml/substs/-/substs-0.0.1.tgz#sha1:59ebdbbaedcda123fc7ed8fb2b302b7d819e9a46" 697 - ] 698 - }, 699 - "overrides": [], 700 - "dependencies": [], 701 - "devDependencies": [] 702 - }, 703 - "@esy-ocaml/reason@3.5.2@d41d8cd9": { 704 - "id": "@esy-ocaml/reason@3.5.2@d41d8cd9", 705 - "name": "@esy-ocaml/reason", 706 - "version": "3.5.2", 707 - "source": { 708 - "type": "install", 709 - "source": [ 710 - "archive:https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.5.2.tgz#sha1:ac48b63fd66fbbc1d77ab6a2b7e3a1ba21a8f40b" 711 - ] 712 - }, 713 - "overrides": [], 714 - "dependencies": [ 715 - "ocaml@4.8.1000@d41d8cd9", "@opam/result@opam:1.4@dc720aef", 716 - "@opam/ocamlfind@opam:1.8.1@ff07b0f9", 717 - "@opam/ocaml-migrate-parsetree@opam:1.5.0@3e319dbc", 718 - "@opam/merlin-extend@opam:0.5@a5dd7d4b", 719 - "@opam/menhir@opam:20190924@004407ff", 720 - "@opam/dune@opam:2.1.2@94bd8c1b" 721 - ], 722 - "devDependencies": [] 723 - } 724 - } 725 - }
-34
esy.lock/opam/atd.2.0.0/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "martin@mjambon.com" 3 - authors: ["Martin Jambon"] 4 - 5 - homepage: "https://github.com/mjambon/atd" 6 - bug-reports: "https://github.com/mjambon/atd/issues" 7 - dev-repo: "git://github.com/mjambon/atd.git" 8 - 9 - build: [ 10 - ["jbuilder" "subst" "-p" name] {pinned} 11 - ["jbuilder" "build" "-p" name "-j" jobs] 12 - ] 13 - 14 - # Restore when https://github.com/mjambon/atd/issues/121 is resolved. 15 - # build-test: [ 16 - # ["jbuilder" "runtest" "-p" name] 17 - # ] 18 - 19 - depends: [ 20 - "ocaml" {>= "4.03.0"} 21 - "jbuilder" 22 - "menhir" {build} 23 - "easy-format" 24 - ] 25 - synopsis: "Parser for the ATD data format description language" 26 - description: """ 27 - ATD is the OCaml library providing a parser for the ATD language and 28 - various utilities. ATD stands for Adjustable Type Definitions in 29 - reference to its main property of supporting annotations that allow a 30 - good fit with a variety of data formats.""" 31 - url { 32 - src: "https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz" 33 - checksum: "md5=14e47609397c524ea0eae7c3f14f7ccf" 34 - }
-29
esy.lock/opam/atdgen-runtime.2.0.0/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "martin@mjambon.com" 3 - authors: ["Martin Jambon"] 4 - 5 - homepage: "https://github.com/mjambon/atd" 6 - bug-reports: "https://github.com/mjambon/atd/issues" 7 - dev-repo: "git://github.com/mjambon/atd.git" 8 - 9 - build: [ 10 - ["jbuilder" "subst" "-p" name] {pinned} 11 - ["jbuilder" "build" "-p" name "-j" jobs] 12 - ] 13 - 14 - # Restore when https://github.com/mjambon/atd/issues/121 is resolved. 15 - # build-test: [ 16 - # ["jbuilder" "runtest" "-p" name] 17 - # ] 18 - 19 - depends: [ 20 - "ocaml" {>= "4.02.3"} 21 - "jbuilder" 22 - "biniou" {>= "1.0.6"} 23 - "yojson" {>= "1.2.1"} 24 - ] 25 - synopsis: "Runtime library for code generated by atdgen." 26 - url { 27 - src: "https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz" 28 - checksum: "md5=14e47609397c524ea0eae7c3f14f7ccf" 29 - }
-44
esy.lock/opam/atdgen.2.0.0/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "martin@mjambon.com" 3 - authors: ["Martin Jambon"] 4 - 5 - homepage: "https://github.com/mjambon/atd" 6 - bug-reports: "https://github.com/mjambon/atd/issues" 7 - dev-repo: "git://github.com/mjambon/atd.git" 8 - 9 - build: [ 10 - ["jbuilder" "subst" "-p" name] {pinned} 11 - ["jbuilder" "build" "-p" name "-j" jobs] 12 - ] 13 - 14 - # Restore when https://github.com/mjambon/atd/issues/121 is resolved. 15 - # build-test: [ 16 - # ["jbuilder" "runtest" "-p" name] 17 - # ] 18 - 19 - depends: [ 20 - "ocaml" {>= "4.03.0"} 21 - "jbuilder" 22 - "atd" {>= "2.0.0"} 23 - "atdgen-runtime" {>= "2.0.0"} 24 - "biniou" {>= "1.0.6"} 25 - "yojson" {>= "1.2.1"} 26 - ] 27 - synopsis: 28 - "Generates efficient JSON serializers, deserializers and validators" 29 - description: """ 30 - Atdgen is a command-line program that takes as input type definitions in the 31 - ATD syntax and produces OCaml code suitable for data serialization and 32 - deserialization. 33 - 34 - Two data formats are currently supported, these are biniou and JSON. 35 - Atdgen-biniou and Atdgen-json will refer to Atdgen used in one context or the 36 - other. 37 - 38 - Atdgen was designed with efficiency and durability in mind. Software authors 39 - are encouraged to use Atdgen directly and to write tools that may reuse part of 40 - Atdgen’s source code.""" 41 - url { 42 - src: "https://github.com/mjambon/atd/releases/download/2.0.0/atd-2.0.0.tbz" 43 - checksum: "md5=14e47609397c524ea0eae7c3f14f7ccf" 44 - }
-6
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 -
-6
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 -
-45
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 - }
-22
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
-37
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 - }
-51
esy.lock/opam/dune.2.1.2/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, has very low-overhead, and supports parallel builds on 10 - all platforms. It has no system dependencies; all you need to build 11 - dune or packages using dune is OCaml. You don't need 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 <opensource@janestreet.com>"] 23 - authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] 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.07"} 30 - "base-unix" 31 - "base-threads" 32 - ] 33 - conflicts: [ 34 - "odoc" {< "1.3.0"} 35 - "dune-release" {< "1.3.0"} 36 - "jbuilder" {= "transition"} 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" "-j" jobs] 43 - ["./dune.exe" "build" "-p" name "--profile" "dune-bootstrap" "-j" jobs] 44 - ] 45 - url { 46 - src: "https://github.com/ocaml/dune/releases/download/2.1.2/dune-2.1.2.tbz" 47 - checksum: [ 48 - "sha256=9c3278ebb3ec14dc4b1880671371985edcd6cbb979260dd403f28acabbcc5faf" 49 - "sha512=ab2d4a3817fbbe80de6a1fd8052c607e6f08489dd8f3b1f18f2a79260c8793472b4dfbfec232fc517d473f1d893ac3f797fdf35366c2d031c899a7db07097ee6" 50 - ] 51 - }
-46
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 - }
-39
esy.lock/opam/jbuilder.1.0+beta20.2/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "opensource@janestreet.com" 3 - authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] 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: "Apache-2.0" 8 - build: [ 9 - ["ocaml" "configure.ml" "--libdir" lib] 10 - ["ocaml" "bootstrap.ml"] 11 - ["./boot.exe" "--subst"] {pinned} 12 - ["./boot.exe" "-j" jobs] 13 - ] 14 - synopsis: "Fast, portable and opinionated build system" 15 - description: """ 16 - jbuilder is a build system that was designed to simplify the release 17 - of Jane Street packages. It reads metadata from "jbuild" files 18 - following a very simple s-expression syntax. 19 - 20 - jbuilder is fast, it has very low-overhead and support parallel builds 21 - on all platforms. It has no system dependencies, all you need to build 22 - jbuilder and packages using jbuilder is OCaml. You don't need or make 23 - or bash as long as the packages themselves don't use bash explicitely. 24 - 25 - jbuilder supports multi-package development by simply dropping multiple 26 - repositories into the same directory. 27 - 28 - It also supports multi-context builds, such as building against 29 - several opam roots/switches simultaneously. This helps maintaining 30 - packages across several versions of OCaml and gives cross-compilation 31 - for free.""" 32 - depends: [ 33 - "ocaml" {>= "4.02.3"} 34 - ] 35 - url { 36 - src: 37 - "https://github.com/ocaml/dune/releases/download/1.0%2Bbeta20.2/jbuilder-1.0+beta20.2.tbz" 38 - checksum: "md5=fbe8c3b1facb206cac3fb8932b5dd5d9" 39 - }
-29
esy.lock/opam/menhir.20190924/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "francois.pottier@inria.fr" 3 - authors: [ 4 - "François Pottier <francois.pottier@inria.fr>" 5 - "Yann Régis-Gianas <yrg@pps.univ-paris-diderot.fr>" 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 - }
-29
esy.lock/opam/merlin-extend.0.5/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "Frederic Bour <frederic.bour@lakaban.net>" 3 - authors: "Frederic Bour <frederic.bour@lakaban.net>" 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 - }
-71
esy.lock/opam/merlin.3.3.3/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "defree@gmail.com" 3 - authors: "The Merlin team" 4 - homepage: "https://github.com/ocaml/merlin" 5 - bug-reports: "https://github.com/ocaml/merlin/issues" 6 - dev-repo: "git+https://github.com/ocaml/merlin.git" 7 - build: [ 8 - ["dune" "subst"] {pinned} 9 - ["dune" "build" "-p" name "-j" jobs] 10 - ["dune" "runtest" "-p" name "-j" jobs] {with-test} 11 - ] 12 - depends: [ 13 - "ocaml" {>= "4.02.1" & < "4.10"} 14 - "dune" {>= "1.8.0"} 15 - "ocamlfind" {>= "1.5.2"} 16 - "yojson" {>= "1.6.0"} 17 - "mdx" {with-test & >= "1.3.0"} 18 - "conf-jq" {with-test} 19 - ] 20 - synopsis: 21 - "Editor helper, provides completion, typing and source browsing in Vim and Emacs" 22 - description: 23 - "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." 24 - post-messages: [ 25 - "merlin installed. 26 - 27 - Quick setup for VIM 28 - ------------------- 29 - Append this to your .vimrc to add merlin to vim's runtime-path: 30 - let g:opamshare = substitute(system('opam config var share'),'\\n$','','''') 31 - execute \"set rtp+=\" . g:opamshare . \"/merlin/vim\" 32 - 33 - Also run the following line in vim to index the documentation: 34 - :execute \"helptags \" . g:opamshare . \"/merlin/vim/doc\" 35 - 36 - Quick setup for EMACS 37 - ------------------- 38 - Add opam emacs directory to your load-path by appending this to your .emacs: 39 - (let ((opam-share (ignore-errors (car (process-lines \"opam\" \"config\" \"var\" \"share\"))))) 40 - (when (and opam-share (file-directory-p opam-share)) 41 - ;; Register Merlin 42 - (add-to-list 'load-path (expand-file-name \"emacs/site-lisp\" opam-share)) 43 - (autoload 'merlin-mode \"merlin\" nil t nil) 44 - ;; Automatically start it in OCaml buffers 45 - (add-hook 'tuareg-mode-hook 'merlin-mode t) 46 - (add-hook 'caml-mode-hook 'merlin-mode t) 47 - ;; Use opam switch to lookup ocamlmerlin binary 48 - (setq merlin-command 'opam))) 49 - 50 - Take a look at https://github.com/ocaml/merlin for more information 51 - 52 - Quick setup with opam-user-setup 53 - -------------------------------- 54 - 55 - Opam-user-setup support Merlin. 56 - 57 - $ opam user-setup install 58 - 59 - should take care of basic setup. 60 - See https://github.com/OCamlPro/opam-user-setup 61 - " 62 - {success & !user-setup:installed} 63 - ] 64 - url { 65 - src: 66 - "https://github.com/ocaml/merlin/releases/download/v3.3.3/merlin-v3.3.3.tbz" 67 - checksum: [ 68 - "sha256=72909ef47eea1f6fca13b4109a34dccf8fe3923a3c026f1ed1db9eb5ee9aae15" 69 - "sha512=2a5f39d966be56c1322982effc05bc98fd5f66cd12f1f76953f8daa9eca74a58c92a186854f4e601e2f0bb038720691446e7591b4613982accded3e579fedb23" 70 - ] 71 - }
-37
esy.lock/opam/ocaml-migrate-parsetree.1.5.0/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "frederic.bour@lakaban.net" 3 - authors: [ 4 - "Frédéric Bour <frederic.bour@lakaban.net>" 5 - "Jérémie Dimino <jeremie@dimino.org>" 6 - ] 7 - license: "LGPL-2.1 with OCaml 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.5.0/ocaml-migrate-parsetree-v1.5.0.tbz" 33 - checksum: [ 34 - "sha256=7f56679c9561552762666de5b6b81c8e4cc2e9fd92272e2269878a2eb534e3c0" 35 - "sha512=87fdccafae83b0437f1ccd4f3cfbc49e699bc0804596480e0df88510ba33410f31d48c7f677fe72800ed3f442a3a586d82d86aee1d12a964f79892833847b16a" 36 - ] 37 - }
-36
esy.lock/opam/ocamlbuild.0.14.0/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "Gabriel Scherer <gabriel.scherer@gmail.com>" 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 - }
-4
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" "$@"
-6
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"]
-50
esy.lock/opam/ocamlfind.1.8.1/opam
··· 1 - opam-version: "2.0" 2 - synopsis: "A library manager for OCaml" 3 - maintainer: "Thomas Gazagnaire <thomas@gazagnaire.org>" 4 - authors: "Gerd Stolpmann <gerd@gerd-stolpmann.de>" 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"]
-23
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 - }
-30
esy.lock/opam/ppx_tools_versioned.5.2.3/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "frederic.bour@lakaban.net" 3 - authors: [ 4 - "Frédéric Bour <frederic.bour@lakaban.net>" 5 - "Alain Frisch <alain.frisch@lexifi.com>" 6 - ] 7 - license: "MIT" 8 - homepage: "https://github.com/ocaml-ppx/ppx_tools_versioned" 9 - bug-reports: "https://github.com/ocaml-ppx/ppx_tools_versioned/issues" 10 - dev-repo: "git://github.com/ocaml-ppx/ppx_tools_versioned.git" 11 - tags: [ "syntax" ] 12 - build: [ 13 - ["dune" "subst"] {pinned} 14 - ["dune" "build" "-p" name "-j" jobs] 15 - ["dune" "runtest" "-p" name "-j" jobs] {with-test} 16 - ] 17 - depends: [ 18 - "ocaml" {>= "4.02.0"} 19 - "dune" {>= "1.0"} 20 - "ocaml-migrate-parsetree" {>= "1.4.0"} 21 - ] 22 - synopsis: "A variant of ppx_tools based on ocaml-migrate-parsetree" 23 - url { 24 - src: 25 - "https://github.com/ocaml-ppx/ppx_tools_versioned/archive/5.2.3.tar.gz" 26 - checksum: [ 27 - "md5=b1455e5a4a1bcd9ddbfcf712ccbd4262" 28 - "sha512=af20aa0031b9c638537bcdb52c75de95f316ae8fd455a38672a60da5c7c6895cca9dbecd5d56a88c3c40979c6a673a047d986b5b41e1e84b528b7df5d905b9b1" 29 - ] 30 - }
-42
esy.lock/opam/re.1.9.0/opam
··· 1 - opam-version: "2.0" 2 - 3 - maintainer: "rudi.grinberg@gmail.com" 4 - authors: [ 5 - "Jerome Vouillon" 6 - "Thomas Gazagnaire" 7 - "Anil Madhavapeddy" 8 - "Rudi Grinberg" 9 - "Gabriel Radanne" 10 - ] 11 - license: "LGPL-2.0-only with OCaml-LGPL-linking-exception" 12 - homepage: "https://github.com/ocaml/ocaml-re" 13 - bug-reports: "https://github.com/ocaml/ocaml-re/issues" 14 - dev-repo: "git+https://github.com/ocaml/ocaml-re.git" 15 - 16 - build: [ 17 - ["dune" "subst"] {pinned} 18 - ["dune" "build" "-p" name "-j" jobs] 19 - ["dune" "runtest" "-p" name "-j" jobs] {with-test} 20 - ] 21 - 22 - depends: [ 23 - "ocaml" {>= "4.02"} 24 - "dune" 25 - "ounit" {with-test} 26 - "seq" 27 - ] 28 - 29 - synopsis: "RE is a regular expression library for OCaml" 30 - description: """ 31 - Pure OCaml regular expressions with: 32 - * Perl-style regular expressions (module Re.Perl) 33 - * Posix extended regular expressions (module Re.Posix) 34 - * Emacs-style regular expressions (module Re.Emacs) 35 - * Shell-style file globbing (module Re.Glob) 36 - * Compatibility layer for OCaml's built-in Str module (module Re.Str) 37 - """ 38 - url { 39 - src: 40 - "https://github.com/ocaml/ocaml-re/releases/download/1.9.0/re-1.9.0.tbz" 41 - checksum: "md5=bddaed4f386a22cace7850c9c7dac296" 42 - }
-22
esy.lock/opam/result.1.4/opam
··· 1 - opam-version: "2.0" 2 - maintainer: "opensource@janestreet.com" 3 - authors: ["Jane Street Group, LLC <opensource@janestreet.com>"] 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 - }
-4
esy.lock/opam/seq.base/files/META.seq
··· 1 - name="seq" 2 - version="[distributed with OCaml 4.07 or above]" 3 - description="dummy backward-compatibility package for iterators" 4 - requires=""
-3
esy.lock/opam/seq.base/files/seq.install
··· 1 - lib:[ 2 - "META.seq" {"META"} 3 - ]
-15
esy.lock/opam/seq.base/opam
··· 1 - opam-version: "2.0" 2 - maintainer: " " 3 - authors: " " 4 - homepage: " " 5 - depends: [ 6 - "ocaml" {>= "4.07.0"} 7 - ] 8 - dev-repo: "git+https://github.com/ocaml/ocaml.git" 9 - bug-reports: "https://caml.inria.fr/mantis/main_page.php" 10 - synopsis: 11 - "Compatibility package for OCaml's standard iterator type starting from 4.07." 12 - extra-files: [ 13 - ["seq.install" "md5=026b31e1df290373198373d5aaa26e42"] 14 - ["META.seq" "md5=b33c8a1a6c7ed797816ce27df4855107"] 15 - ]
-38
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 - }
-463
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, "<path> Set build directory (implies no-links)"; 387 - "-install-lib-dir", Set_string Ocamlbuild_where.libdir, "<path> Set the install library directory"; 388 - "-install-bin-dir", Set_string Ocamlbuild_where.bindir, "<path> 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), "<command> 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), "<command> Display path to the tool command"; 393 - "-ocamlc", set_cmd ocamlc, "<command> Set the OCaml bytecode compiler"; 394 - "-plugin-ocamlc", set_cmd plugin_ocamlc, "<command> 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
-27
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 - }
-471
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<path> instead of -L <path>) 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
-61
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 - }
-13
src/Wonka.ml
··· 1 - module Types = Wonka_types 2 - 3 - include Wonka_sources 4 - include Wonka_operators 5 - include Wonka_sinks 6 - 7 - #if BS_NATIVE then 8 - #if BSB_BACKEND = "js" then 9 - include WonkaJs 10 - #end 11 - #else 12 - include WonkaJs 13 - #end
-15
src/Wonka.ts
··· 1 - export * from './helpers/pipe'; 2 - 3 - export * from './Wonka_sources.gen'; 4 - export * from './Wonka_operators.gen'; 5 - export * from './Wonka_sinks.gen'; 6 - export * from './web/WonkaJs.gen'; 7 - 8 - export { 9 - sinkT as Sink, 10 - sourceT as Source, 11 - operatorT as Operator, 12 - subscriptionT as Subscription, 13 - observerT as Observer, 14 - subjectT as Subject 15 - } from './Wonka_types.gen';
-1119
src/Wonka_operators.re
··· 1 - open Wonka_types; 2 - open Wonka_helpers; 3 - 4 - type bufferStateT('a) = { 5 - mutable buffer: Rebel.MutableQueue.t('a), 6 - mutable sourceTalkback: (. talkbackT) => unit, 7 - mutable notifierTalkback: (. talkbackT) => unit, 8 - mutable pulled: bool, 9 - mutable ended: bool, 10 - }; 11 - 12 - [@genType] 13 - let buffer = (notifier: sourceT('a)): operatorT('b, array('b)) => 14 - curry(source => 15 - curry(sink => { 16 - let state = { 17 - buffer: Rebel.MutableQueue.make(), 18 - sourceTalkback: talkbackPlaceholder, 19 - notifierTalkback: talkbackPlaceholder, 20 - pulled: false, 21 - ended: false, 22 - }; 23 - 24 - source((. signal) => { 25 - switch (signal) { 26 - | Start(tb) => 27 - state.sourceTalkback = tb; 28 - 29 - notifier((. signal) => { 30 - switch (signal) { 31 - | Start(tb) => state.notifierTalkback = tb 32 - | Push(_) when !state.ended => 33 - if (Rebel.MutableQueue.size(state.buffer) > 0) { 34 - let buffer = state.buffer; 35 - state.buffer = Rebel.MutableQueue.make(); 36 - sink(. Push(Rebel.MutableQueue.toArray(buffer))); 37 - } 38 - | Push(_) => () 39 - | End when !state.ended => 40 - state.ended = true; 41 - state.sourceTalkback(. Close); 42 - if (Rebel.MutableQueue.size(state.buffer) > 0) { 43 - sink(. Push(Rebel.MutableQueue.toArray(state.buffer))); 44 - }; 45 - sink(. End); 46 - | End => () 47 - }; 48 - (); 49 - }); 50 - | Push(value) when !state.ended => 51 - Rebel.MutableQueue.add(state.buffer, value); 52 - if (!state.pulled) { 53 - state.pulled = true; 54 - state.sourceTalkback(. Pull); 55 - state.notifierTalkback(. Pull); 56 - } else { 57 - state.pulled = false; 58 - }; 59 - | Push(_) => () 60 - | End when !state.ended => 61 - state.ended = true; 62 - state.notifierTalkback(. Close); 63 - if (Rebel.MutableQueue.size(state.buffer) > 0) { 64 - sink(. Push(Rebel.MutableQueue.toArray(state.buffer))); 65 - }; 66 - sink(. End); 67 - | End => () 68 - }; 69 - (); 70 - }); 71 - 72 - sink(. 73 - Start( 74 - (. signal) => 75 - if (!state.ended) { 76 - switch (signal) { 77 - | Close => 78 - state.ended = true; 79 - state.sourceTalkback(. Close); 80 - state.notifierTalkback(. Close); 81 - | Pull when !state.pulled => 82 - state.pulled = true; 83 - state.sourceTalkback(. Pull); 84 - state.notifierTalkback(. Pull); 85 - | Pull => () 86 - }; 87 - }, 88 - ), 89 - ); 90 - }) 91 - ); 92 - 93 - type combineStateT('a, 'b) = { 94 - mutable talkbackA: (. talkbackT) => unit, 95 - mutable talkbackB: (. talkbackT) => unit, 96 - mutable lastValA: option('a), 97 - mutable lastValB: option('b), 98 - mutable gotSignal: bool, 99 - mutable endCounter: int, 100 - mutable ended: bool, 101 - }; 102 - 103 - [@genType] 104 - let combine = 105 - (sourceA: sourceT('a), sourceB: sourceT('b)): sourceT(('a, 'b)) => 106 - curry(sink => { 107 - let state = { 108 - talkbackA: talkbackPlaceholder, 109 - talkbackB: talkbackPlaceholder, 110 - lastValA: None, 111 - lastValB: None, 112 - gotSignal: false, 113 - endCounter: 0, 114 - ended: false, 115 - }; 116 - 117 - sourceA((. signal) => 118 - switch (signal, state.lastValB) { 119 - | (Start(tb), _) => state.talkbackA = tb 120 - | (Push(a), None) => 121 - state.lastValA = Some(a); 122 - if (!state.gotSignal) { 123 - state.talkbackB(. Pull); 124 - } else { 125 - state.gotSignal = false; 126 - }; 127 - | (Push(a), Some(b)) when !state.ended => 128 - state.lastValA = Some(a); 129 - state.gotSignal = false; 130 - sink(. Push((a, b))); 131 - | (End, _) when state.endCounter < 1 => 132 - state.endCounter = state.endCounter + 1 133 - | (End, _) when !state.ended => 134 - state.ended = true; 135 - sink(. End); 136 - | _ => () 137 - } 138 - ); 139 - 140 - sourceB((. signal) => 141 - switch (signal, state.lastValA) { 142 - | (Start(tb), _) => state.talkbackB = tb 143 - | (Push(b), None) => 144 - state.lastValB = Some(b); 145 - if (!state.gotSignal) { 146 - state.talkbackA(. Pull); 147 - } else { 148 - state.gotSignal = false; 149 - }; 150 - | (Push(b), Some(a)) when !state.ended => 151 - state.lastValB = Some(b); 152 - state.gotSignal = false; 153 - sink(. Push((a, b))); 154 - | (End, _) when state.endCounter < 1 => 155 - state.endCounter = state.endCounter + 1 156 - | (End, _) when !state.ended => 157 - state.ended = true; 158 - sink(. End); 159 - | _ => () 160 - } 161 - ); 162 - 163 - sink(. 164 - Start( 165 - (. signal) => 166 - if (!state.ended) { 167 - switch (signal) { 168 - | Close => 169 - state.ended = true; 170 - state.talkbackA(. Close); 171 - state.talkbackB(. Close); 172 - | Pull when !state.gotSignal => 173 - state.gotSignal = true; 174 - state.talkbackA(. signal); 175 - state.talkbackB(. signal); 176 - | Pull => () 177 - }; 178 - }, 179 - ), 180 - ); 181 - }); 182 - 183 - type concatMapStateT('a) = { 184 - inputQueue: Rebel.MutableQueue.t('a), 185 - mutable outerTalkback: (. talkbackT) => unit, 186 - mutable outerPulled: bool, 187 - mutable innerTalkback: (. talkbackT) => unit, 188 - mutable innerActive: bool, 189 - mutable innerPulled: bool, 190 - mutable ended: bool, 191 - }; 192 - 193 - [@genType] 194 - let concatMap = (f: (. 'a) => sourceT('b)): operatorT('a, 'b) => 195 - curry(source => 196 - curry(sink => { 197 - let state: concatMapStateT('a) = { 198 - inputQueue: Rebel.MutableQueue.make(), 199 - outerTalkback: talkbackPlaceholder, 200 - outerPulled: false, 201 - innerTalkback: talkbackPlaceholder, 202 - innerActive: false, 203 - innerPulled: false, 204 - ended: false, 205 - }; 206 - 207 - let rec applyInnerSource = innerSource => { 208 - state.innerActive = true; 209 - innerSource((. signal) => { 210 - switch (signal) { 211 - | Start(tb) => 212 - state.innerTalkback = tb; 213 - state.innerPulled = false; 214 - tb(. Pull); 215 - | Push(_) when state.innerActive => 216 - sink(. signal); 217 - if (!state.innerPulled) { 218 - state.innerTalkback(. Pull); 219 - } else { 220 - state.innerPulled = false; 221 - }; 222 - | Push(_) => () 223 - | End when state.innerActive => 224 - state.innerActive = false; 225 - switch (Rebel.MutableQueue.pop(state.inputQueue)) { 226 - | Some(input) => applyInnerSource(f(. input)) 227 - | None when state.ended => sink(. End) 228 - | None when !state.outerPulled => 229 - state.outerPulled = true; 230 - state.outerTalkback(. Pull); 231 - | None => () 232 - }; 233 - | End => () 234 - }; 235 - (); 236 - }); 237 - (); 238 - }; 239 - 240 - source((. signal) => { 241 - switch (signal) { 242 - | Start(tb) => state.outerTalkback = tb 243 - | Push(x) when !state.ended => 244 - state.outerPulled = false; 245 - if (state.innerActive) { 246 - Rebel.MutableQueue.add(state.inputQueue, x); 247 - } else { 248 - applyInnerSource(f(. x)); 249 - }; 250 - | Push(_) => () 251 - | End when !state.ended => 252 - state.ended = true; 253 - if (!state.innerActive 254 - && Rebel.MutableQueue.isEmpty(state.inputQueue)) { 255 - sink(. End); 256 - }; 257 - | End => () 258 - }; 259 - (); 260 - }); 261 - 262 - sink(. 263 - Start( 264 - (. signal) => 265 - switch (signal) { 266 - | Pull => 267 - if (!state.ended && !state.outerPulled) { 268 - state.outerPulled = true; 269 - state.outerTalkback(. Pull); 270 - }; 271 - if (state.innerActive && !state.innerPulled) { 272 - state.innerPulled = true; 273 - state.innerTalkback(. Pull); 274 - }; 275 - | Close => 276 - if (!state.ended) { 277 - state.ended = true; 278 - state.outerTalkback(. Close); 279 - }; 280 - if (state.innerActive) { 281 - state.innerActive = false; 282 - state.innerTalkback(. Close); 283 - }; 284 - }, 285 - ), 286 - ); 287 - }) 288 - ); 289 - 290 - [@genType] 291 - let concatAll = (source: sourceT(sourceT('a))): sourceT('a) => 292 - concatMap((. x) => x, source); 293 - 294 - [@genType] 295 - let concat = (sources: array(sourceT('a))): sourceT('a) => 296 - concatMap((. x) => x, Wonka_sources.fromArray(sources)); 297 - 298 - [@genType] 299 - let filter = (f: (. 'a) => bool): operatorT('a, 'a) => 300 - curry(source => 301 - curry(sink => { 302 - let talkback = ref(talkbackPlaceholder); 303 - 304 - source((. signal) => { 305 - switch (signal) { 306 - | Start(tb) => 307 - talkback := tb; 308 - sink(. signal); 309 - | Push(x) when !f(. x) => talkback^(. Pull) 310 - | _ => sink(. signal) 311 - }; 312 - (); 313 - }); 314 - }) 315 - ); 316 - 317 - [@genType] 318 - let map = (f: (. 'a) => 'b): operatorT('a, 'b) => 319 - curry(source => 320 - curry(sink => 321 - source((. signal) => { 322 - sink(. 323 - /* The signal needs to be recreated for genType to generate 324 - the correct generics during codegen */ 325 - switch (signal) { 326 - | Start(x) => Start(x) 327 - | Push(x) => Push(f(. x)) 328 - | End => End 329 - }, 330 - ) 331 - }) 332 - ) 333 - ); 334 - 335 - type mergeMapStateT = { 336 - mutable outerTalkback: (. talkbackT) => unit, 337 - mutable outerPulled: bool, 338 - mutable innerTalkbacks: Rebel.Array.t((. talkbackT) => unit), 339 - mutable ended: bool, 340 - }; 341 - 342 - [@genType] 343 - let mergeMap = (f: (. 'a) => sourceT('b)): operatorT('a, 'b) => 344 - curry(source => 345 - curry(sink => { 346 - let state: mergeMapStateT = { 347 - outerTalkback: talkbackPlaceholder, 348 - outerPulled: false, 349 - innerTalkbacks: Rebel.Array.makeEmpty(), 350 - ended: false, 351 - }; 352 - 353 - let applyInnerSource = innerSource => { 354 - let talkback = ref(talkbackPlaceholder); 355 - 356 - innerSource((. signal) => 357 - switch (signal) { 358 - | Start(tb) => 359 - talkback := tb; 360 - state.innerTalkbacks = 361 - Rebel.Array.append(state.innerTalkbacks, tb); 362 - tb(. Pull); 363 - | Push(x) when Rebel.Array.size(state.innerTalkbacks) !== 0 => 364 - sink(. Push(x)); 365 - talkback^(. Pull); 366 - | Push(_) => () 367 - | End when Rebel.Array.size(state.innerTalkbacks) !== 0 => 368 - state.innerTalkbacks = 369 - Rebel.Array.filter(state.innerTalkbacks, x => x !== talkback^); 370 - let exhausted = Rebel.Array.size(state.innerTalkbacks) === 0; 371 - if (state.ended && exhausted) { 372 - sink(. End); 373 - } else if (!state.outerPulled && exhausted) { 374 - state.outerPulled = true; 375 - state.outerTalkback(. Pull); 376 - }; 377 - | End => () 378 - } 379 - ); 380 - }; 381 - 382 - source((. signal) => 383 - switch (signal) { 384 - | Start(tb) => state.outerTalkback = tb 385 - | Push(x) when !state.ended => 386 - state.outerPulled = false; 387 - applyInnerSource(f(. x)); 388 - if (!state.outerPulled) { 389 - state.outerPulled = true; 390 - state.outerTalkback(. Pull); 391 - }; 392 - | Push(_) => () 393 - | End when !state.ended => 394 - state.ended = true; 395 - if (Rebel.Array.size(state.innerTalkbacks) === 0) { 396 - sink(. End); 397 - }; 398 - | End => () 399 - } 400 - ); 401 - 402 - sink(. 403 - Start( 404 - (. signal) => 405 - switch (signal) { 406 - | Close => 407 - if (!state.ended) { 408 - state.ended = true; 409 - state.outerTalkback(. signal); 410 - }; 411 - 412 - Rebel.Array.forEach(state.innerTalkbacks, tb => tb(. signal)); 413 - state.innerTalkbacks = Rebel.Array.makeEmpty(); 414 - | Pull => 415 - if (!state.outerPulled && !state.ended) { 416 - state.outerPulled = true; 417 - state.outerTalkback(. Pull); 418 - } else { 419 - state.outerPulled = false; 420 - }; 421 - 422 - Rebel.Array.forEach(state.innerTalkbacks, tb => tb(. Pull)); 423 - }, 424 - ), 425 - ); 426 - }) 427 - ); 428 - 429 - [@genType] 430 - let merge = (sources: array(sourceT('a))): sourceT('a) => 431 - mergeMap((. x) => x, Wonka_sources.fromArray(sources)); 432 - 433 - [@genType] 434 - let mergeAll = (source: sourceT(sourceT('a))): sourceT('a) => 435 - mergeMap((. x) => x, source); 436 - 437 - [@genType] 438 - let flatten = mergeAll; 439 - 440 - [@genType] 441 - let onEnd = (f: (. unit) => unit): operatorT('a, 'a) => 442 - curry(source => 443 - curry(sink => { 444 - let ended = ref(false); 445 - source((. signal) => 446 - switch (signal) { 447 - | Start(talkback) => 448 - sink(. 449 - Start( 450 - (. signal) => 451 - if (! ended^) { 452 - switch (signal) { 453 - | Pull => talkback(. signal) 454 - | Close => 455 - ended := true; 456 - talkback(. signal); 457 - f(.); 458 - }; 459 - }, 460 - ), 461 - ) 462 - | Push(_) when ! ended^ => sink(. signal) 463 - | Push(_) => () 464 - | End when ! ended^ => 465 - ended := true; 466 - sink(. signal); 467 - f(.); 468 - | End => () 469 - } 470 - ); 471 - }) 472 - ); 473 - 474 - [@genType] 475 - let onPush = (f: (. 'a) => unit): operatorT('a, 'a) => 476 - curry(source => 477 - curry(sink => { 478 - let ended = ref(false); 479 - source((. signal) => { 480 - switch (signal) { 481 - | Start(talkback) => 482 - sink(. 483 - Start( 484 - (. signal) => 485 - if (! ended^) { 486 - switch (signal) { 487 - | Pull => talkback(. signal) 488 - | Close => 489 - ended := true; 490 - talkback(. signal); 491 - }; 492 - }, 493 - ), 494 - ) 495 - | Push(x) when ! ended^ => 496 - f(. x); 497 - sink(. signal); 498 - | Push(_) => () 499 - | End when ! ended^ => 500 - ended := true; 501 - sink(. signal); 502 - | End => () 503 - }; 504 - (); 505 - }); 506 - }) 507 - ); 508 - 509 - [@genType] 510 - let tap = onPush; 511 - 512 - [@genType] 513 - let onStart = (f: (. unit) => unit): operatorT('a, 'a) => 514 - curry(source => 515 - curry(sink => 516 - source((. signal) => 517 - switch (signal) { 518 - | Start(_) => 519 - sink(. signal); 520 - f(.); 521 - | _ => sink(. signal) 522 - } 523 - ) 524 - ) 525 - ); 526 - 527 - type sampleStateT('a) = { 528 - mutable sourceTalkback: (. talkbackT) => unit, 529 - mutable notifierTalkback: (. talkbackT) => unit, 530 - mutable value: option('a), 531 - mutable pulled: bool, 532 - mutable ended: bool, 533 - }; 534 - 535 - [@genType] 536 - let sample = (notifier: sourceT('a)): operatorT('b, 'b) => 537 - curry(source => 538 - curry(sink => { 539 - let state = { 540 - sourceTalkback: talkbackPlaceholder, 541 - notifierTalkback: talkbackPlaceholder, 542 - value: None, 543 - pulled: false, 544 - ended: false, 545 - }; 546 - 547 - source((. signal) => 548 - switch (signal) { 549 - | Start(tb) => state.sourceTalkback = tb 550 - | Push(x) => 551 - state.value = Some(x); 552 - if (!state.pulled) { 553 - state.pulled = true; 554 - state.notifierTalkback(. Pull); 555 - state.sourceTalkback(. Pull); 556 - } else { 557 - state.pulled = false; 558 - }; 559 - | End when !state.ended => 560 - state.ended = true; 561 - state.notifierTalkback(. Close); 562 - sink(. End); 563 - | End => () 564 - } 565 - ); 566 - 567 - notifier((. signal) => 568 - switch (signal, state.value) { 569 - | (Start(tb), _) => state.notifierTalkback = tb 570 - | (End, _) when !state.ended => 571 - state.ended = true; 572 - state.sourceTalkback(. Close); 573 - sink(. End); 574 - | (End, _) => () 575 - | (Push(_), Some(x)) when !state.ended => 576 - state.value = None; 577 - sink(. Push(x)); 578 - | (Push(_), _) => () 579 - } 580 - ); 581 - 582 - sink(. 583 - Start( 584 - (. signal) => 585 - if (!state.ended) { 586 - switch (signal) { 587 - | Pull when !state.pulled => 588 - state.pulled = true; 589 - state.sourceTalkback(. Pull); 590 - state.notifierTalkback(. Pull); 591 - | Pull => () 592 - | Close => 593 - state.ended = true; 594 - state.sourceTalkback(. Close); 595 - state.notifierTalkback(. Close); 596 - }; 597 - }, 598 - ), 599 - ); 600 - }) 601 - ); 602 - 603 - [@genType] 604 - let scan = (f: (. 'acc, 'a) => 'acc, seed: 'acc): operatorT('a, 'acc) => 605 - curry(source => 606 - curry(sink => { 607 - let acc = ref(seed); 608 - 609 - source((. signal) => 610 - sink(. 611 - switch (signal) { 612 - | Push(x) => 613 - acc := f(. acc^, x); 614 - Push(acc^); 615 - | Start(x) => Start(x) 616 - | End => End 617 - }, 618 - ) 619 - ); 620 - }) 621 - ); 622 - 623 - type shareStateT('a) = { 624 - mutable sinks: Rebel.Array.t(sinkT('a)), 625 - mutable talkback: (. talkbackT) => unit, 626 - mutable gotSignal: bool, 627 - }; 628 - 629 - [@genType] 630 - let share = (source: sourceT('a)): sourceT('a) => { 631 - let state = { 632 - sinks: Rebel.Array.makeEmpty(), 633 - talkback: talkbackPlaceholder, 634 - gotSignal: false, 635 - }; 636 - 637 - sink => { 638 - state.sinks = Rebel.Array.append(state.sinks, sink); 639 - 640 - if (Rebel.Array.size(state.sinks) === 1) { 641 - source((. signal) => 642 - switch (signal) { 643 - | Push(_) => 644 - state.gotSignal = false; 645 - Rebel.Array.forEach(state.sinks, sink => sink(. signal)); 646 - | Start(x) => state.talkback = x 647 - | End => 648 - Rebel.Array.forEach(state.sinks, sink => sink(. End)); 649 - state.sinks = Rebel.Array.makeEmpty(); 650 - } 651 - ); 652 - }; 653 - 654 - sink(. 655 - Start( 656 - (. signal) => 657 - switch (signal) { 658 - | Close => 659 - state.sinks = Rebel.Array.filter(state.sinks, x => x !== sink); 660 - if (Rebel.Array.size(state.sinks) === 0) { 661 - state.talkback(. Close); 662 - }; 663 - | Pull when !state.gotSignal => 664 - state.gotSignal = true; 665 - state.talkback(. signal); 666 - | Pull => () 667 - }, 668 - ), 669 - ); 670 - }; 671 - }; 672 - 673 - type skipStateT = { 674 - mutable talkback: (. talkbackT) => unit, 675 - mutable rest: int, 676 - }; 677 - 678 - [@genType] 679 - let skip = (wait: int): operatorT('a, 'a) => 680 - curry(source => 681 - curry(sink => { 682 - let state: skipStateT = {talkback: talkbackPlaceholder, rest: wait}; 683 - 684 - source((. signal) => 685 - switch (signal) { 686 - | Start(tb) => 687 - state.talkback = tb; 688 - sink(. signal); 689 - | Push(_) when state.rest > 0 => 690 - state.rest = state.rest - 1; 691 - state.talkback(. Pull); 692 - | _ => sink(. signal) 693 - } 694 - ); 695 - }) 696 - ); 697 - 698 - type skipUntilStateT = { 699 - mutable sourceTalkback: (. talkbackT) => unit, 700 - mutable notifierTalkback: (. talkbackT) => unit, 701 - mutable skip: bool, 702 - mutable pulled: bool, 703 - mutable ended: bool, 704 - }; 705 - 706 - [@genType] 707 - let skipUntil = (notifier: sourceT('a)): operatorT('b, 'b) => 708 - curry(source => 709 - curry(sink => { 710 - let state: skipUntilStateT = { 711 - sourceTalkback: talkbackPlaceholder, 712 - notifierTalkback: talkbackPlaceholder, 713 - skip: true, 714 - pulled: false, 715 - ended: false, 716 - }; 717 - 718 - source((. signal) => { 719 - switch (signal) { 720 - | Start(tb) => 721 - state.sourceTalkback = tb; 722 - 723 - notifier((. signal) => { 724 - switch (signal) { 725 - | Start(innerTb) => 726 - state.notifierTalkback = innerTb; 727 - innerTb(. Pull); 728 - | Push(_) => 729 - state.skip = false; 730 - state.notifierTalkback(. Close); 731 - | End when state.skip => 732 - state.ended = true; 733 - state.sourceTalkback(. Close); 734 - | End => () 735 - }; 736 - (); 737 - }); 738 - | Push(_) when !state.skip && !state.ended => 739 - state.pulled = false; 740 - sink(. signal); 741 - | Push(_) when !state.pulled => 742 - state.pulled = true; 743 - state.sourceTalkback(. Pull); 744 - state.notifierTalkback(. Pull); 745 - | Push(_) => state.pulled = false 746 - | End => 747 - if (state.skip) { 748 - state.notifierTalkback(. Close); 749 - }; 750 - state.ended = true; 751 - sink(. End); 752 - }; 753 - (); 754 - }); 755 - 756 - sink(. 757 - Start( 758 - (. signal) => 759 - if (!state.ended) { 760 - switch (signal) { 761 - | Close => 762 - state.ended = true; 763 - state.sourceTalkback(. Close); 764 - if (state.skip) { 765 - state.notifierTalkback(. Close); 766 - }; 767 - | Pull when !state.pulled => 768 - state.pulled = true; 769 - if (state.skip) { 770 - state.notifierTalkback(. Pull); 771 - }; 772 - state.sourceTalkback(. Pull); 773 - | Pull => () 774 - }; 775 - }, 776 - ), 777 - ); 778 - }) 779 - ); 780 - 781 - type skipWhileStateT = { 782 - mutable talkback: (. talkbackT) => unit, 783 - mutable skip: bool, 784 - }; 785 - 786 - [@genType] 787 - let skipWhile = (f: (. 'a) => bool): operatorT('a, 'a) => 788 - curry(source => 789 - curry(sink => { 790 - let state: skipWhileStateT = { 791 - talkback: talkbackPlaceholder, 792 - skip: true, 793 - }; 794 - 795 - source((. signal) => 796 - switch (signal) { 797 - | Start(tb) => 798 - state.talkback = tb; 799 - sink(. signal); 800 - | Push(x) when state.skip => 801 - if (f(. x)) { 802 - state.talkback(. Pull); 803 - } else { 804 - state.skip = false; 805 - sink(. signal); 806 - } 807 - | _ => sink(. signal) 808 - } 809 - ); 810 - }) 811 - ); 812 - 813 - type switchMapStateT('a) = { 814 - mutable outerTalkback: (. talkbackT) => unit, 815 - mutable outerPulled: bool, 816 - mutable innerTalkback: (. talkbackT) => unit, 817 - mutable innerActive: bool, 818 - mutable innerPulled: bool, 819 - mutable ended: bool, 820 - }; 821 - 822 - [@genType] 823 - let switchMap = (f: (. 'a) => sourceT('b)): operatorT('a, 'b) => 824 - curry(source => 825 - curry(sink => { 826 - let state: switchMapStateT('a) = { 827 - outerTalkback: talkbackPlaceholder, 828 - outerPulled: false, 829 - innerTalkback: talkbackPlaceholder, 830 - innerActive: false, 831 - innerPulled: false, 832 - ended: false, 833 - }; 834 - 835 - let applyInnerSource = innerSource => { 836 - state.innerActive = true; 837 - innerSource((. signal) => 838 - if (state.innerActive) { 839 - switch (signal) { 840 - | Start(tb) => 841 - state.innerTalkback = tb; 842 - state.innerPulled = false; 843 - tb(. Pull); 844 - | Push(_) => 845 - sink(. signal); 846 - if (!state.innerPulled) { 847 - state.innerTalkback(. Pull); 848 - } else { 849 - state.innerPulled = false; 850 - }; 851 - | End => 852 - state.innerActive = false; 853 - if (state.ended) { 854 - sink(. signal); 855 - } else if (!state.outerPulled) { 856 - state.outerPulled = true; 857 - state.outerTalkback(. Pull); 858 - }; 859 - }; 860 - } 861 - ); 862 - (); 863 - }; 864 - 865 - source((. signal) => { 866 - switch (signal) { 867 - | Start(tb) => state.outerTalkback = tb 868 - | Push(x) when !state.ended => 869 - if (state.innerActive) { 870 - state.innerTalkback(. Close); 871 - state.innerTalkback = talkbackPlaceholder; 872 - }; 873 - 874 - if (!state.outerPulled) { 875 - state.outerPulled = true; 876 - state.outerTalkback(. Pull); 877 - } else { 878 - state.outerPulled = false; 879 - }; 880 - 881 - applyInnerSource(f(. x)); 882 - | Push(_) => () 883 - | End when !state.ended => 884 - state.ended = true; 885 - if (!state.innerActive) { 886 - sink(. End); 887 - }; 888 - | End => () 889 - }; 890 - (); 891 - }); 892 - 893 - sink(. 894 - Start( 895 - (. signal) => 896 - switch (signal) { 897 - | Pull => 898 - if (!state.ended && !state.outerPulled) { 899 - state.outerPulled = true; 900 - state.outerTalkback(. Pull); 901 - }; 902 - if (state.innerActive && !state.innerPulled) { 903 - state.innerPulled = true; 904 - state.innerTalkback(. Pull); 905 - }; 906 - | Close => 907 - if (!state.ended) { 908 - state.ended = true; 909 - state.outerTalkback(. Close); 910 - }; 911 - if (state.innerActive) { 912 - state.innerActive = false; 913 - state.innerTalkback(. Close); 914 - }; 915 - }, 916 - ), 917 - ); 918 - }) 919 - ); 920 - 921 - [@genType] 922 - let switchAll = (source: sourceT(sourceT('a))): sourceT('a) => 923 - switchMap((. x) => x, source); 924 - 925 - type takeStateT = { 926 - mutable ended: bool, 927 - mutable taken: int, 928 - mutable talkback: (. talkbackT) => unit, 929 - }; 930 - 931 - [@genType] 932 - let take = (max: int): operatorT('a, 'a) => 933 - curry(source => 934 - curry(sink => { 935 - let state: takeStateT = { 936 - ended: false, 937 - taken: 0, 938 - talkback: talkbackPlaceholder, 939 - }; 940 - 941 - source((. signal) => 942 - switch (signal) { 943 - | Start(tb) when max <= 0 => 944 - state.ended = true; 945 - sink(. End); 946 - tb(. Close); 947 - | Start(tb) => state.talkback = tb 948 - | Push(_) when state.taken < max && !state.ended => 949 - state.taken = state.taken + 1; 950 - sink(. signal); 951 - if (!state.ended && state.taken >= max) { 952 - state.ended = true; 953 - sink(. End); 954 - state.talkback(. Close); 955 - }; 956 - | Push(_) => () 957 - | End when !state.ended => 958 - state.ended = true; 959 - sink(. End); 960 - | End => () 961 - } 962 - ); 963 - 964 - sink(. 965 - Start( 966 - (. signal) => 967 - if (!state.ended) { 968 - switch (signal) { 969 - | Pull when state.taken < max => state.talkback(. Pull) 970 - | Pull => () 971 - | Close => 972 - state.ended = true; 973 - state.talkback(. Close); 974 - }; 975 - }, 976 - ), 977 - ); 978 - }) 979 - ); 980 - 981 - type takeLastStateT('a) = { 982 - mutable queue: Rebel.MutableQueue.t('a), 983 - mutable talkback: (. talkbackT) => unit, 984 - }; 985 - 986 - [@genType] 987 - let takeLast = (max: int): operatorT('a, 'a) => 988 - curry(source => 989 - curry(sink => { 990 - let state: takeLastStateT('a) = { 991 - queue: Rebel.MutableQueue.make(), 992 - talkback: talkbackPlaceholder, 993 - }; 994 - 995 - source((. signal) => { 996 - switch (signal) { 997 - | Start(talkback) when max <= 0 => 998 - talkback(. Close); 999 - Wonka_sources.empty(sink); 1000 - | Start(talkback) => 1001 - state.talkback = talkback; 1002 - talkback(. Pull); 1003 - | Push(x) => 1004 - let size = Rebel.MutableQueue.size(state.queue); 1005 - if (size >= max && max > 0) { 1006 - ignore(Rebel.MutableQueue.pop(state.queue)); 1007 - }; 1008 - 1009 - Rebel.MutableQueue.add(state.queue, x); 1010 - state.talkback(. Pull); 1011 - | End => 1012 - Wonka_sources.fromArray( 1013 - Rebel.MutableQueue.toArray(state.queue), 1014 - sink, 1015 - ) 1016 - }; 1017 - (); 1018 - }); 1019 - }) 1020 - ); 1021 - 1022 - type takeUntilStateT = { 1023 - mutable ended: bool, 1024 - mutable sourceTalkback: (. talkbackT) => unit, 1025 - mutable notifierTalkback: (. talkbackT) => unit, 1026 - }; 1027 - 1028 - [@genType] 1029 - let takeUntil = (notifier: sourceT('a)): operatorT('b, 'b) => 1030 - curry(source => 1031 - curry(sink => { 1032 - let state: takeUntilStateT = { 1033 - ended: false, 1034 - sourceTalkback: talkbackPlaceholder, 1035 - notifierTalkback: talkbackPlaceholder, 1036 - }; 1037 - 1038 - source((. signal) => { 1039 - switch (signal) { 1040 - | Start(tb) => 1041 - state.sourceTalkback = tb; 1042 - 1043 - notifier((. signal) => { 1044 - switch (signal) { 1045 - | Start(innerTb) => 1046 - state.notifierTalkback = innerTb; 1047 - innerTb(. Pull); 1048 - | Push(_) => 1049 - state.ended = true; 1050 - state.sourceTalkback(. Close); 1051 - sink(. End); 1052 - | End => () 1053 - }; 1054 - (); 1055 - }); 1056 - | End when !state.ended => 1057 - state.ended = true; 1058 - state.notifierTalkback(. Close); 1059 - sink(. End); 1060 - | End => () 1061 - | Push(_) when !state.ended => sink(. signal) 1062 - | Push(_) => () 1063 - }; 1064 - (); 1065 - }); 1066 - 1067 - sink(. 1068 - Start( 1069 - (. signal) => 1070 - if (!state.ended) { 1071 - switch (signal) { 1072 - | Close => 1073 - state.ended = true; 1074 - state.sourceTalkback(. Close); 1075 - state.notifierTalkback(. Close); 1076 - | Pull => state.sourceTalkback(. Pull) 1077 - }; 1078 - }, 1079 - ), 1080 - ); 1081 - }) 1082 - ); 1083 - 1084 - type takeWhileStateT = { 1085 - mutable talkback: (. talkbackT) => unit, 1086 - mutable ended: bool, 1087 - }; 1088 - 1089 - [@genType] 1090 - let takeWhile = (f: (. 'a) => bool): operatorT('a, 'a) => 1091 - curry(source => 1092 - curry(sink => { 1093 - let state: takeWhileStateT = { 1094 - talkback: talkbackPlaceholder, 1095 - ended: false, 1096 - }; 1097 - 1098 - source((. signal) => 1099 - switch (signal) { 1100 - | Start(tb) => 1101 - state.talkback = tb; 1102 - sink(. signal); 1103 - | End when !state.ended => 1104 - state.ended = true; 1105 - sink(. End); 1106 - | End => () 1107 - | Push(x) when !state.ended => 1108 - if (!f(. x)) { 1109 - state.ended = true; 1110 - sink(. End); 1111 - state.talkback(. Close); 1112 - } else { 1113 - sink(. signal); 1114 - } 1115 - | Push(_) => () 1116 - } 1117 - ); 1118 - }) 1119 - );
-86
src/Wonka_sinks.re
··· 1 - open Wonka_types; 2 - open Wonka_helpers; 3 - 4 - type subscribeStateT = { 5 - mutable talkback: (. talkbackT) => unit, 6 - mutable ended: bool, 7 - }; 8 - 9 - [@genType] 10 - type subscribeConsumerT('a) = sourceT('a) => subscriptionT; 11 - 12 - [@genType] 13 - let subscribe = (f: (. 'a) => unit): subscribeConsumerT('a) => 14 - curry(source => { 15 - let state: subscribeStateT = { 16 - talkback: talkbackPlaceholder, 17 - ended: false, 18 - }; 19 - 20 - source((. signal) => 21 - switch (signal) { 22 - | Start(x) => 23 - state.talkback = x; 24 - x(. Pull); 25 - | Push(x) when !state.ended => 26 - f(. x); 27 - state.talkback(. Pull); 28 - | Push(_) => () 29 - | End => state.ended = true 30 - } 31 - ); 32 - 33 - { 34 - unsubscribe: () => 35 - if (!state.ended) { 36 - state.ended = true; 37 - state.talkback(. Close); 38 - }, 39 - }; 40 - }); 41 - 42 - [@genType] 43 - type forEachConsumerT('a) = sourceT('a) => unit; 44 - 45 - [@genType] 46 - let forEach = (f: (. 'a) => unit): forEachConsumerT('a) => 47 - curry(source => ignore(subscribe(f, source))); 48 - 49 - [@genType] 50 - let publish = (source: sourceT('a)): subscriptionT => 51 - subscribe((. _) => (), source); 52 - 53 - type toArrayStateT('a) = { 54 - values: Rebel.MutableQueue.t('a), 55 - mutable talkback: (. talkbackT) => unit, 56 - mutable value: option('a), 57 - mutable ended: bool, 58 - }; 59 - 60 - [@genType] 61 - let toArray = (source: sourceT('a)): array('a) => { 62 - let state: toArrayStateT('a) = { 63 - values: Rebel.MutableQueue.make(), 64 - talkback: talkbackPlaceholder, 65 - value: None, 66 - ended: false, 67 - }; 68 - 69 - source((. signal) => 70 - switch (signal) { 71 - | Start(x) => 72 - state.talkback = x; 73 - x(. Pull); 74 - | Push(value) => 75 - Rebel.MutableQueue.add(state.values, value); 76 - state.talkback(. Pull); 77 - | End => state.ended = true 78 - } 79 - ); 80 - 81 - if (!state.ended) { 82 - state.talkback(. Close); 83 - }; 84 - 85 - Rebel.MutableQueue.toArray(state.values); 86 - };
-193
src/Wonka_sources.re
··· 1 - open Wonka_types; 2 - open Wonka_helpers; 3 - 4 - type trampolineT('a) = { 5 - mutable ended: bool, 6 - mutable looping: bool, 7 - mutable pulled: bool, 8 - mutable current: 'a, 9 - }; 10 - 11 - [@genType] 12 - let fromArray = (arr: array('a)): sourceT('a) => 13 - curry(sink => { 14 - let size = Rebel.Array.size(arr); 15 - let state = {ended: false, looping: false, pulled: false, current: 0}; 16 - 17 - sink(. 18 - Start( 19 - (. signal) => 20 - switch (signal, state.looping) { 21 - | (Pull, false) => 22 - state.pulled = true; 23 - state.looping = true; 24 - 25 - while (state.pulled && !state.ended) { 26 - if (state.current < size) { 27 - let x = Rebel.Array.getUnsafe(arr, state.current); 28 - state.current = state.current + 1; 29 - state.pulled = false; 30 - sink(. Push(x)); 31 - } else { 32 - state.ended = true; 33 - sink(. End); 34 - }; 35 - }; 36 - 37 - state.looping = false; 38 - | (Pull, true) => state.pulled = true 39 - | (Close, _) => state.ended = true 40 - }, 41 - ), 42 - ); 43 - }); 44 - 45 - [@genType] 46 - let fromList = (ls: list('a)): sourceT('a) => 47 - curry(sink => { 48 - let state = {ended: false, looping: false, pulled: false, current: ls}; 49 - 50 - sink(. 51 - Start( 52 - (. signal) => 53 - switch (signal, state.looping) { 54 - | (Pull, false) => 55 - state.pulled = true; 56 - state.looping = true; 57 - 58 - while (state.pulled && !state.ended) { 59 - switch (state.current) { 60 - | [x, ...rest] => 61 - state.current = rest; 62 - state.pulled = false; 63 - sink(. Push(x)); 64 - | [] => 65 - state.ended = true; 66 - sink(. End); 67 - }; 68 - }; 69 - 70 - state.looping = false; 71 - | (Pull, true) => state.pulled = true 72 - | (Close, _) => state.ended = true 73 - }, 74 - ), 75 - ); 76 - }); 77 - 78 - [@genType] 79 - let fromValue = (x: 'a): sourceT('a) => 80 - curry(sink => { 81 - let ended = ref(false); 82 - 83 - sink(. 84 - Start( 85 - (. signal) => 86 - switch (signal) { 87 - | Pull when ! ended^ => 88 - ended := true; 89 - sink(. Push(x)); 90 - sink(. End); 91 - | Pull => () 92 - | Close => ended := true 93 - }, 94 - ), 95 - ); 96 - }); 97 - 98 - type makeStateT = { 99 - mutable teardown: (. unit) => unit, 100 - mutable ended: bool, 101 - }; 102 - 103 - [@genType] 104 - let make = (f: (. observerT('a)) => teardownT): sourceT('a) => 105 - curry(sink => { 106 - let state: makeStateT = {teardown: (.) => (), ended: false}; 107 - 108 - state.teardown = 109 - f(. { 110 - next: value => 111 - if (!state.ended) { 112 - sink(. Push(value)); 113 - }, 114 - complete: () => 115 - if (!state.ended) { 116 - state.ended = true; 117 - sink(. End); 118 - }, 119 - }); 120 - 121 - sink(. 122 - Start( 123 - (. signal) => 124 - switch (signal) { 125 - | Close when !state.ended => 126 - state.ended = true; 127 - state.teardown(.); 128 - | _ => () 129 - }, 130 - ), 131 - ); 132 - }); 133 - 134 - type subjectState('a) = { 135 - mutable sinks: Rebel.Array.t(sinkT('a)), 136 - mutable ended: bool, 137 - }; 138 - 139 - [@genType] 140 - let makeSubject = (): subjectT('a) => { 141 - let state: subjectState('a) = { 142 - sinks: Rebel.Array.makeEmpty(), 143 - ended: false, 144 - }; 145 - 146 - let source = sink => { 147 - state.sinks = Rebel.Array.append(state.sinks, sink); 148 - sink(. 149 - Start( 150 - (. signal) => 151 - switch (signal) { 152 - | Close => 153 - state.sinks = Rebel.Array.filter(state.sinks, x => x !== sink) 154 - | _ => () 155 - }, 156 - ), 157 - ); 158 - }; 159 - 160 - let next = value => 161 - if (!state.ended) { 162 - Rebel.Array.forEach(state.sinks, sink => sink(. Push(value))); 163 - }; 164 - 165 - let complete = () => 166 - if (!state.ended) { 167 - state.ended = true; 168 - Rebel.Array.forEach(state.sinks, sink => sink(. End)); 169 - }; 170 - 171 - {source, next, complete}; 172 - }; 173 - 174 - [@genType] 175 - let empty = (sink: sinkT('a)): unit => { 176 - let ended = ref(false); 177 - sink(. 178 - Start( 179 - (. signal) => { 180 - switch (signal) { 181 - | Close => ended := true 182 - | Pull when ! ended^ => sink(. End) 183 - | _ => () 184 - } 185 - }, 186 - ), 187 - ); 188 - }; 189 - 190 - [@genType] 191 - let never = (sink: sinkT('a)): unit => { 192 - sink(. Start(talkbackPlaceholder)); 193 - };
-72
src/Wonka_types.re
··· 1 - /* A sink has the signature: `signalT('a) => unit` 2 - * A source thus has the signature: `sink => unit`, or `(signalT('a) => unit) => unit` 3 - * 4 - * Effectively a sink is a callback receiving signals as its first argument. 5 - * - Start(talkback) will be carrying a talkback using which the sink can attempt 6 - * to pull values (Pull) or request the source to end its stream (End) 7 - * - Push(payload) carries a value that the source sends to the sink. 8 - * This can happen at any time, since a source can be both pullable or 9 - * merely listenable. 10 - * - End signifies the end of the source stream, be it because of a talkback (End) 11 - * or because the source is exhausted. 12 - * 13 - * In detail, a talkback is simply a callback that receives a talkback signal as 14 - * its first argument. It's thus typically anonymously created by the source. 15 - * 16 - * A source is a factory that accepts a sink. Calling a source with a sink will 17 - * instantiate and initiate the source's stream, after which the source sends the sink 18 - * a talkback (Start(talkback)). This is called the "handshake". 19 - * 20 - * Typically an operator factory won't call the source with a sink it receives 21 - * immediately—because this would cause the operator to simply be a noop—but instead 22 - * it will create an intermediate sink with the same signature to perform its own 23 - * logic. 24 - * 25 - * At that point the operator can for instance intercept the talkback for its own 26 - * purposes, or call the actual sink as it sees fit. 27 - */ 28 - 29 - [@genType.import "./shims/Js.shim"] 30 - type talkbackT = 31 - | Pull 32 - | Close; 33 - 34 - [@genType.import "./shims/Js.shim"] 35 - type signalT('a) = 36 - | Start((. talkbackT) => unit) 37 - | Push('a) 38 - | End; 39 - 40 - [@genType] 41 - type sinkT('a) = (. signalT('a)) => unit; 42 - 43 - [@genType] 44 - type sourceT('a) = sinkT('a) => unit; 45 - 46 - [@genType] 47 - type operatorT('a, 'b) = sourceT('a) => sourceT('b); 48 - 49 - [@genType] 50 - type teardownT = (. unit) => unit; 51 - 52 - [@genType] 53 - type subscriptionT = {unsubscribe: unit => unit}; 54 - 55 - [@genType] 56 - type observerT('a) = { 57 - next: 'a => unit, 58 - complete: unit => unit, 59 - }; 60 - 61 - [@genType] 62 - type subjectT('a) = { 63 - source: sourceT('a), 64 - next: 'a => unit, 65 - complete: unit => unit, 66 - }; 67 - 68 - /* Sinks and sources need to explicitly be their own callbacks; 69 - * This means that currying needs to be forced for Bucklescript 70 - * not to optimise them away 71 - */ 72 - external curry: 'a => 'a = "%identity";
-1
src/dune/Rebel.re
··· 1 - include Rebel_native;
-4
src/dune/Wonka.re
··· 1 - module Types = Wonka_types; 2 - include Wonka_sources; 3 - include Wonka_operators; 4 - include Wonka_sinks;
-9
src/dune/dune
··· 1 - (library 2 - (name wonka) 3 - (public_name wonka) 4 - (libraries belt) 5 - (preprocess (pps belt.ppx))) 6 - 7 - (copy_files ../include/rebel_native/*.{re,rei}) 8 - (copy_files ../Wonka_*.{re,rei}) 9 - (copy_files ../helpers/Wonka_*.{re,rei})
-27
src/helpers/Wonka_deriving.ts
··· 1 - import { talkbackPlaceholder } from './Wonka_helpers.bs'; 2 - 3 - import { 4 - talkbackT, 5 - signalT 6 - } from '../Wonka_types.gen'; 7 - 8 - type talkbackCb = (tb: talkbackT) => void; 9 - 10 - export const pull: talkbackT = 0; 11 - export const close: talkbackT = 1; 12 - 13 - export const start = <a>(tb: talkbackCb): signalT<a> => ({TAG: 0, "_0": tb}); 14 - export const push = <a>(x: a): signalT<a> => ({TAG: 1, "_0": x}); 15 - export const end = <a>(): signalT<a> => 0; 16 - 17 - export const isStart = <a>(s: signalT<a>) => 18 - typeof s !== 'number' && s.TAG === 0; 19 - export const isPush = <a>(s: signalT<a>) => 20 - typeof s !== 'number' && s.TAG === 1; 21 - export const isEnd = <a>(s: signalT<a>) => 22 - typeof s === 'number' && s === 0; 23 - 24 - export const unboxPush = <a>(s: signalT<a>): a | null => 25 - isPush(s) ? s["_0"] : null; 26 - export const unboxStart = <a>(s: signalT<a>): talkbackCb => 27 - isStart(s) ? s["_0"] : (talkbackPlaceholder as any);
-9
src/helpers/Wonka_flow_test.js
··· 1 - // @flow 2 - 3 - import * as Wonka from '../../'; 4 - 5 - Wonka.pipe( 6 - Wonka.fromArray([1, 2, 3]), 7 - Wonka.map(x => x * 2), 8 - Wonka.publish 9 - );
-3
src/helpers/Wonka_helpers.re
··· 1 - open Wonka_types; 2 - 3 - let talkbackPlaceholder = (. _: talkbackT) => ();
-161
src/helpers/pipe.ts
··· 1 - import { sourceT as Source } from '../Wonka_types.gen'; 2 - 3 - interface UnaryFn<T, R> { 4 - (source: T): R; 5 - } 6 - 7 - /* pipe definitions for source + operators composition */ 8 - 9 - function pipe<T, A>(source: Source<T>, op1: UnaryFn<Source<T>, Source<A>>): Source<A>; 10 - 11 - function pipe<T, A, B>( 12 - source: Source<T>, 13 - op1: UnaryFn<Source<T>, Source<A>>, 14 - op2: UnaryFn<Source<A>, Source<B>> 15 - ): Source<B>; 16 - 17 - function pipe<T, A, B, C>( 18 - source: Source<T>, 19 - op1: UnaryFn<Source<T>, Source<A>>, 20 - op2: UnaryFn<Source<A>, Source<B>>, 21 - op3: UnaryFn<Source<B>, Source<C>> 22 - ): Source<C>; 23 - 24 - function pipe<T, A, B, C, D>( 25 - source: Source<T>, 26 - op1: UnaryFn<Source<T>, Source<A>>, 27 - op2: UnaryFn<Source<A>, Source<B>>, 28 - op3: UnaryFn<Source<B>, Source<C>>, 29 - op4: UnaryFn<Source<C>, Source<D>> 30 - ): Source<D>; 31 - 32 - function pipe<T, A, B, C, D, E>( 33 - source: Source<T>, 34 - op1: UnaryFn<Source<T>, Source<A>>, 35 - op2: UnaryFn<Source<A>, Source<B>>, 36 - op3: UnaryFn<Source<B>, Source<C>>, 37 - op4: UnaryFn<Source<C>, Source<D>>, 38 - op5: UnaryFn<Source<D>, Source<E>> 39 - ): Source<E>; 40 - 41 - function pipe<T, A, B, C, D, E, F>( 42 - source: Source<T>, 43 - op1: UnaryFn<Source<T>, Source<A>>, 44 - op2: UnaryFn<Source<A>, Source<B>>, 45 - op3: UnaryFn<Source<B>, Source<C>>, 46 - op4: UnaryFn<Source<C>, Source<D>>, 47 - op5: UnaryFn<Source<D>, Source<E>>, 48 - op6: UnaryFn<Source<E>, Source<F>> 49 - ): Source<F>; 50 - 51 - function pipe<T, A, B, C, D, E, F, G>( 52 - source: Source<T>, 53 - op1: UnaryFn<Source<T>, Source<A>>, 54 - op2: UnaryFn<Source<A>, Source<B>>, 55 - op3: UnaryFn<Source<B>, Source<C>>, 56 - op4: UnaryFn<Source<C>, Source<D>>, 57 - op5: UnaryFn<Source<D>, Source<E>>, 58 - op6: UnaryFn<Source<E>, Source<F>>, 59 - op7: UnaryFn<Source<F>, Source<G>> 60 - ): Source<G>; 61 - 62 - function pipe<T, A, B, C, D, E, F, G, H>( 63 - source: Source<T>, 64 - op1: UnaryFn<Source<T>, Source<A>>, 65 - op2: UnaryFn<Source<A>, Source<B>>, 66 - op3: UnaryFn<Source<B>, Source<C>>, 67 - op4: UnaryFn<Source<C>, Source<D>>, 68 - op5: UnaryFn<Source<D>, Source<E>>, 69 - op6: UnaryFn<Source<E>, Source<F>>, 70 - op7: UnaryFn<Source<F>, Source<G>>, 71 - op8: UnaryFn<Source<G>, Source<H>> 72 - ): Source<H>; 73 - 74 - /* pipe definitions for source + operators + consumer composition */ 75 - 76 - function pipe<T, R>(source: Source<T>, consumer: UnaryFn<Source<T>, R>): R; 77 - 78 - function pipe<T, A, R>( 79 - source: Source<T>, 80 - op1: UnaryFn<Source<T>, Source<A>>, 81 - consumer: UnaryFn<Source<A>, R> 82 - ): R; 83 - 84 - function pipe<T, A, B, R>( 85 - source: Source<T>, 86 - op1: UnaryFn<Source<T>, Source<A>>, 87 - op2: UnaryFn<Source<A>, Source<B>>, 88 - consumer: UnaryFn<Source<B>, R> 89 - ): R; 90 - 91 - function pipe<T, A, B, C, R>( 92 - source: Source<T>, 93 - op1: UnaryFn<Source<T>, Source<A>>, 94 - op2: UnaryFn<Source<A>, Source<B>>, 95 - op3: UnaryFn<Source<B>, Source<C>>, 96 - consumer: UnaryFn<Source<C>, R> 97 - ): R; 98 - 99 - function pipe<T, A, B, C, D, R>( 100 - source: Source<T>, 101 - op1: UnaryFn<Source<T>, Source<A>>, 102 - op2: UnaryFn<Source<A>, Source<B>>, 103 - op3: UnaryFn<Source<B>, Source<C>>, 104 - op4: UnaryFn<Source<C>, Source<D>>, 105 - consumer: UnaryFn<Source<D>, R> 106 - ): R; 107 - 108 - function pipe<T, A, B, C, D, E, R>( 109 - source: Source<T>, 110 - op1: UnaryFn<Source<T>, Source<A>>, 111 - op2: UnaryFn<Source<A>, Source<B>>, 112 - op3: UnaryFn<Source<B>, Source<C>>, 113 - op4: UnaryFn<Source<C>, Source<D>>, 114 - op5: UnaryFn<Source<D>, Source<E>>, 115 - consumer: UnaryFn<Source<E>, R> 116 - ): R; 117 - 118 - function pipe<T, A, B, C, D, E, F, R>( 119 - source: Source<T>, 120 - op1: UnaryFn<Source<T>, Source<A>>, 121 - op2: UnaryFn<Source<A>, Source<B>>, 122 - op3: UnaryFn<Source<B>, Source<C>>, 123 - op4: UnaryFn<Source<C>, Source<D>>, 124 - op5: UnaryFn<Source<D>, Source<E>>, 125 - op6: UnaryFn<Source<E>, Source<F>>, 126 - consumer: UnaryFn<Source<F>, R> 127 - ): R; 128 - 129 - function pipe<T, A, B, C, D, E, F, G, R>( 130 - source: Source<T>, 131 - op1: UnaryFn<Source<T>, Source<A>>, 132 - op2: UnaryFn<Source<A>, Source<B>>, 133 - op3: UnaryFn<Source<B>, Source<C>>, 134 - op4: UnaryFn<Source<C>, Source<D>>, 135 - op5: UnaryFn<Source<D>, Source<E>>, 136 - op6: UnaryFn<Source<E>, Source<F>>, 137 - op7: UnaryFn<Source<F>, Source<G>>, 138 - consumer: UnaryFn<Source<G>, R> 139 - ): R; 140 - 141 - function pipe<T, A, B, C, D, E, F, G, H, R>( 142 - source: Source<T>, 143 - op1: UnaryFn<Source<T>, Source<A>>, 144 - op2: UnaryFn<Source<A>, Source<B>>, 145 - op3: UnaryFn<Source<B>, Source<C>>, 146 - op4: UnaryFn<Source<C>, Source<D>>, 147 - op5: UnaryFn<Source<D>, Source<E>>, 148 - op6: UnaryFn<Source<E>, Source<F>>, 149 - op7: UnaryFn<Source<F>, Source<G>>, 150 - op8: UnaryFn<Source<G>, Source<H>>, 151 - consumer: UnaryFn<Source<H>, R> 152 - ): R; 153 - 154 - function pipe() { 155 - let x = arguments[0]; 156 - for (let i = 1, l = arguments.length; i < l; i++) 157 - x = arguments[i](x); 158 - return x; 159 - } 160 - 161 - export { pipe };
-9
src/include/Rebel.ml
··· 1 - #if BS_NATIVE then 2 - #if BSB_BACKEND = "js" then 3 - include Rebel_js 4 - #else 5 - include Rebel_native 6 - #end 7 - #else 8 - include Rebel_js 9 - #end
-94
src/include/rebel_js/Array_js.re
··· 1 - type t('a) = array('a); 2 - 3 - [@bs.new] external makeEmpty: unit => t('a) = "Array"; 4 - [@bs.new] external makeUninitialized: int => t('a) = "Array"; 5 - 6 - [@bs.get] external size: t('a) => int = "length"; 7 - [@bs.get_index] external get: (t('a), int) => option('a) = ""; 8 - [@bs.get_index] external getUnsafe: (t('a), int) => 'a = ""; 9 - [@bs.set_index] external setUnsafe: (t('a), int, 'a) => unit = ""; 10 - 11 - [@bs.send] external fill: (t('a), 'a) => unit = "fill"; 12 - [@bs.send] external reverseInPlace: t('a) => unit = "reverse"; 13 - 14 - [@bs.send] external copy: t('a) => t('a) = "slice"; 15 - [@bs.send] 16 - external slice: (t('a), ~start: int, ~end_: int) => t('a) = "slice"; 17 - [@bs.send] external append: (t('a), 'a) => t('a) = "concat"; 18 - [@bs.send] external concat: (t('a), t('a)) => t('a) = "concat"; 19 - 20 - [@bs.send] external map: (t('a), 'a => 'b) => t('b) = "map"; 21 - [@bs.send] external mapi: (t('a), ('a, int) => 'b) => t('b) = "map"; 22 - [@bs.send] external some: (t('a), 'a => bool) => bool = "some"; 23 - [@bs.send] external somei: (t('a), ('a, int) => bool) => bool = "some"; 24 - [@bs.send] external every: (t('a), 'a => bool) => bool = "every"; 25 - [@bs.send] external everyi: (t('a), ('a, int) => bool) => bool = "every"; 26 - [@bs.send] external filter: (t('a), 'a => bool) => t('a) = "filter"; 27 - [@bs.send] external filteri: (t('a), ('a, int) => bool) => t('a) = "filter"; 28 - [@bs.send] external find: (t('a), 'a => bool) => option('a) = "find"; 29 - [@bs.send] external findi: (t('a), ('a, int) => bool) => option('a) = "find"; 30 - [@bs.send] external findIndex: (t('a), 'a => bool) => int = "findIndex"; 31 - [@bs.send] external forEach: (t('a), 'a => unit) => unit = "forEach"; 32 - [@bs.send] external forEachi: (t('a), ('a, int) => unit) => unit = "forEach"; 33 - [@bs.send] external reduce: (t('a), ('b, 'a) => 'b, 'b) => 'b = "reduce"; 34 - [@bs.send] 35 - external reduceRight: (t('a), ('b, 'a) => 'b, 'b) => 'b = "reduceRight"; 36 - 37 - [@bs.send] external indexOf: (t('a), 'a) => int = "indexOf"; 38 - [@bs.send] external lastIndexOf: (t('a), 'a) => int = "lastIndexOf"; 39 - 40 - /* No need to replicate what Belt already has */ 41 - let shuffle = Belt.Array.shuffle; 42 - let shuffleInPlace = Belt.Array.shuffleInPlace; 43 - 44 - let make = (len: int, vals: 'a): t('a) => { 45 - let res = makeUninitialized(len); 46 - fill(res, vals); 47 - res; 48 - }; 49 - 50 - let set = (arr: t('a), index: int, x: 'a) => 51 - if (index < size(arr) && index >= 0) { 52 - setUnsafe(arr, index, x); 53 - true; 54 - } else { 55 - false; 56 - }; 57 - 58 - let reverse = (arr: t('a)): t('a) => { 59 - let res = copy(arr); 60 - reverseInPlace(arr); 61 - res; 62 - }; 63 - 64 - let includes = (arr: t('a), x: 'a): bool => indexOf(arr, x) > (-1); 65 - 66 - [@bs.send] external removeInPlace: (t('a), int) => t('a) = "splice"; 67 - [@bs.send] 68 - external removeCountInPlace: (t('a), ~pos: int, ~count: int) => t('a) = 69 - "splice"; 70 - 71 - let remove = (arr: t('a), pos: int) => removeInPlace(copy(arr), pos); 72 - 73 - let removeCount = (arr: t('a), ~pos: int, ~count: int) => 74 - removeCountInPlace(copy(arr), ~pos, ~count); 75 - 76 - module Js = { 77 - [@bs.send] external push: (t('a), 'a) => unit = "push"; 78 - [@bs.send] external pop: t('a) => option('a) = "pop"; 79 - [@bs.send] external unshift: (t('a), 'a) => unit = "unshift"; 80 - [@bs.send] external shift: t('a) => option('a) = "shift"; 81 - 82 - [@bs.scope ("Array", "prototype", "push")] [@bs.val] 83 - external pushMany: (t('a), t('a)) => unit = "apply"; 84 - [@bs.scope ("Array", "prototype", "unshift")] [@bs.val] 85 - external unshiftMany: (t('a), t('a)) => unit = "apply"; 86 - 87 - [@bs.send] 88 - external spliceInPlace: 89 - (t('a), ~pos: int, ~remove: int, ~add: t('a)) => t('a) = 90 - "splice"; 91 - 92 - let splice = (arr: t('a), ~pos: int, ~remove: int, ~add: t('a)) => 93 - spliceInPlace(copy(arr), ~pos, ~remove, ~add); 94 - };
-31
src/include/rebel_js/MutableQueue_js.re
··· 1 - type t('a) = array('a); 2 - 3 - external fromArray: array('a) => t('a) = "%identity"; 4 - external toArray: t('a) => array('a) = "%identity"; 5 - [@bs.new] external make: unit => t('a) = "Array"; 6 - [@bs.set] external clear: (t('a), [@bs.as 0] _) => unit = "length"; 7 - [@bs.send] external add: (t('a), 'a) => unit = "push"; 8 - [@bs.get] external peek: t('a) => option('a) = "0"; 9 - [@bs.send] external pop: t('a) => option('a) = "shift"; 10 - [@bs.send] external copy: t('a) => t('a) = "slice"; 11 - [@bs.get] external size: t('a) => int = "length"; 12 - [@bs.send] external mapU: (t('a), (. 'a) => 'b) => t('b) = "map"; 13 - [@bs.send] external map: (t('a), 'a => 'b) => t('b) = "map"; 14 - [@bs.send] external forEachU: (t('a), (. 'a) => unit) => unit = "forEach"; 15 - [@bs.send] external forEach: (t('a), 'a => unit) => unit = "forEach"; 16 - 17 - let isEmpty = (q: t('a)): bool => size(q) === 0; 18 - 19 - let reduceU = (q: t('a), accu: 'b, f: (. 'b, 'a) => 'b): 'b => 20 - Js.Array.reduce((acc, x) => f(. acc, x), accu, q); 21 - 22 - let reduce = (q: t('a), accu: 'b, f: ('b, 'a) => 'b): 'b => 23 - Js.Array.reduce(f, accu, q); 24 - 25 - [@bs.scope ("Array", "prototype", "push")] [@bs.val] 26 - external addMany: (t('a), t('a)) => unit = "apply"; 27 - 28 - let transfer = (q1: t('a), q2: t('a)) => { 29 - addMany(q1, q2); 30 - clear(q1); 31 - };
-19
src/include/rebel_js/MutableStack_js.re
··· 1 - type t('a) = array('a); 2 - 3 - module Helpers = { 4 - [@bs.get_index] external get: (t('a), int) => option('a) = ""; 5 - }; 6 - 7 - [@bs.new] external make: unit => t('a) = "Array"; 8 - [@bs.set] external clear: (t('a), [@bs.as 0] _) => unit = "length"; 9 - [@bs.send] external push: (t('a), 'a) => unit = "push"; 10 - [@bs.send] external pop: t('a) => option('a) = "pop"; 11 - [@bs.send] external copy: t('a) => t('a) = "slice"; 12 - [@bs.get] external size: t('a) => int = "length"; 13 - [@bs.send] external forEachU: (t('a), (. 'a) => unit) => unit = "forEach"; 14 - [@bs.send] external forEach: (t('a), 'a => unit) => unit = "forEach"; 15 - 16 - let isEmpty = (stack: t('a)): bool => size(stack) === 0; 17 - 18 - let top = (stack: t('a)): option('a) => 19 - Helpers.get(stack, size(stack) - 1);
-3
src/include/rebel_js/Rebel_js.re
··· 1 - module Array = Array_js; 2 - module MutableStack = MutableStack_js; 3 - module MutableQueue = MutableQueue_js;
-166
src/include/rebel_native/Array_native.re
··· 1 - type t('a) = array('a); 2 - 3 - let makeEmpty = (): t('a) => [||]; 4 - let makeUninitialized = Belt.Array.makeUninitializedUnsafe; 5 - let make = Belt.Array.make; 6 - 7 - let size = Belt.Array.size; 8 - let get = Belt.Array.get; 9 - let getUnsafe = Belt.Array.getUnsafe; 10 - let set = Belt.Array.set; 11 - let setUnsafe = Belt.Array.setUnsafe; 12 - 13 - let fill = (arr: t('a), x: 'a) => 14 - Belt.Array.fill(arr, ~offset=0, ~len=size(arr), x); 15 - 16 - let reverseInPlace = Belt.Array.reverseInPlace; 17 - let reverse = Belt.Array.reverse; 18 - let shuffle = Belt.Array.shuffle; 19 - let shuffleInPlace = Belt.Array.shuffleInPlace; 20 - 21 - let copy = Belt.Array.copy; 22 - 23 - let slice = (arr: t('a), ~start: int, ~end_: int): t('a) => { 24 - let len = end_ - start; 25 - Belt.Array.slice(arr, ~offset=start, ~len); 26 - }; 27 - 28 - let concat = Belt.Array.concat; 29 - 30 - let append = (arr: t('a), x: 'a) => Belt.Array.concat(arr, [|x|]); 31 - 32 - let somei = (arr: t('a), f: ('a, int) => bool): bool => { 33 - let len = size(arr); 34 - let rec search = (i: int) => 35 - if (i >= len) { 36 - false; 37 - } else if (f(getUnsafe(arr, i), i)) { 38 - true; 39 - } else { 40 - search(i + 1); 41 - }; 42 - 43 - search(0); 44 - }; 45 - 46 - let everyi = (arr: t('a), f: ('a, int) => bool): bool => { 47 - let len = size(arr); 48 - let rec search = (i: int) => 49 - if (i >= len) { 50 - true; 51 - } else if (!f(getUnsafe(arr, i), i)) { 52 - false; 53 - } else { 54 - search(i + 1); 55 - }; 56 - 57 - search(0); 58 - }; 59 - 60 - let findi = (arr: t('a), f: ('a, int) => bool): option('a) => { 61 - let len = size(arr); 62 - let rec search = (i: int) => 63 - if (i >= len) { 64 - None; 65 - } else { 66 - let x = getUnsafe(arr, i); 67 - if (f(x, i)) { 68 - Some(x); 69 - } else { 70 - search(i + 1); 71 - }; 72 - }; 73 - 74 - search(0); 75 - }; 76 - 77 - let findIndex = (arr: t('a), f: 'a => bool): int => { 78 - let len = size(arr); 79 - let rec search = (i: int) => 80 - if (i >= len) { 81 - (-1); 82 - } else if (f(getUnsafe(arr, i))) { 83 - i; 84 - } else { 85 - search(i + 1); 86 - }; 87 - 88 - search(0); 89 - }; 90 - 91 - let lastIndexOf = (arr: t('a), x: 'a): int => { 92 - let len = size(arr); 93 - let rec search = (i: int) => 94 - if (i < 0) { 95 - (-1); 96 - } else if (x === getUnsafe(arr, i)) { 97 - i; 98 - } else { 99 - search(i - 1); 100 - }; 101 - 102 - search(len - 1); 103 - }; 104 - 105 - let filteri = (arr: t('a), f: ('a, int) => bool): t('a) => { 106 - let len = size(arr); 107 - let res: t('a) = copy(arr); 108 - let j = ref(-1); 109 - 110 - let rec filter = (i: int) => 111 - if (i >= len) { 112 - Array.sub(res, 0, j^ + 1); 113 - } else { 114 - let x = getUnsafe(arr, i); 115 - if (f(x, i)) { 116 - j := j^ + 1; 117 - Belt.Array.setUnsafe(arr, j^, x); 118 - }; 119 - 120 - filter(i + 1); 121 - }; 122 - 123 - filter(0); 124 - }; 125 - 126 - let removeCount = (arr: t('a), ~pos: int, ~count: int): t('a) => { 127 - let len = size(arr); 128 - let pos2 = pos + count - 1; 129 - let res = Array.sub(arr, 0, len - count); 130 - 131 - let rec copy = (i: int) => 132 - if (i >= len) { 133 - res; 134 - } else if (i >= pos && i <= pos2) { 135 - copy(i + 1); 136 - } else { 137 - let j = i > pos2 ? i - count : i; 138 - Belt.Array.setUnsafe(arr, j, Belt.Array.getUnsafe(arr, i)); 139 - copy(i + 1); 140 - }; 141 - 142 - copy(0); 143 - }; 144 - 145 - let find = (arr: t('a), f: 'a => bool): option('a) => 146 - findi(arr, (x, _i) => f(x)); 147 - let indexOf = (arr: t('a), x: 'a): int => findIndex(arr, item => item === x); 148 - let includes = (arr: t('a), x: 'a): bool => 149 - findIndex(arr, item => item === x) > (-1); 150 - let filter = (arr: t('a), f: 'a => bool): t('a) => 151 - filteri(arr, (x, _i) => f(x)); 152 - let remove = (arr: t('a), index: int): t('a) => 153 - removeCount(arr, ~pos=index, ~count=1); 154 - 155 - let some = Belt.Array.some; 156 - let every = Belt.Array.every; 157 - let map = Belt.Array.map; 158 - let mapi = (arr: t('a), f: ('a, int) => 'b): t('b) => 159 - Belt.Array.mapWithIndexU(arr, (. i, x) => f(x, i)); 160 - let forEach = Belt.Array.forEach; 161 - let forEachi = (arr: t('a), f: ('a, int) => unit): unit => 162 - Belt.Array.forEachWithIndexU(arr, (. i, x) => f(x, i)); 163 - let reduce = (arr: t('a), reducer: ('b, 'a) => 'b, acc: 'b): 'b => 164 - Belt.Array.reduce(arr, acc, reducer); 165 - let reduceRight = (arr: t('a), reducer: ('b, 'a) => 'b, acc: 'b): 'b => 166 - Belt.Array.reduceReverse(arr, acc, reducer);
-24
src/include/rebel_native/MutableQueue_native.re
··· 1 - type t('a) = Belt.MutableQueue.t('a); 2 - 3 - let fromArray = Belt.MutableQueue.fromArray; 4 - let toArray = Belt.MutableQueue.toArray; 5 - let make = Belt.MutableQueue.make; 6 - let clear = Belt.MutableQueue.clear; 7 - let add = Belt.MutableQueue.add; 8 - let peek = Belt.MutableQueue.peek; 9 - let pop = Belt.MutableQueue.pop; 10 - let copy = Belt.MutableQueue.copy; 11 - let size = Belt.MutableQueue.size; 12 - let mapU = Belt.MutableQueue.mapU; 13 - let map = Belt.MutableQueue.map; 14 - let forEachU = Belt.MutableQueue.forEachU; 15 - let forEach = Belt.MutableQueue.forEach; 16 - 17 - let isEmpty = Belt.MutableQueue.isEmpty; 18 - let reduceU = Belt.MutableQueue.reduceU; 19 - let reduce = Belt.MutableQueue.reduce; 20 - 21 - let addMany = (q1: t('a), q2: t('a)) => 22 - Belt.MutableQueue.transfer(copy(q1), q2); 23 - 24 - let transfer = Belt.MutableQueue.transfer;
-13
src/include/rebel_native/MutableStack_native.re
··· 1 - type t('a) = Belt.MutableStack.t('a); 2 - 3 - let make = Belt.MutableStack.make; 4 - let clear = Belt.MutableStack.clear; 5 - let push = Belt.MutableStack.push; 6 - let pop = Belt.MutableStack.pop; 7 - let copy = Belt.MutableStack.copy; 8 - let size = Belt.MutableStack.size; 9 - let forEachU = Belt.MutableStack.forEachU; 10 - let forEach = Belt.MutableStack.forEach; 11 - 12 - let isEmpty = Belt.MutableStack.isEmpty; 13 - let top = Belt.MutableStack.top;
-3
src/include/rebel_native/Rebel_native.re
··· 1 - module Array = Array_native; 2 - module MutableStack = MutableStack_native; 3 - module MutableQueue = MutableQueue_native;
-2
src/shims/Dom.shim.ts
··· 1 - export type element = HTMLElement; 2 - export type event = Event;
-31
src/shims/Js.shim.ts
··· 1 - export type Exn_t = Error; 2 - export type Internal_meth<_T, R> = () => R; 3 - 4 - export type talkbackT = 0 | 1; 5 - 6 - export type signalT<a> = 7 - | ({ TAG: 0, _0: (talkback: talkbackT) => void }) 8 - | ({ TAG: 1, _0: a }) 9 - | 0; 10 - 11 - export interface observableSubscriptionT { 12 - unsubscribe(): void; 13 - } 14 - 15 - export interface observableObserverT<a> { 16 - next(value: a): void; 17 - error(error: any): void; 18 - complete(): void; 19 - } 20 - 21 - export interface observableT<a> { 22 - subscribe(observer: observableObserverT<a>): observableSubscriptionT; 23 - } 24 - 25 - interface Callbag<I, O> { 26 - (t: 0, d: Callbag<O, I>): void; 27 - (t: 1, d: I): void; 28 - (t: 2, d?: any): void; 29 - } 30 - 31 - export type callbagT<a> = Callbag<void, a>;
-11
src/shims/ReasonPervasives.shim.ts
··· 1 - // tslint:disable-next-line:max-classes-per-file 2 - export abstract class EmptyList { 3 - protected opaque: any; 4 - } 5 - 6 - // tslint:disable-next-line:max-classes-per-file 7 - export abstract class Cons<T> { 8 - protected opaque!: T; 9 - } 10 - 11 - export type list<T> = Cons<T> | EmptyList;
-263
src/web/WonkaJs.re
··· 1 - open Wonka_types; 2 - 3 - [@genType] 4 - let fromObservable = Wonka_observable.fromObservable; 5 - [@genType] 6 - let toObservable = Wonka_observable.toObservable; 7 - 8 - [@genType] 9 - let fromCallbag = Wonka_callbag.fromCallbag; 10 - [@genType] 11 - let toCallbag = Wonka_callbag.toCallbag; 12 - 13 - /* operators */ 14 - 15 - type debounceStateT = { 16 - mutable id: option(Js.Global.timeoutId), 17 - mutable deferredEnded: bool, 18 - mutable ended: bool, 19 - }; 20 - 21 - [@genType] 22 - let debounce = (f: (. 'a) => int): operatorT('a, 'a) => 23 - curry(source => 24 - curry(sink => { 25 - let state: debounceStateT = { 26 - id: None, 27 - deferredEnded: false, 28 - ended: false, 29 - }; 30 - 31 - let clearTimeout = () => 32 - switch (state.id) { 33 - | Some(timeoutId) => 34 - state.id = None; 35 - Js.Global.clearTimeout(timeoutId); 36 - | None => () 37 - }; 38 - 39 - source((. signal) => 40 - switch (signal) { 41 - | Start(tb) => 42 - sink(. 43 - Start( 44 - (. signal) => 45 - if (!state.ended) { 46 - switch (signal) { 47 - | Close => 48 - state.ended = true; 49 - state.deferredEnded = false; 50 - clearTimeout(); 51 - tb(. Close); 52 - | Pull => tb(. Pull) 53 - }; 54 - }, 55 - ), 56 - ) 57 - | Push(x) when !state.ended => 58 - clearTimeout(); 59 - state.id = 60 - Some( 61 - Js.Global.setTimeout( 62 - () => { 63 - state.id = None; 64 - sink(. signal); 65 - if (state.deferredEnded) { 66 - sink(. End); 67 - }; 68 - }, 69 - f(. x), 70 - ), 71 - ); 72 - | Push(_) => () 73 - | End when !state.ended => 74 - state.ended = true; 75 - switch (state.id) { 76 - | Some(_) => state.deferredEnded = true 77 - | None => sink(. End) 78 - }; 79 - | End => () 80 - } 81 - ); 82 - }) 83 - ); 84 - 85 - [@genType] 86 - let delay = (wait: int): operatorT('a, 'a) => 87 - curry(source => 88 - curry(sink => { 89 - let active = ref(0); 90 - 91 - source((. signal) => 92 - switch (signal) { 93 - | Start(_) => sink(. signal) 94 - | _ => 95 - active := active^ + 1; 96 - ignore( 97 - Js.Global.setTimeout( 98 - () => 99 - if (active^ !== 0) { 100 - active := active^ - 1; 101 - sink(. signal); 102 - }, 103 - wait, 104 - ), 105 - ); 106 - } 107 - ); 108 - }) 109 - ); 110 - 111 - [@genType] 112 - let throttle = (f: (. 'a) => int): operatorT('a, 'a) => 113 - curry(source => 114 - curry(sink => { 115 - let skip = ref(false); 116 - let id: ref(option(Js.Global.timeoutId)) = ref(None); 117 - let clearTimeout = () => 118 - switch (id^) { 119 - | Some(timeoutId) => Js.Global.clearTimeout(timeoutId) 120 - | None => () 121 - }; 122 - 123 - source((. signal) => 124 - switch (signal) { 125 - | Start(tb) => 126 - sink(. 127 - Start( 128 - (. signal) => 129 - switch (signal) { 130 - | Close => 131 - clearTimeout(); 132 - tb(. Close); 133 - | _ => tb(. signal) 134 - }, 135 - ), 136 - ) 137 - | End => 138 - clearTimeout(); 139 - sink(. End); 140 - | Push(x) when ! skip^ => 141 - skip := true; 142 - clearTimeout(); 143 - id := 144 - Some( 145 - Js.Global.setTimeout( 146 - () => { 147 - id := None; 148 - skip := false; 149 - }, 150 - f(. x), 151 - ), 152 - ); 153 - sink(. signal); 154 - | Push(_) => () 155 - } 156 - ); 157 - }) 158 - ); 159 - 160 - /* sinks */ 161 - [@genType] 162 - let toPromise = (source: sourceT('a)): Js.Promise.t('a) => { 163 - Js.Promise.make((~resolve, ~reject as _) => { 164 - Wonka_operators.takeLast(1, source, (. signal) => 165 - switch (signal) { 166 - | Start(x) => x(. Pull) 167 - | Push(x) => resolve(. x) 168 - | End => () 169 - } 170 - ); 171 - (); 172 - }); 173 - }; 174 - 175 - /* sources */ 176 - [@genType] 177 - let interval = (p: int): sourceT(int) => 178 - curry(sink => { 179 - let i = ref(0); 180 - let id = 181 - Js.Global.setInterval( 182 - () => { 183 - let num = i^; 184 - i := i^ + 1; 185 - sink(. Push(num)); 186 - }, 187 - p, 188 - ); 189 - 190 - sink(. 191 - Start( 192 - (. signal) => 193 - switch (signal) { 194 - | Close => Js.Global.clearInterval(id) 195 - | _ => () 196 - }, 197 - ), 198 - ); 199 - }); 200 - 201 - [@genType] 202 - let fromDomEvent = (element: Dom.element, event: string): sourceT(Dom.event) => 203 - curry(sink => { 204 - let addEventListener: (Dom.element, string, Dom.event => unit) => unit = [%raw 205 - {| 206 - function (element, event, handler) { 207 - element.addEventListener(event, handler); 208 - } 209 - |} 210 - ]; 211 - 212 - let removeEventListener: (Dom.element, string, Dom.event => unit) => unit = [%raw 213 - {| 214 - function (element, event, handler) { 215 - element.removeEventListener(event, handler); 216 - } 217 - |} 218 - ]; 219 - 220 - let handler = event => sink(. Push(event)); 221 - 222 - sink(. 223 - Start( 224 - (. signal) => 225 - switch (signal) { 226 - | Close => removeEventListener(element, event, handler) 227 - | _ => () 228 - }, 229 - ), 230 - ); 231 - 232 - addEventListener(element, event, handler); 233 - }); 234 - 235 - [@genType] 236 - let fromPromise = (promise: Js.Promise.t('a)): sourceT('a) => 237 - curry(sink => { 238 - let ended = ref(false); 239 - 240 - ignore( 241 - Js.Promise.then_( 242 - value => { 243 - if (! ended^) { 244 - sink(. Push(value)); 245 - sink(. End); 246 - }; 247 - 248 - Js.Promise.resolve(); 249 - }, 250 - promise, 251 - ), 252 - ); 253 - 254 - sink(. 255 - Start( 256 - (. signal) => 257 - switch (signal) { 258 - | Close => ended := true 259 - | _ => () 260 - }, 261 - ), 262 - ); 263 - });
-65
src/web/Wonka_callbag.re
··· 1 - open Wonka_types; 2 - 3 - [@genType] 4 - type callbagSignal = 5 - | [@genType.as 0] CALLBAG_START /* 0 */ 6 - | [@genType.as 1] CALLBAG_DATA /* 1 */ 7 - | [@genType.as 2] CALLBAG_END /* 2 */; 8 - 9 - [@genType] 10 - type callbagData('a); 11 - 12 - [@genType] 13 - type callbagTalkback = (. callbagSignal) => unit; 14 - 15 - [@genType.import "../shims/Js.shim"] 16 - type callbagT('a) = (callbagSignal, callbagData('a)) => unit; 17 - 18 - external unsafe_getCallbag: callbagData('a) => callbagT('a) = "%identity"; 19 - external unsafe_getTalkback: callbagData('a) => callbagTalkback = "%identity"; 20 - external unsafe_getValue: callbagData('a) => 'a = "%identity"; 21 - external unsafe_wrap: 'any => callbagData('a) = "%identity"; 22 - 23 - [@genType] 24 - let fromCallbag = (callbag: callbagT('a)): sourceT('a) => 25 - curry(sink => { 26 - let wrappedSink = 27 - (. signal, data) => 28 - switch (signal) { 29 - | CALLBAG_START => 30 - let talkback = unsafe_getTalkback(data); 31 - let wrappedTalkback = ( 32 - (. talkbackSignal: talkbackT) => 33 - switch (talkbackSignal) { 34 - | Pull => talkback(. CALLBAG_DATA) 35 - | Close => talkback(. CALLBAG_END) 36 - } 37 - ); 38 - sink(. Start(wrappedTalkback)); 39 - | CALLBAG_DATA => sink(. Push(unsafe_getValue(data))) 40 - | CALLBAG_END => sink(. End) 41 - }; 42 - callbag(CALLBAG_START, unsafe_wrap(wrappedSink)); 43 - }); 44 - 45 - [@genType] 46 - let toCallbag = (source: sourceT('a)): callbagT('a) => 47 - curry((signal, data) => 48 - if (signal === CALLBAG_START) { 49 - let callbag = unsafe_getCallbag(data); 50 - source((. signal) => 51 - switch (signal) { 52 - | Start(talkbackFn) => 53 - let wrappedTalkbackFn = (talkback: callbagSignal) => 54 - switch (talkback) { 55 - | CALLBAG_START => () 56 - | CALLBAG_DATA => talkbackFn(. Pull) 57 - | CALLBAG_END => talkbackFn(. Close) 58 - }; 59 - callbag(CALLBAG_START, unsafe_wrap(wrappedTalkbackFn)); 60 - | Push(data) => callbag(CALLBAG_DATA, unsafe_wrap(data)) 61 - | End => callbag(CALLBAG_END, unsafe_wrap()) 62 - } 63 - ); 64 - } 65 - );
-140
src/web/Wonka_observable.re
··· 1 - open Wonka_types; 2 - open Wonka_helpers; 3 - 4 - let observableSymbol: string = [%raw 5 - {| 6 - typeof Symbol === 'function' 7 - ? Symbol.observable || (Symbol.observable = Symbol('observable')) 8 - : '@@observable' 9 - |} 10 - ]; 11 - 12 - [@genType.import "../shims/Js.shim"] 13 - type observableSubscriptionT = {. [@bs.meth] "unsubscribe": unit => unit}; 14 - 15 - [@bs.set_index] 16 - external subscription_set: (observableSubscriptionT, string, bool) => unit; 17 - 18 - [@genType.import "../shims/Js.shim"] 19 - type observableObserverT('a) = { 20 - . 21 - [@bs.meth] "next": 'a => unit, 22 - [@bs.meth] "error": Js.Exn.t => unit, 23 - [@bs.meth] "complete": unit => unit, 24 - }; 25 - 26 - [@genType.import "../shims/Js.shim"] 27 - type observableT('a) = { 28 - . 29 - [@bs.meth] "subscribe": observableObserverT('a) => observableSubscriptionT, 30 - }; 31 - 32 - type observableFactoryT('a) = (. unit) => observableT('a); 33 - 34 - [@bs.get_index] 35 - external observable_get: 36 - (observableT('a), string) => option(observableFactoryT('a)); 37 - [@bs.get_index] 38 - external observable_unsafe_get: 39 - (observableT('a), string) => observableFactoryT('a); 40 - [@bs.set_index] 41 - external observable_set: 42 - (observableT('a), string, unit => observableT('a)) => unit; 43 - 44 - [@genType] 45 - let fromObservable = (input: observableT('a)): sourceT('a) => { 46 - let observable = 47 - switch (input->observable_get(observableSymbol)) { 48 - | Some(_) => (input->observable_unsafe_get(observableSymbol))(.) 49 - | None => input 50 - }; 51 - 52 - curry(sink => { 53 - let observer: observableObserverT('a) = 54 - [@bs] 55 - { 56 - as _; 57 - pub next = value => sink(. Push(value)); 58 - pub complete = () => sink(. End); 59 - pub error = _ => () 60 - }; 61 - 62 - let subscription = observable##subscribe(observer); 63 - 64 - sink(. 65 - Start( 66 - (. signal) => 67 - switch (signal) { 68 - | Close => subscription##unsubscribe() 69 - | _ => () 70 - }, 71 - ), 72 - ); 73 - }); 74 - }; 75 - 76 - type observableStateT = { 77 - mutable talkback: (. talkbackT) => unit, 78 - mutable ended: bool, 79 - }; 80 - 81 - [@genType] 82 - let toObservable = (source: sourceT('a)): observableT('a) => { 83 - let observable: observableT('a) = 84 - [@bs] 85 - { 86 - as _; 87 - pub subscribe = 88 - (_observer: observableObserverT('a)): observableSubscriptionT => { 89 - let next: (. 'a) => unit = [%raw 90 - {| 91 - (typeof _observer === 'object' ? _observer.next.bind(_observer) : _observer) || function () {} 92 - |} 93 - ]; 94 - 95 - let complete: (. unit) => unit = [%raw 96 - {| 97 - (typeof _observer === 'object' ? _observer.complete.bind(_observer) : arguments[2]) || function () {} 98 - |} 99 - ]; 100 - 101 - let state: observableStateT = { 102 - talkback: talkbackPlaceholder, 103 - ended: false, 104 - }; 105 - 106 - source((. signal) => 107 - switch (signal) { 108 - | Start(x) => 109 - state.talkback = x; 110 - x(. Pull); 111 - | Push(x) when !state.ended => 112 - next(. x); 113 - state.talkback(. Pull); 114 - | Push(_) => () 115 - | End => 116 - state.ended = true; 117 - complete(.); 118 - } 119 - ); 120 - 121 - let subscription = 122 - [@bs] 123 - { 124 - as self; 125 - pub unsubscribe = () => 126 - if (!state.ended) { 127 - self->subscription_set("closed", false); 128 - state.ended = true; 129 - state.talkback(. Close); 130 - } 131 - }; 132 - 133 - subscription->subscription_set("closed", false); 134 - subscription; 135 - } 136 - }; 137 - 138 - observable->observable_set(observableSymbol, () => observable); 139 - observable; 140 - };
-38
tasks.json
··· 1 - { 2 - "version": "0.1.0", 3 - "command": "npm", 4 - "options": { 5 - "cwd": "${workspaceRoot}" 6 - }, 7 - "isShellCommand": true, 8 - "args": [ 9 - "run", 10 - "watch" 11 - ], 12 - "showOutput": "always", 13 - "isBackground": true, 14 - "problemMatcher": { 15 - "fileLocation": "absolute", 16 - "owner": "ocaml", 17 - "watching": { 18 - "activeOnStart": false, 19 - "beginsPattern": ">>>> Start compiling", 20 - "endsPattern": ">>>> Finish compiling" 21 - }, 22 - "pattern": [ 23 - { 24 - "regexp": "^File \"(.*)\", line (\\d+)(?:, characters (\\d+)-(\\d+))?:$", 25 - "file": 1, 26 - "line": 2, 27 - "column": 3, 28 - "endColumn": 4 29 - }, 30 - { 31 - "regexp": "^(?:(?:Parse\\s+)?(Warning|[Ee]rror)(?:\\s+\\d+)?:)?\\s+(.*)$", 32 - "severity": 1, 33 - "message": 2, 34 - "loop": true 35 - } 36 - ] 37 - } 38 - }
-1
wonka.opam
··· 1 -