├── .gitignore ├── LICENSE ├── README.md ├── bsconfig.json ├── demo.gif ├── dune-project ├── graphql_schema.json ├── package.json ├── public ├── graphiql.html ├── index.html └── style.css ├── reason-graphql-fullstack.opam ├── server.esy.lock.json ├── server.esy.lock ├── .gitattributes ├── .gitignore ├── index.json ├── opam │ ├── astring.0.8.3 │ │ └── opam │ ├── base-bytes.base │ │ └── opam │ ├── base-threads.base │ │ └── opam │ ├── base-unix.base │ │ └── opam │ ├── base.v0.11.1 │ │ └── opam │ ├── base64.3.1.0 │ │ └── opam │ ├── biniou.1.2.0 │ │ └── opam │ ├── cmdliner.1.0.3 │ │ └── opam │ ├── cohttp-lwt-unix.2.0.0 │ │ └── opam │ ├── cohttp-lwt.2.0.0 │ │ └── opam │ ├── cohttp.2.0.0 │ │ └── opam │ ├── conduit-lwt-unix.1.4.0 │ │ └── opam │ ├── conduit-lwt.1.4.0 │ │ └── opam │ ├── conduit.1.4.0 │ │ └── opam │ ├── conf-m4.1 │ │ └── opam │ ├── conf-which.1 │ │ └── opam │ ├── cppo.1.6.5 │ │ └── opam │ ├── dune.1.8.2 │ │ └── opam │ ├── easy-format.1.3.1 │ │ └── opam │ ├── fieldslib.v0.11.0 │ │ └── opam │ ├── fmt.0.8.5 │ │ └── opam │ ├── graphql-lwt.0.9.0 │ │ └── opam │ ├── graphql.0.9.0 │ │ └── opam │ ├── graphql_parser.0.11.0 │ │ └── opam │ ├── ipaddr.3.1.0 │ │ └── opam │ ├── jbuilder.transition │ │ └── opam │ ├── jsonm.1.0.1 │ │ └── opam │ ├── logs.0.6.2 │ │ └── opam │ ├── lwt.4.1.0 │ │ └── opam │ ├── macaddr.3.1.0 │ │ └── opam │ ├── magic-mime.1.1.1 │ │ └── opam │ ├── menhir.20181113 │ │ └── opam │ ├── merlin-extend.0.3 │ │ └── opam │ ├── merlin.3.2.2 │ │ └── opam │ ├── num.1.1 │ │ ├── files │ │ │ ├── findlib-install.patch │ │ │ └── installation-warning.patch │ │ └── opam │ ├── ocaml-compiler-libs.v0.11.0 │ │ └── opam │ ├── ocaml-migrate-parsetree.1.2.0 │ │ └── opam │ ├── ocamlbuild.0.14.0 │ │ └── opam │ ├── ocamlfind.1.8.0 │ │ ├── files │ │ │ ├── no-awk-check.patch │ │ │ ├── ocaml-stub │ │ │ └── ocamlfind.install │ │ └── opam │ ├── parsexp.v0.11.0 │ │ └── opam │ ├── ppx_derivers.1.0 │ │ └── opam │ ├── ppx_fields_conv.v0.11.0 │ │ └── opam │ ├── ppx_sexp_conv.v0.11.2 │ │ └── opam │ ├── ppxlib.0.5.0 │ │ └── opam │ ├── re.1.8.0 │ │ └── opam │ ├── reason.3.4.0 │ │ └── opam │ ├── result.1.3 │ │ └── opam │ ├── rresult.0.6.0 │ │ └── opam │ ├── seq.base │ │ ├── files │ │ │ ├── META.seq │ │ │ └── seq.install │ │ └── opam │ ├── sexplib.v0.11.0 │ │ └── opam │ ├── sexplib0.v0.11.0 │ │ └── opam │ ├── stdio.v0.11.0 │ │ └── opam │ ├── stringext.1.5.0 │ │ └── opam │ ├── topkg.1.0.0 │ │ └── opam │ ├── uchar.0.0.2 │ │ └── opam │ ├── uri.2.2.0 │ │ └── opam │ ├── uutf.1.0.2 │ │ └── opam │ └── yojson.1.7.0 │ │ └── opam └── overrides │ ├── opam__s__base_opam__c__v0.11.1_opam_override │ ├── files │ │ └── base-v0.11.1.patch │ └── package.json │ ├── opam__s__dune_opam__c__1.8.2_opam_override │ └── package.json │ ├── opam__s__merlin_extend_opam__c__0.3_opam_override │ ├── files │ │ └── merlin-extend-winfix.patch │ └── package.json │ ├── opam__s__num_opam__c__1.1_opam_override │ ├── files │ │ └── num-1.1.patch │ └── package.json │ ├── opam__s__ocamlbuild_opam__c__0.14.0_opam_override │ ├── files │ │ └── ocamlbuild-0.14.0.patch │ └── package.json │ └── opam__s__ocamlfind_opam__c__1.8.0_opam_override │ ├── files │ └── findlib-1.8.0.patch │ └── package.json ├── server.json ├── src ├── client │ ├── App.re │ ├── Editor.re │ ├── Loader.re │ └── Mutations.re ├── server │ ├── dune │ ├── main.re │ ├── schema.re │ └── server.re └── shared │ ├── Shared.re │ └── dune ├── webpack.config.js └── yarn.lock /.gitignore: -------------------------------------------------------------------------------- 1 | _build 2 | node_modules 3 | lib 4 | public/bundle.js 5 | /**/.merlin 6 | _esy 7 | *.install 8 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2018 Antonio Nuno Monteiro 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy 4 | of this software and associated documentation files (the "Software"), to deal 5 | in the Software without restriction, including without limitation the rights 6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 7 | copies of the Software, and to permit persons to whom the Software is 8 | furnished to do so, subject to the following conditions: 9 | 10 | The above copyright notice and this permission notice shall be included in all 11 | copies or substantial portions of the Software. 12 | 13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 19 | SOFTWARE. -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Reason / GraphQL Shared Backend 2 | 3 | This is an example of a fullstack Reason + GraphQL application that uses a native 4 | backend and a client compiled to JavaScript through BuckleScript, whilst sharing 5 | types between the backend and the frontend. 6 | 7 | 8 | 9 | ## Technologies / Libraries: 10 | 11 | This was initially based on [@jaredly](https://github.com/jaredly)'s 12 | [isomagic-todos](https://github.com/jaredly/isomagic-todos) experiment that accomplished 13 | sharing types between the backend & frontend through some PPX magic. 14 | 15 | In this case, we leverage the power of GraphQL and its support in OCaml through 16 | [ocaml-graphql-server](https://github.com/andreas/ocaml-graphql-server) and 17 | [graphql_ppx](https://github.com/mhallin/graphql_ppx) to build our API through shared 18 | OCaml / Reason types (have a look in [`src/shared`](./src/shared)). 19 | 20 | ## Running 21 | 22 | ### Build the front-end 23 | 24 | - `yarn && yarn build && yarn bundle` 25 | 26 | ### Build and run the backend 27 | 28 | **Note**: _it's a quiet startup; check http://localhost:8080/graphql to see that it's running!_ 29 | 30 | - `npm install -g esy` 31 | - `esy @server` 32 | - `esy @server x graphql` 33 | 34 | ## Neat tricks 35 | 36 | - GraphQL schema fully defined in Reason (see [`src/server/schema.re`](./src/server/schema.re)) 37 | - There's also a GraphiQL instance at `localhost:8080/graphql` for exploring and 38 | playing with the queries and mutations. 39 | 40 | ## License 41 | 42 | MIT 43 | -------------------------------------------------------------------------------- /bsconfig.json: -------------------------------------------------------------------------------- 1 | // This is the configuration file used by BuckleScript's build system bsb. Its documentation lives here: http://bucklescript.github.io/bucklescript/docson/#build-schema.json 2 | // BuckleScript comes with its own parser for bsconfig.json, which is normal JSON, with the extra support of comments and trailing commas. 3 | { 4 | "name": "bstest", 5 | "version": "0.1.0", 6 | "sources": [ 7 | { 8 | "dir": "src", 9 | "subdirs": [ 10 | "client", 11 | "shared", 12 | ] 13 | } 14 | ], 15 | "bsc-flags": ["-w", "-40", "-w", "-30", "-bs-super-errors"], 16 | "reason": {"react-jsx": 2}, 17 | "ppx-flags": [ 18 | "graphql_ppx/ppx" 19 | ], 20 | "bs-dependencies" : [ 21 | "reason-react", 22 | "bs-fetch", 23 | "bs-glamor" 24 | ] 25 | } 26 | -------------------------------------------------------------------------------- /demo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anmonteiro/reason-graphql-fullstack/6b6d19793bc2e4e16ac91e55686628a6a8fd6fd1/demo.gif -------------------------------------------------------------------------------- /dune-project: -------------------------------------------------------------------------------- 1 | (lang dune 1.1) 2 | 3 | (name reason-shared-backend) 4 | (version 0.1) 5 | -------------------------------------------------------------------------------- /graphql_schema.json: -------------------------------------------------------------------------------- 1 | { 2 | "data": { 3 | "__schema": { 4 | "queryType": { 5 | "name": "query" 6 | }, 7 | "mutationType": { 8 | "name": "mutation" 9 | }, 10 | "subscriptionType": null, 11 | "types": [ 12 | { 13 | "kind": "OBJECT", 14 | "name": "mutation", 15 | "description": null, 16 | "fields": [ 17 | { 18 | "name": "addTodo", 19 | "description": null, 20 | "args": [ 21 | { 22 | "name": "completed", 23 | "description": null, 24 | "type": { 25 | "kind": "NON_NULL", 26 | "name": null, 27 | "ofType": { 28 | "kind": "SCALAR", 29 | "name": "Boolean", 30 | "ofType": null 31 | } 32 | }, 33 | "defaultValue": null 34 | }, 35 | { 36 | "name": "title", 37 | "description": null, 38 | "type": { 39 | "kind": "NON_NULL", 40 | "name": null, 41 | "ofType": { 42 | "kind": "SCALAR", 43 | "name": "String", 44 | "ofType": null 45 | } 46 | }, 47 | "defaultValue": null 48 | } 49 | ], 50 | "type": { 51 | "kind": "NON_NULL", 52 | "name": null, 53 | "ofType": { 54 | "kind": "LIST", 55 | "name": null, 56 | "ofType": { 57 | "kind": "NON_NULL", 58 | "name": null, 59 | "ofType": { 60 | "kind": "OBJECT", 61 | "name": "todo", 62 | "ofType": null 63 | } 64 | } 65 | } 66 | }, 67 | "isDeprecated": false, 68 | "deprecationReason": null 69 | }, 70 | { 71 | "name": "toggleTodo", 72 | "description": null, 73 | "args": [ 74 | { 75 | "name": "id", 76 | "description": null, 77 | "type": { 78 | "kind": "NON_NULL", 79 | "name": null, 80 | "ofType": { 81 | "kind": "SCALAR", 82 | "name": "Int", 83 | "ofType": null 84 | } 85 | }, 86 | "defaultValue": null 87 | } 88 | ], 89 | "type": { 90 | "kind": "NON_NULL", 91 | "name": null, 92 | "ofType": { 93 | "kind": "LIST", 94 | "name": null, 95 | "ofType": { 96 | "kind": "NON_NULL", 97 | "name": null, 98 | "ofType": { 99 | "kind": "OBJECT", 100 | "name": "todo", 101 | "ofType": null 102 | } 103 | } 104 | } 105 | }, 106 | "isDeprecated": false, 107 | "deprecationReason": null 108 | }, 109 | { 110 | "name": "editTodo", 111 | "description": null, 112 | "args": [ 113 | { 114 | "name": "title", 115 | "description": null, 116 | "type": { 117 | "kind": "NON_NULL", 118 | "name": null, 119 | "ofType": { 120 | "kind": "SCALAR", 121 | "name": "String", 122 | "ofType": null 123 | } 124 | }, 125 | "defaultValue": null 126 | }, 127 | { 128 | "name": "id", 129 | "description": null, 130 | "type": { 131 | "kind": "NON_NULL", 132 | "name": null, 133 | "ofType": { 134 | "kind": "SCALAR", 135 | "name": "Int", 136 | "ofType": null 137 | } 138 | }, 139 | "defaultValue": null 140 | } 141 | ], 142 | "type": { 143 | "kind": "NON_NULL", 144 | "name": null, 145 | "ofType": { 146 | "kind": "LIST", 147 | "name": null, 148 | "ofType": { 149 | "kind": "NON_NULL", 150 | "name": null, 151 | "ofType": { 152 | "kind": "OBJECT", 153 | "name": "todo", 154 | "ofType": null 155 | } 156 | } 157 | } 158 | }, 159 | "isDeprecated": false, 160 | "deprecationReason": null 161 | }, 162 | { 163 | "name": "removeTodo", 164 | "description": null, 165 | "args": [ 166 | { 167 | "name": "id", 168 | "description": null, 169 | "type": { 170 | "kind": "NON_NULL", 171 | "name": null, 172 | "ofType": { 173 | "kind": "SCALAR", 174 | "name": "Int", 175 | "ofType": null 176 | } 177 | }, 178 | "defaultValue": null 179 | } 180 | ], 181 | "type": { 182 | "kind": "NON_NULL", 183 | "name": null, 184 | "ofType": { 185 | "kind": "LIST", 186 | "name": null, 187 | "ofType": { 188 | "kind": "NON_NULL", 189 | "name": null, 190 | "ofType": { 191 | "kind": "OBJECT", 192 | "name": "todo", 193 | "ofType": null 194 | } 195 | } 196 | } 197 | }, 198 | "isDeprecated": false, 199 | "deprecationReason": null 200 | } 201 | ], 202 | "inputFields": null, 203 | "interfaces": [], 204 | "enumValues": null, 205 | "possibleTypes": null 206 | }, 207 | { 208 | "kind": "SCALAR", 209 | "name": "Boolean", 210 | "description": null, 211 | "fields": null, 212 | "inputFields": null, 213 | "interfaces": null, 214 | "enumValues": null, 215 | "possibleTypes": null 216 | }, 217 | { 218 | "kind": "SCALAR", 219 | "name": "String", 220 | "description": null, 221 | "fields": null, 222 | "inputFields": null, 223 | "interfaces": null, 224 | "enumValues": null, 225 | "possibleTypes": null 226 | }, 227 | { 228 | "kind": "SCALAR", 229 | "name": "Int", 230 | "description": null, 231 | "fields": null, 232 | "inputFields": null, 233 | "interfaces": null, 234 | "enumValues": null, 235 | "possibleTypes": null 236 | }, 237 | { 238 | "kind": "OBJECT", 239 | "name": "todo", 240 | "description": null, 241 | "fields": [ 242 | { 243 | "name": "id", 244 | "description": null, 245 | "args": [], 246 | "type": { 247 | "kind": "NON_NULL", 248 | "name": null, 249 | "ofType": { 250 | "kind": "SCALAR", 251 | "name": "Int", 252 | "ofType": null 253 | } 254 | }, 255 | "isDeprecated": false, 256 | "deprecationReason": null 257 | }, 258 | { 259 | "name": "title", 260 | "description": null, 261 | "args": [], 262 | "type": { 263 | "kind": "NON_NULL", 264 | "name": null, 265 | "ofType": { 266 | "kind": "SCALAR", 267 | "name": "String", 268 | "ofType": null 269 | } 270 | }, 271 | "isDeprecated": false, 272 | "deprecationReason": null 273 | }, 274 | { 275 | "name": "completed", 276 | "description": null, 277 | "args": [], 278 | "type": { 279 | "kind": "NON_NULL", 280 | "name": null, 281 | "ofType": { 282 | "kind": "SCALAR", 283 | "name": "Boolean", 284 | "ofType": null 285 | } 286 | }, 287 | "isDeprecated": false, 288 | "deprecationReason": null 289 | } 290 | ], 291 | "inputFields": null, 292 | "interfaces": [], 293 | "enumValues": null, 294 | "possibleTypes": null 295 | }, 296 | { 297 | "kind": "OBJECT", 298 | "name": "query", 299 | "description": null, 300 | "fields": [ 301 | { 302 | "name": "todos", 303 | "description": null, 304 | "args": [], 305 | "type": { 306 | "kind": "NON_NULL", 307 | "name": null, 308 | "ofType": { 309 | "kind": "LIST", 310 | "name": null, 311 | "ofType": { 312 | "kind": "NON_NULL", 313 | "name": null, 314 | "ofType": { 315 | "kind": "OBJECT", 316 | "name": "todo", 317 | "ofType": null 318 | } 319 | } 320 | } 321 | }, 322 | "isDeprecated": false, 323 | "deprecationReason": null 324 | } 325 | ], 326 | "inputFields": null, 327 | "interfaces": [], 328 | "enumValues": null, 329 | "possibleTypes": null 330 | } 331 | ], 332 | "directives": [] 333 | } 334 | } 335 | } -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "isomagic-todos", 3 | "version": "0.1.0", 4 | "scripts": { 5 | "clean": "bsb -clean-world", 6 | "build": "bsb -make-world", 7 | "bundle": "webpack", 8 | "watch": "bsb -make-world -w", 9 | "server": "cd server && bsb -make-world -backend native", 10 | "start": "./server/lib/bs/native/main.native" 11 | }, 12 | "keywords": [ 13 | "BuckleScript" 14 | ], 15 | "license": "MIT", 16 | "devDependencies": { 17 | "bs-glamor": "^0.2.0", 18 | "bs-platform": "^3.1.5", 19 | "graphql_ppx": "^0.2.3", 20 | "webpack": "^3.5.5" 21 | }, 22 | "dependencies": { 23 | "bs-fetch": "^0.3.0", 24 | "react": "^16.4.0", 25 | "react-dom": "^16.4.0", 26 | "reason-react": "^0.4.2" 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /public/graphiql.html: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 116 | 117 | 118 | -------------------------------------------------------------------------------- /public/index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Reason GraphQL Fullstack 5 | 6 |
7 | 8 | 9 | -------------------------------------------------------------------------------- /public/style.css: -------------------------------------------------------------------------------- 1 | 2 | body { 3 | font-family: -apple-system, sans-serif; 4 | font-weight: 200; 5 | } 6 | 7 | div { 8 | flex-direction: column; 9 | display: flex; 10 | flex-shrink: 0; 11 | min-width: 0; 12 | min-height: 0; 13 | } 14 | -------------------------------------------------------------------------------- /reason-graphql-fullstack.opam: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/anmonteiro/reason-graphql-fullstack/6b6d19793bc2e4e16ac91e55686628a6a8fd6fd1/reason-graphql-fullstack.opam -------------------------------------------------------------------------------- /server.esy.lock/.gitattributes: -------------------------------------------------------------------------------- 1 | 2 | # Set eol to LF so files aren't converted to CRLF-eol on Windows. 3 | * text eol=lf 4 | -------------------------------------------------------------------------------- /server.esy.lock/.gitignore: -------------------------------------------------------------------------------- 1 | 2 | # Reset any possible .gitignore, we want all esy.lock to be un-ignored. 3 | !* 4 | -------------------------------------------------------------------------------- /server.esy.lock/opam/astring.0.8.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/astring" 5 | doc: "http://erratique.ch/software/astring/doc" 6 | dev-repo: "git+http://erratique.ch/repos/astring.git" 7 | bug-reports: "https://github.com/dbuenzli/astring/issues" 8 | tags: [ "string" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "base-bytes" 16 | ] 17 | build: [[ 18 | "ocaml" "pkg/pkg.ml" "build" 19 | "--pinned" "%{pinned}%" ]] 20 | synopsis: "Alternative String module for OCaml" 21 | description: """ 22 | Astring exposes an alternative `String` module for OCaml. This module 23 | tries to balance minimality and expressiveness for basic, index-free, 24 | string processing and provides types and functions for substrings, 25 | string sets and string maps. 26 | 27 | Remaining compatible with the OCaml `String` module is a non-goal. The 28 | `String` module exposed by Astring has exception safe functions, 29 | removes deprecated and rarely used functions, alters some signatures 30 | and names, adds a few missing functions and fully exploits OCaml's 31 | newfound string immutability. 32 | 33 | Astring depends only on the OCaml standard library. It is distributed 34 | under the ISC license.""" 35 | url { 36 | src: "http://erratique.ch/software/astring/releases/astring-0.8.3.tbz" 37 | checksum: "md5=c5bf6352b9ac27fbeab342740f4fa870" 38 | } 39 | -------------------------------------------------------------------------------- /server.esy.lock/opam/base-bytes.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: " " 3 | authors: " " 4 | homepage: " " 5 | depends: [ 6 | "ocaml" {>= "4.02.0"} 7 | "ocamlfind" {>= "1.5.3"} 8 | ] 9 | synopsis: "Bytes library distributed with the OCaml compiler" 10 | -------------------------------------------------------------------------------- /server.esy.lock/opam/base-threads.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Threads library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /server.esy.lock/opam/base-unix.base/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "https://github.com/ocaml/opam-repository/issues" 3 | description: """ 4 | Unix library distributed with the OCaml compiler 5 | """ 6 | 7 | -------------------------------------------------------------------------------- /server.esy.lock/opam/base.v0.11.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/base" 5 | bug-reports: "https://github.com/janestreet/base/issues" 6 | dev-repo: "git+https://github.com/janestreet/base.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.04.1" & < "4.08.0"} 13 | "sexplib0" {>= "v0.11" & < "v0.12"} 14 | "jbuilder" {build & >= "1.0+beta18.1"} 15 | ] 16 | depopts: [ 17 | "base-native-int63" 18 | ] 19 | synopsis: "Full standard library replacement for OCaml" 20 | description: """ 21 | Full standard library replacement for OCaml 22 | 23 | Base is a complete and portable alternative to the OCaml standard 24 | library. It provides all standard functionalities one would expect 25 | from a language standard library. It uses consistent conventions 26 | across all of its module. 27 | 28 | Base aims to be usable in any context. As a result system dependent 29 | features such as I/O are not offered by Base. They are instead 30 | provided by companion libraries such as stdio: 31 | 32 | https://github.com/janestreet/stdio""" 33 | url { 34 | src: 35 | "https://github.com/janestreet/base/releases/download/v0.11.1/base-v0.11.1.tbz" 36 | checksum: "md5=e7e7dc5db3f1fea19d74a31bbd4ac621" 37 | } 38 | -------------------------------------------------------------------------------- /server.esy.lock/opam/base64.3.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "mirageos-devel@lists.xenproject.org" 3 | authors: [ "Thomas Gazagnaire" 4 | "Anil Madhavapeddy" 5 | "Peter Zotov" ] 6 | license: "ISC" 7 | homepage: "https://github.com/mirage/ocaml-base64" 8 | doc: "http://mirage.github.io/ocaml-base64/" 9 | bug-reports: "https://github.com/mirage/ocaml-base64/issues" 10 | dev-repo: "git+https://github.com/mirage/ocaml-base64.git" 11 | synopsis: "Base64 encoding for OCaml" 12 | description: """ 13 | Base64 is a group of similar binary-to-text encoding schemes that represent 14 | binary data in an ASCII string format by translating it into a radix-64 15 | representation. It is specified in RFC 4648. 16 | """ 17 | depends: [ 18 | "ocaml" {>="4.03.0"} 19 | "base-bytes" 20 | "dune" {build & >= "1.0.1"} 21 | "bos" {with-test} 22 | "rresult" {with-test} 23 | "alcotest" {with-test} 24 | ] 25 | build: [ 26 | ["dune" "subst"] 27 | ["dune" "build" "-p" name "-j" jobs] 28 | ["dune" "runtest" "-p" name] {with-test} 29 | ] 30 | url { 31 | src: 32 | "https://github.com/mirage/ocaml-base64/releases/download/v3.1.0/base64-v3.1.0.tbz" 33 | checksum: "md5=9847073feb4272e513d8c832904e1af7" 34 | } 35 | -------------------------------------------------------------------------------- /server.esy.lock/opam/biniou.1.2.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | 5 | homepage: "https://github.com/mjambon/biniou" 6 | bug-reports: "https://github.com/mjambon/biniou/issues" 7 | dev-repo: "git+https://github.com/mjambon/biniou.git" 8 | license: "BSD-3-Clause" 9 | 10 | build: [ 11 | ["jbuilder" "build" "-p" name "-j" jobs] 12 | ["jbuilder" "runtest" "-p" name] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" {>= "4.02.3"} 16 | "conf-which" {build} 17 | "jbuilder" {build & >= "1.0+beta7"} 18 | "easy-format" 19 | ] 20 | synopsis: 21 | "Binary data format designed for speed, safety, ease of use and backward compatibility as protocols evolve" 22 | url { 23 | src: "https://github.com/mjambon/biniou/archive/v1.2.0.tar.gz" 24 | checksum: "md5=f3e92358e832ed94eaf23ce622ccc2f9" 25 | } 26 | -------------------------------------------------------------------------------- /server.esy.lock/opam/cmdliner.1.0.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/cmdliner" 5 | doc: "http://erratique.ch/software/cmdliner/doc/Cmdliner" 6 | dev-repo: "git+http://erratique.ch/repos/cmdliner.git" 7 | bug-reports: "https://github.com/dbuenzli/cmdliner/issues" 8 | tags: [ "cli" "system" "declarative" "org:erratique" ] 9 | license: "ISC" 10 | depends:[ "ocaml" {>= "4.03.0"} ] 11 | build: [[ make "all" "PREFIX=%{prefix}%" ]] 12 | install: 13 | [[make "install" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%" ] 14 | [make "install-doc" "LIBDIR=%{_:lib}%" "DOCDIR=%{_:doc}%" ]] 15 | 16 | synopsis: """Declarative definition of command line interfaces for OCaml""" 17 | description: """\ 18 | 19 | Cmdliner allows the declarative definition of command line interfaces 20 | for OCaml. 21 | 22 | It provides a simple and compositional mechanism to convert command 23 | line arguments to OCaml values and pass them to your functions. The 24 | module automatically handles syntax errors, help messages and UNIX man 25 | page generation. It supports programs with single or multiple commands 26 | and respects most of the [POSIX][1] and [GNU][2] conventions. 27 | 28 | Cmdliner has no dependencies and is distributed under the ISC license. 29 | 30 | [1]: http://pubs.opengroup.org/onlinepubs/009695399/basedefs/xbd_chap12.html 31 | [2]: http://www.gnu.org/software/libc/manual/html_node/Argument-Syntax.html 32 | """ 33 | url { 34 | archive: "http://erratique.ch/software/cmdliner/releases/cmdliner-1.0.3.tbz" 35 | checksum: "3674ad01d4445424105d33818c78fba8" 36 | } 37 | -------------------------------------------------------------------------------- /server.esy.lock/opam/cohttp-lwt-unix.2.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" 5 | "Stefano Zacchiroli" 6 | "David Sheets" 7 | "Thomas Gazagnaire" 8 | "David Scott" 9 | "Rudi Grinberg" 10 | "Andy Ray" 11 | ] 12 | synopsis: "CoHTTP implementation for Unix and Windows using Lwt" 13 | description: """ 14 | An implementation of an HTTP client and server using the Lwt 15 | concurrency library. See the `Cohttp_lwt_unix` module for information 16 | on how to use this. The package also installs `cohttp-curl-lwt` 17 | and a `cohttp-server-lwt` binaries for quick uses of a HTTP(S) 18 | client and server respectively. 19 | 20 | Although the name implies that this only works under Unix, it 21 | should also be fine under Windows too.""" 22 | license: "ISC" 23 | tags: ["org:mirage" "org:xapi-project"] 24 | homepage: "https://github.com/mirage/ocaml-cohttp" 25 | doc: "https://mirage.github.io/ocaml-cohttp/" 26 | bug-reports: "https://github.com/mirage/ocaml-cohttp/issues" 27 | depends: [ 28 | "ocaml" {>= "4.04.1"} 29 | "dune" {build & >= "1.1.0"} 30 | "conduit-lwt-unix" {>= "1.0.3"} 31 | "cmdliner" 32 | "magic-mime" 33 | "logs" 34 | "fmt" {>= "0.8.2"} 35 | "cohttp-lwt" 36 | "lwt" {>= "3.0.0"} 37 | "base-unix" 38 | "ounit" {with-test} 39 | ] 40 | build: [ 41 | ["dune" "subst"] {pinned} 42 | ["dune" "build" "-p" name "-j" jobs] 43 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 44 | ] 45 | dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git" 46 | url { 47 | src: 48 | "https://github.com/mirage/ocaml-cohttp/releases/download/v2.0.0/cohttp-v2.0.0.tbz" 49 | checksum: "md5=c354599fdb4f2625b6510182de0fc86b" 50 | } 51 | -------------------------------------------------------------------------------- /server.esy.lock/opam/cohttp-lwt.2.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" 5 | "Stefano Zacchiroli" 6 | "David Sheets" 7 | "Thomas Gazagnaire" 8 | "David Scott" 9 | "Rudi Grinberg" 10 | "Andy Ray" 11 | ] 12 | synopsis: "CoHTTP implementation using the Lwt concurrency library" 13 | description: """ 14 | This is a portable implementation of HTTP that uses the Lwt 15 | concurrency library to multiplex IO. It implements as much of the 16 | logic in an OS-independent way as possible, so that more specialised 17 | modules can be tailored for different targets. For example, you 18 | can install `cohttp-lwt-unix` or `cohttp-lwt-jsoo` for a Unix or 19 | JavaScript backend, or `cohttp-mirage` for the MirageOS unikernel 20 | version of the library. All of these implementations share the same 21 | IO logic from this module.""" 22 | license: "ISC" 23 | tags: ["org:mirage" "org:xapi-project"] 24 | homepage: "https://github.com/mirage/ocaml-cohttp" 25 | doc: "https://mirage.github.io/ocaml-cohttp/" 26 | bug-reports: "https://github.com/mirage/ocaml-cohttp/issues" 27 | depends: [ 28 | "ocaml" {>= "4.04.1"} 29 | "dune" {build & >= "1.1.0"} 30 | "cohttp" {>= "1.0.0"} 31 | "lwt" {>= "2.5.0"} 32 | "sexplib0" {< "v0.12"} 33 | "ppx_sexp_conv" {>= "v0.9.0" & < "v0.12"} 34 | "logs" 35 | ] 36 | build: [ 37 | ["dune" "subst"] {pinned} 38 | ["dune" "build" "-p" name "-j" jobs] 39 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 40 | ] 41 | dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git" 42 | url { 43 | src: 44 | "https://github.com/mirage/ocaml-cohttp/releases/download/v2.0.0/cohttp-v2.0.0.tbz" 45 | checksum: "md5=c354599fdb4f2625b6510182de0fc86b" 46 | } 47 | -------------------------------------------------------------------------------- /server.esy.lock/opam/cohttp.2.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" 5 | "Stefano Zacchiroli" 6 | "David Sheets" 7 | "Thomas Gazagnaire" 8 | "David Scott" 9 | "Rudi Grinberg" 10 | "Andy Ray" 11 | ] 12 | synopsis: "An OCaml library for HTTP clients and servers" 13 | description: """ 14 | Cohttp is an OCaml library for creating HTTP daemons. It has a portable 15 | HTTP parser, and implementations using various asynchronous programming 16 | libraries. 17 | 18 | See the cohttp-async, cohttp-lwt, cohttp-lwt-unix, cohttp-lwt-jsoo and 19 | cohttp-mirage libraries for concrete implementations for particular 20 | targets. 21 | 22 | You can implement other targets using the parser very easily. Look at the `IO` 23 | signature in `lib/s.mli` and implement that in the desired backend. 24 | 25 | You can activate some runtime debugging by setting `COHTTP_DEBUG` to any 26 | value, and all requests and responses will be written to stderr. Further 27 | debugging of the connection layer can be obtained by setting `CONDUIT_DEBUG` 28 | to any value.""" 29 | license: "ISC" 30 | tags: ["org:mirage" "org:xapi-project"] 31 | homepage: "https://github.com/mirage/ocaml-cohttp" 32 | doc: "https://mirage.github.io/ocaml-cohttp/" 33 | bug-reports: "https://github.com/mirage/ocaml-cohttp/issues" 34 | depends: [ 35 | "ocaml" {>= "4.04.1"} 36 | "dune" {build & >= "1.1.0"} 37 | "re" {>= "1.7.2"} 38 | "uri" {>= "2.0.0"} 39 | "fieldslib" {< "v0.12"} 40 | "sexplib0" {< "v0.12"} 41 | "ppx_fields_conv" {>= "v0.9.0" & < "v0.12"} 42 | "ppx_sexp_conv" {>= "v0.9.0" & < "v0.12"} 43 | "stringext" 44 | "base64" {>= "3.1.0"} 45 | "fmt" {with-test} 46 | "jsonm" {build} 47 | "alcotest" {with-test} 48 | ] 49 | build: [ 50 | ["dune" "subst"] {pinned} 51 | ["dune" "build" "-p" name "-j" jobs] 52 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 53 | ] 54 | dev-repo: "git+https://github.com/mirage/ocaml-cohttp.git" 55 | url { 56 | src: 57 | "https://github.com/mirage/ocaml-cohttp/releases/download/v2.0.0/cohttp-v2.0.0.tbz" 58 | checksum: "md5=c354599fdb4f2625b6510182de0fc86b" 59 | } 60 | -------------------------------------------------------------------------------- /server.esy.lock/opam/conduit-lwt-unix.1.4.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" "Thomas Leonard" "Thomas Gazagnaire" "Rudi Grinberg" 5 | ] 6 | license: "ISC" 7 | tags: "org:mirage" 8 | homepage: "https://github.com/mirage/ocaml-conduit" 9 | bug-reports: "https://github.com/mirage/ocaml-conduit/issues" 10 | depends: [ 11 | "ocaml" {>= "4.03.0"} 12 | "dune" {build} 13 | "base-unix" 14 | "ppx_sexp_conv" {< "v0.12"} 15 | "conduit-lwt" {>="1.4.0"} 16 | "lwt" {>= "3.0.0"} 17 | "uri" {>= "1.9.4"} 18 | "ipaddr" {>= "3.0.0"} 19 | ] 20 | depopts: ["tls" "lwt_ssl" "launchd"] 21 | conflicts: [ 22 | "tls" {< "0.8.0"} 23 | ] 24 | build: [ 25 | ["dune" "subst"] {pinned} 26 | ["dune" "build" "-p" name "-j" jobs] 27 | ] 28 | dev-repo: "git+https://github.com/mirage/ocaml-conduit.git" 29 | synopsis: "A network connection establishment library for Lwt_unix" 30 | url { 31 | src: 32 | "https://github.com/mirage/ocaml-conduit/releases/download/v1.4.0/conduit-v1.4.0.tbz" 33 | checksum: "md5=204222b8a61692083b79c67c8967fb28" 34 | } 35 | -------------------------------------------------------------------------------- /server.esy.lock/opam/conduit-lwt.1.4.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" "Thomas Leonard" "Thomas Gazagnaire" "Rudi Grinberg" 5 | ] 6 | license: "ISC" 7 | tags: "org:mirage" 8 | homepage: "https://github.com/mirage/ocaml-conduit" 9 | bug-reports: "https://github.com/mirage/ocaml-conduit/issues" 10 | depends: [ 11 | "ocaml" {>= "4.03.0"} 12 | "dune" {build} 13 | "base-unix" 14 | "ppx_sexp_conv" {< "v0.12"} 15 | "sexplib" {< "v0.12"} 16 | "conduit" {="1.4.0"} 17 | "lwt" {>= "3.0.0"} 18 | ] 19 | build: [ 20 | ["dune" "subst"] {pinned} 21 | ["dune" "build" "-p" name "-j" jobs] 22 | ] 23 | dev-repo: "git+https://github.com/mirage/ocaml-conduit.git" 24 | synopsis: "A portable network connection establishment library using Lwt" 25 | url { 26 | src: 27 | "https://github.com/mirage/ocaml-conduit/releases/download/v1.4.0/conduit-v1.4.0.tbz" 28 | checksum: "md5=204222b8a61692083b79c67c8967fb28" 29 | } 30 | -------------------------------------------------------------------------------- /server.esy.lock/opam/conduit.1.4.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: [ 4 | "Anil Madhavapeddy" "Thomas Leonard" "Thomas Gazagnaire" "Rudi Grinberg" 5 | ] 6 | license: "ISC" 7 | tags: "org:mirage" 8 | homepage: "https://github.com/mirage/ocaml-conduit" 9 | doc: "https://mirage.github.io/ocaml-conduit/" 10 | bug-reports: "https://github.com/mirage/ocaml-conduit/issues" 11 | depends: [ 12 | "ocaml" {>= "4.03.0"} 13 | "dune" {build} 14 | "ppx_sexp_conv" {< "v0.12"} 15 | "sexplib" {< "v0.12"} 16 | "astring" 17 | "uri" 18 | "result" 19 | "logs" {>= "0.5.0"} 20 | "ipaddr" {>= "3.0.0"} 21 | ] 22 | build: [ 23 | ["dune" "subst"] {pinned} 24 | ["dune" "build" "-p" name "-j" jobs] 25 | ] 26 | dev-repo: "git+https://github.com/mirage/ocaml-conduit.git" 27 | synopsis: "A network connection establishment library" 28 | description: """ 29 | The `conduit` library takes care of establishing and listening for 30 | TCP and SSL/TLS connections for the Lwt and Async libraries. 31 | 32 | The reason this library exists is to provide a degree of abstraction 33 | from the precise SSL library used, since there are a variety of ways 34 | to bind to a library (e.g. the C FFI, or the Ctypes library), as well 35 | as well as which library is used (just OpenSSL for now). 36 | 37 | By default, OpenSSL is used as the preferred connection library, but 38 | you can force the use of the pure OCaml TLS stack by setting the 39 | environment variable `CONDUIT_TLS=native` when starting your program. 40 | 41 | The useful opam packages available that extend this library are: 42 | 43 | - `conduit`: the main `Conduit` module 44 | - `conduit-lwt`: the portable Lwt implementation 45 | - `conduit-lwt-unix`: the Lwt/Unix implementation 46 | - `conduit-async` the Jane Street Async implementation 47 | - `mirage-conduit`: the MirageOS compatible implementation 48 | """ 49 | url { 50 | src: 51 | "https://github.com/mirage/ocaml-conduit/releases/download/v1.4.0/conduit-v1.4.0.tbz" 52 | checksum: "md5=204222b8a61692083b79c67c8967fb28" 53 | } 54 | -------------------------------------------------------------------------------- /server.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" 7 | build: [["sh" "-exc" "echo | m4"]] 8 | depexts: [ 9 | ["m4"] {os-distribution = "debian"} 10 | ["m4"] {os-distribution = "ubuntu"} 11 | ["m4"] {os-distribution = "fedora"} 12 | ["m4"] {os-distribution = "rhel"} 13 | ["m4"] {os-distribution = "centos"} 14 | ["m4"] {os-distribution = "alpine"} 15 | ["m4"] {os-distribution = "nixos"} 16 | ["m4"] {os-family = "suse"} 17 | ["m4"] {os-distribution = "ol"} 18 | ["m4"] {os-distribution = "arch"} 19 | ] 20 | synopsis: "Virtual package relying on m4" 21 | description: 22 | "This package can only install if the m4 binary is installed on the system." 23 | flags: conf 24 | -------------------------------------------------------------------------------- /server.esy.lock/opam/conf-which.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "unixjunkie@sdf.org" 3 | homepage: "http://www.gnu.org/software/which/" 4 | authors: "Carlo Wood" 5 | bug-reports: "https://github.com/ocaml/opam-repository/issues" 6 | license: "GPL-2+" 7 | build: [["which" "which"]] 8 | depexts: [ 9 | ["which"] {os-distribution = "centos"} 10 | ["which"] {os-distribution = "fedora"} 11 | ["which"] {os-family = "suse"} 12 | ["debianutils"] {os-distribution = "debian"} 13 | ["debianutils"] {os-distribution = "ubuntu"} 14 | ["which"] {os-distribution = "nixos"} 15 | ["which"] {os-distribution = "arch"} 16 | ] 17 | synopsis: "Virtual package relying on which" 18 | description: 19 | "This package can only install if the which program is installed on the system." 20 | flags: conf 21 | -------------------------------------------------------------------------------- /server.esy.lock/opam/cppo.1.6.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | homepage: "https://github.com/mjambon/cppo" 5 | dev-repo: "git+https://github.com/mjambon/cppo.git" 6 | bug-reports: "https://github.com/mjambon/cppo/issues" 7 | license: "BSD-3-Clause" 8 | 9 | build: [ 10 | ["jbuilder" "subst" "-p" name] {pinned} 11 | ["jbuilder" "build" "-p" name "-j" jobs] 12 | ["jbuilder" "runtest" "-p" name] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" 16 | "jbuilder" {build & >= "1.0+beta17"} 17 | "base-unix" 18 | ] 19 | synopsis: "Equivalent of the C preprocessor for OCaml programs" 20 | url { 21 | src: "https://github.com/mjambon/cppo/archive/v1.6.5.tar.gz" 22 | checksum: "md5=1cd25741d31417995b0973fe0b6f6c82" 23 | } 24 | -------------------------------------------------------------------------------- /server.esy.lock/opam/dune.1.8.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/ocaml/dune" 5 | bug-reports: "https://github.com/ocaml/dune/issues" 6 | dev-repo: "git+https://github.com/ocaml/dune.git" 7 | license: "MIT" 8 | depends: [ 9 | "ocaml" {>= "4.02"} 10 | "base-unix" 11 | "base-threads" 12 | ] 13 | build: [ 14 | # opam 2 sets OPAM_SWITCH_PREFIX, so we don't need a hardcoded path 15 | ["ocaml" "configure.ml" "--libdir" lib] {opam-version < "2"} 16 | ["ocaml" "bootstrap.ml"] 17 | ["./boot.exe" "--release" "--subst"] {pinned} 18 | ["./boot.exe" "--release" "-j" jobs] 19 | ] 20 | conflicts: [ 21 | "jbuilder" {!= "transition"} 22 | "odoc" {< "1.3.0"} 23 | ] 24 | 25 | synopsis: "Fast, portable and opinionated build system" 26 | description: """ 27 | dune is a build system that was designed to simplify the release of 28 | Jane Street packages. It reads metadata from "dune" files following a 29 | very simple s-expression syntax. 30 | 31 | dune is fast, it has very low-overhead and support parallel builds on 32 | all platforms. It has no system dependencies, all you need to build 33 | dune and packages using dune is OCaml. You don't need or make or bash 34 | as long as the packages themselves don't use bash explicitly. 35 | 36 | dune supports multi-package development by simply dropping multiple 37 | repositories into the same directory. 38 | 39 | It also supports multi-context builds, such as building against 40 | several opam roots/switches simultaneously. This helps maintaining 41 | packages across several versions of OCaml and gives cross-compilation 42 | for free. 43 | """ 44 | url { 45 | src: "https://github.com/ocaml/dune/releases/download/1.8.2/dune-1.8.2.tbz" 46 | checksum: "md5=2b7f45a6e14865f2318d34f12221ec1e" 47 | } 48 | -------------------------------------------------------------------------------- /server.esy.lock/opam/easy-format.1.3.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "martin@mjambon.com" 3 | authors: ["Martin Jambon"] 4 | homepage: "http://mjambon.com/easy-format.html" 5 | bug-reports: "https://github.com/mjambon/easy-format/issues" 6 | dev-repo: "git+https://github.com/mjambon/easy-format.git" 7 | build: [ 8 | ["jbuilder" "build" "-p" name "-j" jobs] 9 | ["jbuilder" "runtest" "-p" name] {with-test} 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.02.3"} 13 | "jbuilder" {build} 14 | ] 15 | synopsis: 16 | "High-level and functional interface to the Format module of the OCaml standard library" 17 | url { 18 | src: "https://github.com/mjambon/easy-format/archive/v1.3.1.tar.gz" 19 | checksum: "md5=4e163700fb88fdcd6b8976c3a216c8ea" 20 | } 21 | -------------------------------------------------------------------------------- /server.esy.lock/opam/fieldslib.v0.11.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/fieldslib" 5 | bug-reports: "https://github.com/janestreet/fieldslib/issues" 6 | dev-repo: "git+https://github.com/janestreet/fieldslib.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | conflicts: [ "jbuilder" { = "1.0+beta19" } ] 12 | depends: [ 13 | "ocaml" {>= "4.04.1"} 14 | "base" {>= "v0.11" & < "v0.12"} 15 | "jbuilder" {build & >= "1.0+beta18.1"} 16 | "ocaml-migrate-parsetree" {>= "1.0"} 17 | "ppxlib" {>= "0.1.0"} 18 | ] 19 | synopsis: 20 | "Syntax extension to define first class values representing record fields, to get and set record fields, iterate and fold over all fields of a record and create new record values" 21 | description: """ 22 | Part of Jane Street's Core library 23 | The Core suite of libraries is an industrial strength alternative to 24 | OCaml's standard library that was developed by Jane Street, the 25 | largest industrial user of OCaml.""" 26 | url { 27 | src: 28 | "https://ocaml.janestreet.com/ocaml-core/v0.11/files/fieldslib-v0.11.0.tar.gz" 29 | checksum: "md5=a42506b460a1dc47fb65a37d875211ae" 30 | } 31 | -------------------------------------------------------------------------------- /server.esy.lock/opam/fmt.0.8.5/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: [ 4 | "Daniel Bünzli " 5 | "Gabriel Radanne" 6 | ] 7 | homepage: "http://erratique.ch/software/fmt" 8 | doc: "http://erratique.ch/software/fmt" 9 | dev-repo: "git+http://erratique.ch/repos/fmt.git" 10 | bug-reports: "https://github.com/dbuenzli/fmt/issues" 11 | tags: [ "string" "format" "pretty-print" "org:erratique" ] 12 | license: "ISC" 13 | depends: [ 14 | "ocaml" {>= "4.01.0"} 15 | "ocamlfind" {build} 16 | "ocamlbuild" {build} 17 | "topkg" {build & >= "0.9.0"} 18 | "result" 19 | "uchar" 20 | ] 21 | depopts: [ "base-unix" "cmdliner" ] 22 | conflicts: [ "cmdliner" {< "0.9.8"} ] 23 | build: [[ 24 | "ocaml" "pkg/pkg.ml" "build" 25 | "--dev-pkg" "%{pinned}%" 26 | "--with-base-unix" "%{base-unix:installed}%" 27 | "--with-cmdliner" "%{cmdliner:installed}%" ]] 28 | synopsis: "OCaml Format pretty-printer combinators" 29 | description: """ 30 | Fmt exposes combinators to devise `Format` pretty-printing functions. 31 | 32 | Fmt depends only on the OCaml standard library. The optional `Fmt_tty` 33 | library that allows to setup formatters for terminal color output 34 | depends on the Unix library. The optional `Fmt_cli` library that 35 | provides command line support for Fmt depends on [`Cmdliner`][cmdliner]. 36 | 37 | Fmt is distributed under the ISC license. 38 | 39 | [cmdliner]: http://erratique.ch/software/cmdliner""" 40 | url { 41 | src: "http://erratique.ch/software/fmt/releases/fmt-0.8.5.tbz" 42 | checksum: "md5=77b64aa6f20f09de28f2405d6195f12c" 43 | } 44 | -------------------------------------------------------------------------------- /server.esy.lock/opam/graphql-lwt.0.9.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Andreas Garnaes " 3 | authors: "Andreas Garnaes " 4 | homepage: "https://github.com/andreas/ocaml-graphql-server" 5 | doc: "https://andreas.github.io/ocaml-graphql-server/" 6 | bug-reports: "https://github.com/andreas/ocaml-graphql-server/issues" 7 | dev-repo: "git+https://github.com/andreas/ocaml-graphql-server.git" 8 | 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 12 | ] 13 | 14 | depends: [ 15 | "ocaml" {>= "4.03.0"} 16 | "dune" {build} 17 | "graphql" {>= "0.9.0"} 18 | "alcotest" {with-test} 19 | "lwt" 20 | ] 21 | 22 | synopsis: "Build GraphQL schemas with Lwt support" 23 | 24 | description: """ 25 | `graphql-lwt` adds support for Lwt to `graphql`, so you can use Lwt in your GraphQL schema resolver functions.""" 26 | 27 | url { 28 | archive: "https://github.com/andreas/ocaml-graphql-server/releases/download/0.9.0/graphql-0.9.0.tbz" 29 | checksum: "2385ce2f537413e9466d13acb11ae7e4" 30 | } -------------------------------------------------------------------------------- /server.esy.lock/opam/graphql.0.9.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Andreas Garnaes " 3 | authors: "Andreas Garnaes " 4 | homepage: "https://github.com/andreas/ocaml-graphql-server" 5 | doc: "https://andreas.github.io/ocaml-graphql-server/" 6 | bug-reports: "https://github.com/andreas/ocaml-graphql-server/issues" 7 | dev-repo: "git+https://github.com/andreas/ocaml-graphql-server.git" 8 | 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 12 | ] 13 | 14 | depends: [ 15 | "ocaml" {>= "4.03.0"} 16 | "dune" {build} 17 | "graphql_parser" {>= "0.9.0"} 18 | "yojson" 19 | "rresult" 20 | "seq" 21 | "alcotest" {with-test} 22 | ] 23 | 24 | synopsis: "Build GraphQL schemas and execute queries against them" 25 | 26 | description: """ 27 | `graphql` is a package for creating GraphQL servers. Current feature set includes: 28 | 29 | - Type-safe schema design 30 | - GraphQL parser in pure OCaml using [angstrom](https://github.com/inhabitedtype/angstrom) (April 2016 RFC draft) 31 | - Query execution 32 | - Introspection of schemas 33 | - Arguments for fields 34 | - Allows variables in queries 35 | - Subscriptions 36 | 37 | Supporting packages: 38 | 39 | - Use `graphql-lwt` for Lwt support. 40 | - Use `graphql-async` for Async support. 41 | - Use `graphql-cohttp` to run a GraphQL server with `cohttp`.""" 42 | 43 | url { 44 | archive: "https://github.com/andreas/ocaml-graphql-server/releases/download/0.9.0/graphql-0.9.0.tbz" 45 | checksum: "2385ce2f537413e9466d13acb11ae7e4" 46 | } -------------------------------------------------------------------------------- /server.esy.lock/opam/graphql_parser.0.11.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Andreas Garnaes " 3 | authors: "Andreas Garnaes " 4 | homepage: "https://github.com/andreas/ocaml-graphql-server" 5 | doc: "https://andreas.github.io/ocaml-graphql-server/" 6 | bug-reports: "https://github.com/andreas/ocaml-graphql-server/issues" 7 | dev-repo: "git+https://github.com/andreas/ocaml-graphql-server.git" 8 | 9 | build: [ 10 | ["dune" "build" "-p" name "-j" jobs] 11 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 12 | ] 13 | 14 | depends: [ 15 | "ocaml" {>= "4.03.0"} 16 | "dune" {build} 17 | "menhir" {build} 18 | "alcotest" {with-test & >= "0.8.1"} 19 | "fmt" 20 | "re" {>= "1.5.0"} 21 | ] 22 | 23 | synopsis: "Library for parsing GraphQL queries" 24 | 25 | url { 26 | archive: "https://github.com/andreas/ocaml-graphql-server/releases/download/0.11.0/graphql-0.11.0.tbz" 27 | checksum: "d5ca2e13617e8efa95fcea919f089b84" 28 | } 29 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ipaddr.3.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: ["David Sheets" "Anil Madhavapeddy" "Hugo Heuzard"] 4 | synopsis: "A library for manipulation of IP (and MAC) address representations" 5 | description: """ 6 | Features: 7 | * Depends only on sexplib (conditionalization under consideration) 8 | * oUnit-based tests 9 | * IPv4 and IPv6 support 10 | * IPv4 and IPv6 CIDR prefix support 11 | * IPv4 and IPv6 [CIDR-scoped address](http://tools.ietf.org/html/rfc4291#section-2.3) support 12 | * `Ipaddr.V4` and `Ipaddr.V4.Prefix` modules are `Map.OrderedType` 13 | * `Ipaddr.V6` and `Ipaddr.V6.Prefix` modules are `Map.OrderedType` 14 | * `Ipaddr` and `Ipaddr.Prefix` modules are `Map.OrderedType` 15 | * `Ipaddr_unix` in findlib subpackage `ipaddr.unix` provides compatibility with the standard library `Unix` module 16 | * `Ipaddr_top` in findlib subpackage `ipaddr.top` provides top-level pretty printers (requires compiler-libs default since OCaml 4.0) 17 | * IP address scope classification 18 | * IPv4-mapped addresses in IPv6 (::ffff:0:0/96) are an embedding of IPv4 19 | * MAC-48 (Ethernet) address support 20 | * `Macaddr` is a `Map.OrderedType` 21 | * All types have sexplib serializers/deserializers 22 | """ 23 | 24 | license: "ISC" 25 | tags: ["org:mirage" "org:xapi-project"] 26 | homepage: "https://github.com/mirage/ocaml-ipaddr" 27 | doc: "https://mirage.github.io/ocaml-ipaddr/" 28 | bug-reports: "https://github.com/mirage/ocaml-ipaddr/issues" 29 | depends: [ 30 | "ocaml" {>= "4.04.0"} 31 | "dune" {build} 32 | "macaddr" 33 | "sexplib0" 34 | "ounit" {with-test} 35 | "ppx_sexp_conv" {with-test} 36 | ] 37 | build: [ 38 | ["dune" "subst"] {pinned} 39 | ["dune" "build" "-p" name "-j" jobs] 40 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 41 | ] 42 | dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git" 43 | url { 44 | src: 45 | "https://github.com/mirage/ocaml-ipaddr/releases/download/v3.1.0/ipaddr-v3.1.0.tbz" 46 | checksum: "md5=471a594563bb9c3dd91ae912b5ffd6ed" 47 | } 48 | -------------------------------------------------------------------------------- /server.esy.lock/opam/jbuilder.transition/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/ocaml/dune" 5 | bug-reports: "https://github.com/ocaml/dune/issues" 6 | dev-repo: "git+https://github.com/ocaml/dune.git" 7 | license: "MIT" 8 | depends: ["ocaml" "dune"] 9 | post-messages: [ 10 | "Jbuilder has been renamed and the jbuilder package is now a transition \ 11 | package. Use the dune package instead." 12 | ] 13 | synopsis: 14 | "This is a transition package, jbuilder is now named dune. Use the dune" 15 | description: "package instead." 16 | -------------------------------------------------------------------------------- /server.esy.lock/opam/jsonm.1.0.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/jsonm" 5 | doc: "http://erratique.ch/software/jsonm/doc/Jsonm" 6 | dev-repo: "git+http://erratique.ch/repos/jsonm.git" 7 | bug-reports: "https://github.com/dbuenzli/jsonm/issues" 8 | tags: [ "json" "codec" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "uchar" 16 | "uutf" {>= "1.0.0"} 17 | ] 18 | build:[[ 19 | "ocaml" "pkg/pkg.ml" "build" 20 | "--pinned" "%{pinned}%" ]] 21 | synopsis: "Non-blocking streaming JSON codec for OCaml" 22 | description: """ 23 | Jsonm is a non-blocking streaming codec to decode and encode the JSON 24 | data format. It can process JSON text without blocking on IO and 25 | without a complete in-memory representation of the data. 26 | 27 | The alternative "uncut" codec also processes whitespace and 28 | (non-standard) JSON with JavaScript comments. 29 | 30 | Jsonm is made of a single module and depends on [Uutf][uutf]. It is distributed 31 | under the ISC license. 32 | 33 | [uutf]: http://erratique.ch/software/uutf""" 34 | url { 35 | src: "http://erratique.ch/software/jsonm/releases/jsonm-1.0.1.tbz" 36 | checksum: "md5=e2ca39eaefd55b8d155c4f1ec5885311" 37 | } 38 | -------------------------------------------------------------------------------- /server.esy.lock/opam/logs.0.6.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/logs" 5 | doc: "http://erratique.ch/software/logs/doc" 6 | dev-repo: "git+http://erratique.ch/repos/logs.git" 7 | bug-reports: "https://github.com/dbuenzli/logs/issues" 8 | tags: [ "log" "system" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "result" 16 | "mtime" {with-test} 17 | ] 18 | depopts: [ 19 | "js_of_ocaml" 20 | "fmt" 21 | "cmdliner" 22 | "lwt" ] 23 | conflicts: [ "cmdliner" {< "0.9.8"} ] 24 | build: [[ 25 | "ocaml" "pkg/pkg.ml" "build" 26 | "--pinned" "%{pinned}%" 27 | "--with-js_of_ocaml" "%{js_of_ocaml:installed}%" 28 | "--with-fmt" "%{fmt:installed}%" 29 | "--with-cmdliner" "%{cmdliner:installed}%" 30 | "--with-lwt" "%{lwt:installed}%" ]] 31 | synopsis: "Logging infrastructure for OCaml" 32 | description: """ 33 | Logs provides a logging infrastructure for OCaml. Logging is performed 34 | on sources whose reporting level can be set independently. Log message 35 | report is decoupled from logging and is handled by a reporter. 36 | 37 | A few optional log reporters are distributed with the base library and 38 | the API easily allows to implement your own. 39 | 40 | `Logs` depends only on the `result` compatibility package. The 41 | optional `Logs_fmt` reporter on OCaml formatters depends on [Fmt][fmt]. 42 | The optional `Logs_browser` reporter that reports to the web browser 43 | console depends on [js_of_ocaml][jsoo]. The optional `Logs_cli` library 44 | that provides command line support for controlling Logs depends on 45 | [`Cmdliner`][cmdliner]. The optional `Logs_lwt` library that provides Lwt logging 46 | functions depends on [`Lwt`][lwt] 47 | 48 | Logs and its reporters are distributed under the ISC license. 49 | 50 | [fmt]: http://erratique.ch/software/fmt 51 | [jsoo]: http://ocsigen.org/js_of_ocaml/ 52 | [cmdliner]: http://erratique.ch/software/cmdliner 53 | [lwt]: http://ocsigen.org/lwt/""" 54 | url { 55 | src: "http://erratique.ch/software/logs/releases/logs-0.6.2.tbz" 56 | checksum: "md5=19f824c02c83c6dddc3bfb6459e4743e" 57 | } 58 | -------------------------------------------------------------------------------- /server.esy.lock/opam/lwt.4.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | version: "4.1.0" 3 | maintainer: [ 4 | "Anton Bachin " 5 | "Mauricio Fernandez " 6 | "Simon Cruanes " 7 | ] 8 | authors: [ 9 | "Jérôme Vouillon" 10 | "Jérémie Dimino" 11 | ] 12 | homepage: "https://github.com/ocsigen/lwt" 13 | doc: "https://ocsigen.org/lwt/manual/" 14 | bug-reports: "https://github.com/ocsigen/lwt/issues" 15 | license: "LGPL with OpenSSL linking exception" 16 | dev-repo: "git+https://github.com/ocsigen/lwt.git" 17 | build: [ 18 | [ "ocaml" "src/util/configure.ml" "-use-libev" "%{conf-libev:installed}%" ] 19 | [ "jbuilder" "build" "-p" name "-j" jobs ] 20 | ] 21 | 22 | depends: [ 23 | "ocaml" {>= "4.02.0" & < "4.08.0"} 24 | "cppo" {build & >= "1.1.0"} 25 | "jbuilder" {build & >= "1.0+beta14"} 26 | "ocamlfind" {build & >= "1.7.3-1"} 27 | "result" 28 | ] 29 | depopts: [ 30 | "base-threads" 31 | "base-unix" 32 | "conf-libev" 33 | ] 34 | # In practice, Lwt requires OCaml >= 4.02.3, as that is a constraint of the 35 | # dependency jbuilder. 36 | messages: [ 37 | "For the PPX, please install package lwt_ppx" 38 | {!lwt_ppx:installed} 39 | "For the Camlp4 syntax, please install package lwt_camlp4" 40 | {camlp4:installed & !lwt_camlp4:installed} 41 | "For Lwt_log and Lwt_daemon, please install package lwt_log" 42 | {!lwt_log:installed} 43 | ] 44 | synopsis: "Promises, concurrency, and parallelized I/O" 45 | description: """ 46 | A promise is a value that may become determined in the future. 47 | 48 | Lwt provides typed, composable promises. Promises that are resolved by I/O are 49 | resolved by Lwt in parallel. 50 | 51 | Meanwhile, OCaml code, including code creating and waiting on promises, runs in 52 | a single thread by default. This reduces the need for locks or other 53 | synchronization primitives. Code can be run in parallel on an opt-in basis.""" 54 | conflicts: [ 55 | "ocaml-variants" {= "4.02.1+BER"} 56 | ] 57 | url { 58 | src: "https://github.com/ocsigen/lwt/archive/4.1.0.tar.gz" 59 | checksum: "md5=e919bee206f18b3d49250ecf9584fde7" 60 | } 61 | -------------------------------------------------------------------------------- /server.esy.lock/opam/macaddr.3.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: ["David Sheets" "Anil Madhavapeddy" "Hugo Heuzard"] 4 | synopsis: "A library for manipulation of MAC address representations" 5 | license: "ISC" 6 | tags: ["org:mirage" "org:xapi-project"] 7 | homepage: "https://github.com/mirage/ocaml-ipaddr" 8 | doc: "https://mirage.github.io/ocaml-ipaddr/" 9 | bug-reports: "https://github.com/mirage/ocaml-ipaddr/issues" 10 | depends: [ 11 | "ocaml" {>= "4.04.0"} 12 | "dune" {build} 13 | "sexplib0" 14 | "ounit" {with-test} 15 | "ppx_sexp_conv" {with-test} 16 | ] 17 | conflicts: [ "ipaddr" {< "3.0.0"} ] 18 | build: [ 19 | ["dune" "subst"] {pinned} 20 | ["dune" "build" "-p" name "-j" jobs] 21 | ] 22 | dev-repo: "git+https://github.com/mirage/ocaml-ipaddr.git" 23 | url { 24 | src: 25 | "https://github.com/mirage/ocaml-ipaddr/releases/download/v3.1.0/ipaddr-v3.1.0.tbz" 26 | checksum: "md5=471a594563bb9c3dd91ae912b5ffd6ed" 27 | } 28 | -------------------------------------------------------------------------------- /server.esy.lock/opam/magic-mime.1.1.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "magic-mime" 3 | synopsis: "Map filenames to common MIME types" 4 | description: """ 5 | This library contains a database of MIME types that maps filename extensions 6 | into MIME types suitable for use in many Internet protocols such as HTTP or 7 | e-mail. It is generated from the `mime.types` file found in Unix systems, but 8 | has no dependency on a filesystem since it includes the contents of the 9 | database as an ML datastructure. 10 | 11 | For example, here's how to lookup MIME types in the [utop] REPL: 12 | 13 | #require "magic-mime";; 14 | Magic_mime.lookup "/foo/bar.txt";; 15 | - : bytes = "text/plain" 16 | Magic_mime.lookup "bar.css";; 17 | - : bytes = "text/css" 18 | """ 19 | maintainer: "Anil Madhavapeddy " 20 | authors: ["Anil Madhavapeddy" "Maxence Guesdon"] 21 | license: "ISC" 22 | homepage: "https://github.com/mirage/ocaml-magic-mime" 23 | doc: "https://mirage.github.io/ocaml-magic-mime/" 24 | bug-reports: "https://github.com/mirage/ocaml-magic-mime/issues" 25 | dev-repo: "git+https://github.com/mirage/ocaml-magic-mime.git" 26 | depends: [ 27 | "ocaml" {>= "4.03.0"} 28 | "dune" {build} 29 | ] 30 | build: [ 31 | ["dune" "subst"] {pinned} 32 | ["dune" "build" "-p" name "-j" jobs] 33 | ] 34 | url { 35 | src: 36 | "https://github.com/mirage/ocaml-magic-mime/releases/download/v1.1.1/magic-mime-v1.1.1.tbz" 37 | checksum: "md5=8430a2686206517f2753e47c9c038b5c" 38 | } 39 | -------------------------------------------------------------------------------- /server.esy.lock/opam/menhir.20181113/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "francois.pottier@inria.fr" 3 | authors: [ 4 | "François Pottier " 5 | "Yann Régis-Gianas " 6 | ] 7 | homepage: "http://gitlab.inria.fr/fpottier/menhir" 8 | dev-repo: "git+https://gitlab.inria.fr/fpottier/menhir.git" 9 | bug-reports: "menhir@inria.fr" 10 | build: [ 11 | [make "-f" "Makefile" "PREFIX=%{prefix}%" "USE_OCAMLFIND=true" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 12 | ] 13 | install: [ 14 | [make "-f" "Makefile" "install" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 15 | ] 16 | remove: [ 17 | [make "-f" "Makefile" "uninstall" "PREFIX=%{prefix}%" "docdir=%{doc}%/menhir" "libdir=%{lib}%/menhir" "mandir=%{man}%/man1"] 18 | ] 19 | depends: [ 20 | "ocaml" {>= "4.02"} 21 | "ocamlfind" {build} 22 | "ocamlbuild" {build} 23 | ] 24 | synopsis: "An LR(1) parser generator" 25 | url { 26 | src: 27 | "https://gitlab.inria.fr/fpottier/menhir/repository/20181113/archive.tar.gz" 28 | checksum: [ 29 | "md5=69ce441a06ea131cd43e7b44c4303f3c" 30 | "sha512=4ddefcd71d305bfb933a4056da57e36c13c99ec6dfcc4695814798fbbd78b4d65828381ebcb0e58c4c0394105ac763af3d475474e05e408f7080315bc3cf6176" 31 | ] 32 | } 33 | -------------------------------------------------------------------------------- /server.esy.lock/opam/merlin-extend.0.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Frederic Bour " 3 | authors: "Frederic Bour " 4 | homepage: "https://github.com/let-def/merlin-extend" 5 | bug-reports: "https://github.com/let-def/merlin-extend" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/let-def/merlin-extend.git" 8 | build: [make] 9 | install: [make "install"] 10 | remove: ["ocamlfind" "remove" "merlin_extend"] 11 | depends: [ 12 | "ocaml" {>= "4.02.3"} 13 | "ocamlfind" {build} 14 | "cppo" {build} 15 | ] 16 | synopsis: "A protocol to provide custom frontend to Merlin" 17 | description: """ 18 | This protocol allows to replace the OCaml frontend of Merlin. 19 | It extends what used to be done with the `-pp' flag to handle a few more cases.""" 20 | flags: light-uninstall 21 | url { 22 | src: "https://github.com/let-def/merlin-extend/archive/v0.3.tar.gz" 23 | checksum: "md5=9c6dfd4f53328f02f12fcc265f4e2dda" 24 | } 25 | -------------------------------------------------------------------------------- /server.esy.lock/opam/merlin.3.2.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "merlin" 3 | synopsis: "Installation with Opam" 4 | description: """ 5 | If you have a working [Opam](https://opam.ocaml.org/) installation, Merlin is only two commands away: 6 | 7 | ```shell 8 | opam install merlin 9 | opam user-setup install 10 | ``` 11 | 12 | [opam-user-setup](https://github.com/OCamlPro/opam-user-setup) takes care of configuring Emacs and Vim to make best use of your current install. 13 | 14 | You can also [configure the editor](#editor-setup) yourself, if you prefer.""" 15 | maintainer: "defree@gmail.com" 16 | authors: "The Merlin team" 17 | homepage: "https://github.com/ocaml/merlin" 18 | bug-reports: "https://github.com/ocaml/merlin/issues" 19 | depends: [ 20 | "ocaml" {>= "4.02.1" & < "4.08"} 21 | "dune" {build} 22 | "ocamlfind" {>= "1.5.2"} 23 | "yojson" 24 | "craml" {with-test} 25 | ] 26 | build: [ 27 | ["dune" "subst"] {pinned} 28 | ["dune" "build" "-p" name "-j" jobs] 29 | ] 30 | post-messages: 31 | """ 32 | merlin installed. 33 | 34 | Quick setup for VIM 35 | ------------------- 36 | Append this to your .vimrc to add merlin to vim's runtime-path: 37 | let g:opamshare = substitute(system('opam config var share'),'\\n$','','''') 38 | execute "set rtp+=" . g:opamshare . "/merlin/vim" 39 | 40 | Also run the following line in vim to index the documentation: 41 | :execute "helptags " . g:opamshare . "/merlin/vim/doc" 42 | 43 | Quick setup for EMACS 44 | ------------------- 45 | Add opam emacs directory to your load-path by appending this to your .emacs: 46 | (let ((opam-share (ignore-errors (car (process-lines "opam" "config" "var" "share"))))) 47 | (when (and opam-share (file-directory-p opam-share)) 48 | ;; Register Merlin 49 | (add-to-list 'load-path (expand-file-name "emacs/site-lisp" opam-share)) 50 | (autoload 'merlin-mode "merlin" nil t nil) 51 | ;; Automatically start it in OCaml buffers 52 | (add-hook 'tuareg-mode-hook 'merlin-mode t) 53 | (add-hook 'caml-mode-hook 'merlin-mode t) 54 | ;; Use opam switch to lookup ocamlmerlin binary 55 | (setq merlin-command 'opam))) 56 | 57 | Take a look at https://github.com/ocaml/merlin for more information 58 | 59 | Quick setup with opam-user-setup 60 | -------------------------------- 61 | 62 | Opam-user-setup support Merlin. 63 | 64 | $ opam user-setup install 65 | 66 | should take care of basic setup. 67 | See https://github.com/OCamlPro/opam-user-setup""" 68 | {success & !user-setup:installed} 69 | dev-repo: "git+https://github.com/ocaml/merlin.git" 70 | url { 71 | src: 72 | "https://github.com/ocaml/merlin/releases/download/v3.2.2/merlin-v3.2.2.tbz" 73 | checksum: "md5=ede35b65f8ac9c440cfade5445662c54" 74 | } 75 | -------------------------------------------------------------------------------- /server.esy.lock/opam/num.1.1/files/findlib-install.patch: -------------------------------------------------------------------------------- 1 | From 7688bb4fea24463c92e9c4870acc08495a4c77cb Mon Sep 17 00:00:00 2001 2 | From: David Allsopp 3 | Date: Wed, 10 Jan 2018 15:20:46 +0000 4 | Subject: [PATCH] Provide findlib-install target 5 | 6 | Allows installing the entire library using ocamlfind. 7 | --- 8 | Makefile | 10 +++++++++- 9 | src/META | 17 ----------------- 10 | src/META.in | 19 +++++++++++++++++++ 11 | src/Makefile | 17 +++++++++++++++-- 12 | 4 files changed, 43 insertions(+), 20 deletions(-) 13 | delete mode 100644 src/META 14 | create mode 100644 src/META.in 15 | 16 | diff --git a/Makefile b/Makefile 17 | index 6a5d08f..b40e588 100644 18 | --- a/Makefile 19 | +++ b/Makefile 20 | @@ -14,8 +14,16 @@ install: 21 | $(MAKE) -C src install 22 | $(MAKE) -C toplevel install 23 | 24 | +findlib-install: 25 | + $(MAKE) -C src findlib-install 26 | + $(MAKE) -C toplevel install 27 | + 28 | uninstall: 29 | $(MAKE) -C src uninstall 30 | $(MAKE) -C toplevel uninstall 31 | 32 | -.PHONY: all test clean install uninstall 33 | +findlib-uninstall: 34 | + $(MAKE) -C src findlib-uninstall 35 | + $(MAKE) -C toplevel uninstall 36 | + 37 | +.PHONY: all test clean install uninstall findlib-install findlib-uninstall 38 | diff --git a/src/META b/src/META 39 | deleted file mode 100644 40 | index 66ac170..0000000 41 | --- a/src/META 42 | +++ /dev/null 43 | @@ -1,17 +0,0 @@ 44 | -# This META is the one provided by findlib when the "num" library was 45 | -# part of the core OCaml distribution. For backward compatibility, 46 | -# it installs into OCaml's standard library directory, not in a subdirectory 47 | - 48 | -requires = "num.core" 49 | -requires(toploop) = "num.core,num-top" 50 | -version = "1.0" 51 | -description = "Arbitrary-precision rational arithmetic" 52 | -package "core" ( 53 | - directory = "^" 54 | - version = "1.0" 55 | - browse_interfaces = "" 56 | - archive(byte) = "nums.cma" 57 | - archive(native) = "nums.cmxa" 58 | - plugin(byte) = "nums.cma" 59 | - plugin(native) = "nums.cmxs" 60 | -) 61 | diff --git a/src/META.in b/src/META.in 62 | new file mode 100644 63 | index 0000000..b5678b7 64 | --- /dev/null 65 | +++ b/src/META.in 66 | @@ -0,0 +1,19 @@ 67 | +# This META is the one provided by findlib when the "num" library was 68 | +# part of the core OCaml distribution. For backward compatibility, 69 | +# it is installed into OCaml's standard library directory. If the 70 | +# directory line below is removed, then it's installed in a 71 | +# subdirectory, as normal for a findlib package. 72 | + 73 | +requires = "num.core" 74 | +requires(toploop) = "num.core,num-top" 75 | +version = "1.0" 76 | +description = "Arbitrary-precision rational arithmetic" 77 | +package "core" ( 78 | + directory = "^" 79 | + version = "1.0" 80 | + browse_interfaces = "" 81 | + archive(byte) = "nums.cma" 82 | + archive(native) = "nums.cmxa" 83 | + plugin(byte) = "nums.cma" 84 | + plugin(native) = "nums.cmxs" 85 | +) 86 | diff --git a/src/Makefile b/src/Makefile 87 | index 97dc074..ff271fe 100644 88 | --- a/src/Makefile 89 | +++ b/src/Makefile 90 | @@ -80,21 +80,34 @@ endif 91 | ifeq "$(NATDYNLINK)" "true" 92 | TOINSTALL+=nums.cmxs 93 | endif 94 | +ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true" 95 | TOINSTALL_STUBS=dllnums.$(SO) 96 | +else 97 | +TOINSTALL_STUBS= 98 | +endif 99 | 100 | install: 101 | + cp META.in META 102 | $(OCAMLFIND) install num META 103 | + rm -f META 104 | $(INSTALL_DATA) $(TOINSTALL) $(STDLIBDIR) 105 | ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true" 106 | $(INSTALL_DLL) $(TOINSTALL_STUBS) $(STDLIBDIR)/stublibs 107 | endif 108 | 109 | -uninstall: 110 | +findlib-install: 111 | + grep -Fv '^' META.in > META 112 | + $(OCAMLFIND) install num META $(TOINSTALL) $(TOINSTALL_STUBS) 113 | + rm -f META 114 | + 115 | +findlib-uninstall: 116 | + $(OCAMLFIND) remove num 117 | + 118 | +uninstall: findlib-uninstall 119 | cd $(STDLIBDIR) && rm -f $(TOINSTALL) 120 | ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true" 121 | cd $(STDLIBDIR)/stublibs && rm -f $(TOINSTALL_STUBS) 122 | endif 123 | - $(OCAMLFIND) remove num 124 | 125 | clean: 126 | rm -f *.cm[ioxta] *.cmx[as] *.cmti *.$(O) *.$(A) *.$(SO) 127 | -- 128 | 2.14.1 129 | 130 | -------------------------------------------------------------------------------- /server.esy.lock/opam/num.1.1/files/installation-warning.patch: -------------------------------------------------------------------------------- 1 | From db8d748b2cad0adc2698e9fcf28727083a711bae Mon Sep 17 00:00:00 2001 2 | From: David Allsopp 3 | Date: Wed, 24 Jan 2018 16:01:56 +0000 4 | Subject: [PATCH] Warn about installations broken by previous faulty package 5 | 6 | --- 7 | Makefile | 33 +++++++++++++++++++++++++++++++++ 8 | 1 file changed, 33 insertions(+) 9 | 10 | diff --git a/Makefile b/Makefile 11 | index b40e588..d4dcd70 100644 12 | --- a/Makefile 13 | +++ b/Makefile 14 | @@ -14,9 +14,42 @@ install: 15 | $(MAKE) -C src install 16 | $(MAKE) -C toplevel install 17 | 18 | +OCAMLFIND_DIR:=$(dir $(shell command -v ocamlfind 2>/dev/null)) 19 | +OCAMLC_DIR:=$(dir $(shell command -v ocamlc 2>/dev/null)) 20 | +NUM_INSTALLED:=$(shell ocamlfind query num 2>/dev/null) 21 | + 22 | +ifeq ($(NUM_INSTALLED),) 23 | +# The num findlib package is not already present - wohoo! 24 | +OUR_FAULT=no 25 | +else 26 | +ifeq ($(OCAMLFIND_DIR),$(OCAMLC_DIR)) 27 | +# The num findlib package is present, but ocamlc and ocamlfind are in the 28 | +# same place, which means that either we're looking at a system-installed 29 | +# ocamlfind (which isn't supported), or the user has done something else 30 | +# nefarious and doesn't deserve our sympathy (or, at least, our potentially 31 | +# unhelpful advice) 32 | +OUR_FAULT=no 33 | +else 34 | +# The num findlib package package is present, and ocamlc and ocamlfind reside 35 | +# in different directories, which means that we're almost certainly looking at 36 | +# a system switch which has been damaged by a previous num package installation 37 | +# on an OS which didn't protect the system lib directory. 38 | +OUR_FAULT=probably 39 | +endif 40 | +endif 41 | + 42 | findlib-install: 43 | +ifeq ($(OUR_FAULT),no) 44 | $(MAKE) -C src findlib-install 45 | $(MAKE) -C toplevel install 46 | +else 47 | + @echo "\033[0;31m[ERROR]\033[m It appears that the num library was previously installed to your system" 48 | + @echo " compiler's lib directory, probably by a faulty opam package." 49 | + @echo " You will need to remove arith_flags.*, arith_status.*, big_int.*," 50 | + @echo " int_misc.*, nat.*, num.*, ratio.*, nums.*, libnums.* and" 51 | + @echo " stublibs/dllnums.* from $(shell ocamlc -where)." 52 | + @false 53 | +endif 54 | 55 | uninstall: 56 | $(MAKE) -C src uninstall 57 | -- 58 | 2.14.1 59 | 60 | -------------------------------------------------------------------------------- /server.esy.lock/opam/num.1.1/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | name: "num" 3 | version: "1.1" 4 | maintainer: "Xavier Leroy " 5 | authors: [ 6 | "Valérie Ménissier-Morain" 7 | "Pierre Weis" 8 | "Xavier Leroy" 9 | ] 10 | license: "LGPL 2.1 with OCaml linking exception" 11 | 12 | homepage: "https://github.com/ocaml/num/" 13 | bug-reports: "https://github.com/ocaml/num/issues" 14 | dev-repo: "git+https://github.com/ocaml/num.git" 15 | build: [ 16 | [make] 17 | ] 18 | install: [ 19 | make 20 | "install" {!ocaml:preinstalled} 21 | "findlib-install" {ocaml:preinstalled} 22 | ] 23 | remove: [ 24 | make 25 | "uninstall" {!ocaml:preinstalled} 26 | "findlib-uninstall" {ocaml:preinstalled} 27 | ] 28 | depends: [ 29 | "ocaml" {>= "4.06.0"} 30 | "ocamlfind" {build & >= "1.7.3"} 31 | ] 32 | conflicts: [ "base-num" ] 33 | patches: [ "findlib-install.patch" "installation-warning.patch" ] 34 | synopsis: 35 | "The legacy Num library for arbitrary-precision integer and rational arithmetic" 36 | extra-files: [ 37 | ["installation-warning.patch" "md5=93c92bf6da6bae09d068da42b1bbaaac"] 38 | ["findlib-install.patch" "md5=3163a4c3f8dd084653eeb64d95311a2a"] 39 | ] 40 | url { 41 | src: "https://github.com/ocaml/num/archive/v1.1.tar.gz" 42 | checksum: "md5=710cbe18b144955687a03ebab439ff2b" 43 | } 44 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ocaml-compiler-libs.v0.11.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/ocaml-compiler-libs" 5 | bug-reports: "https://github.com/janestreet/ocaml-compiler-libs/issues" 6 | dev-repo: "git+https://github.com/janestreet/ocaml-compiler-libs.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.04.1"} 13 | "jbuilder" {build & >= "1.0+beta12"} 14 | ] 15 | synopsis: "OCaml compiler libraries repackaged" 16 | description: """ 17 | This packages exposes the OCaml compiler libraries repackages under 18 | the toplevel names Ocaml_common, Ocaml_bytecomp, ...""" 19 | url { 20 | src: 21 | "https://ocaml.janestreet.com/ocaml-core/v0.11/files/ocaml-compiler-libs-v0.11.0.tar.gz" 22 | checksum: "md5=e170c16186aa55b7e8b11e461418a10a" 23 | } 24 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ocaml-migrate-parsetree.1.2.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "frederic.bour@lakaban.net" 3 | authors: [ 4 | "Frédéric Bour " 5 | "Jérémie Dimino " 6 | ] 7 | license: "LGPL-2.1" 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" {build & >= "1.6.0"} 20 | "ocaml" {>= "4.02.3" & < "4.08.0"} 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.2.0/ocaml-migrate-parsetree-v1.2.0.tbz" 33 | checksum: "md5=cc6fb09ad6f99156c7dba47711c62c6f" 34 | } 35 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ocamlbuild.0.14.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Gabriel Scherer " 3 | authors: ["Nicolas Pouillard" "Berke Durak"] 4 | homepage: "https://github.com/ocaml/ocamlbuild/" 5 | bug-reports: "https://github.com/ocaml/ocamlbuild/issues" 6 | license: "LGPL-2 with OCaml linking exception" 7 | doc: "https://github.com/ocaml/ocamlbuild/blob/master/manual/manual.adoc" 8 | dev-repo: "git+https://github.com/ocaml/ocamlbuild.git" 9 | build: [ 10 | [ 11 | make 12 | "-f" 13 | "configure.make" 14 | "all" 15 | "OCAMLBUILD_PREFIX=%{prefix}%" 16 | "OCAMLBUILD_BINDIR=%{bin}%" 17 | "OCAMLBUILD_LIBDIR=%{lib}%" 18 | "OCAMLBUILD_MANDIR=%{man}%" 19 | "OCAML_NATIVE=%{ocaml:native}%" 20 | "OCAML_NATIVE_TOOLS=%{ocaml:native}%" 21 | ] 22 | [make "check-if-preinstalled" "all" "opam-install"] 23 | ] 24 | conflicts: [ 25 | "base-ocamlbuild" 26 | "ocamlfind" {< "1.6.2"} 27 | ] 28 | synopsis: 29 | "OCamlbuild is a build system with builtin rules to easily build most OCaml projects." 30 | depends: [ 31 | "ocaml" {>= "4.03"} 32 | ] 33 | url { 34 | src: "https://github.com/ocaml/ocamlbuild/archive/0.14.0.tar.gz" 35 | checksum: "sha256=87b29ce96958096c0a1a8eeafeb6268077b2d11e1bf2b3de0f5ebc9cf8d42e78" 36 | } 37 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ocamlfind.1.8.0/files/no-awk-check.patch: -------------------------------------------------------------------------------- 1 | commit 40142bc941e6e308686e86be6fc2da92f346a22f 2 | Author: Kate 3 | Date: Tue Mar 19 16:29:06 2019 +0000 4 | 5 | Remove awk from the set of checked unix tools as it's not used anywhere 6 | 7 | diff --git a/configure b/configure 8 | index d9b587c..20e8dca 100755 9 | --- a/configure 10 | +++ b/configure 11 | @@ -184,7 +184,7 @@ echo "Configuring core..." 12 | 13 | # Some standard Unix tools must be available: 14 | 15 | -for tool in sed awk ocaml ocamlc uname rm make cat m4 dirname basename; do 16 | +for tool in sed ocaml ocamlc uname rm make cat m4 dirname basename; do 17 | if in_path $tool; then true; else 18 | echo "configure: $tool not in PATH; this is required" 1>&2 19 | exit 1 20 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ocamlfind.1.8.0/files/ocaml-stub: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | BINDIR=$(dirname "$(command -v ocamlc)") 4 | "$BINDIR/ocaml" -I "$OCAML_TOPLEVEL_PATH" "$@" 5 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ocamlfind.1.8.0/files/ocamlfind.install: -------------------------------------------------------------------------------- 1 | bin: [ 2 | "src/findlib/ocamlfind" {"ocamlfind"} 3 | "?src/findlib/ocamlfind_opt" {"ocamlfind"} 4 | "?tools/safe_camlp4" 5 | ] 6 | toplevel: ["src/findlib/topfind"] 7 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ocamlfind.1.8.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Thomas Gazagnaire " 3 | homepage: "http://projects.camlcity.org/projects/findlib.html" 4 | bug-reports: "https://gitlab.camlcity.org/gerd/lib-findlib/issues" 5 | dev-repo: "git+https://gitlab.camlcity.org/gerd/lib-findlib.git" 6 | patches: ["no-awk-check.patch"] 7 | build: [ 8 | [ 9 | "./configure" 10 | "-bindir" 11 | bin 12 | "-sitelib" 13 | lib 14 | "-mandir" 15 | man 16 | "-config" 17 | "%{lib}%/findlib.conf" 18 | "-no-custom" 19 | "-no-topfind" {ocaml:preinstalled} 20 | ] 21 | [make "all"] 22 | [make "opt"] {ocaml:native} 23 | ] 24 | install: [ 25 | [make "install"] 26 | ["install" "-m" "0755" "ocaml-stub" "%{bin}%/ocaml"] {ocaml:preinstalled} 27 | ] 28 | remove: [ 29 | ["ocamlfind" "remove" "bytes"] 30 | [ 31 | "./configure" 32 | "-bindir" 33 | bin 34 | "-sitelib" 35 | lib 36 | "-mandir" 37 | man 38 | "-config" 39 | "%{lib}%/findlib.conf" 40 | "-no-topfind" {ocaml:preinstalled} 41 | ] 42 | [make "uninstall"] 43 | ["rm" "-f" "%{bin}%/ocaml"] {ocaml:preinstalled} 44 | ] 45 | depends: [ 46 | "ocaml" {>= "4.00.0"} 47 | "conf-m4" {build} 48 | ] 49 | synopsis: "A library manager for OCaml" 50 | description: """ 51 | Findlib is a library manager for OCaml. It provides a convention how 52 | to store libraries, and a file format ("META") to describe the 53 | properties of libraries. There is also a tool (ocamlfind) for 54 | interpreting the META files, so that it is very easy to use libraries 55 | in programs and scripts.""" 56 | authors: "Gerd Stolpmann " 57 | extra-files: [ 58 | ["ocamlfind.install" "md5=06f2c282ab52d93aa6adeeadd82a2543"] 59 | ["ocaml-stub" "md5=181f259c9e0bad9ef523e7d4abfdf87a"] 60 | ["no-awk-check.patch" "md5=0378123bf1a45fccdea434c053ddb687"] 61 | ] 62 | url { 63 | src: "http://download.camlcity.org/download/findlib-1.8.0.tar.gz" 64 | checksum: "md5=a710c559667672077a93d34eb6a42e5b" 65 | mirrors: "http://download2.camlcity.org/download/findlib-1.8.0.tar.gz" 66 | } 67 | -------------------------------------------------------------------------------- /server.esy.lock/opam/parsexp.v0.11.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/parsexp" 5 | bug-reports: "https://github.com/janestreet/parsexp/issues" 6 | dev-repo: "git+https://github.com/janestreet/parsexp.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.04.1"} 13 | "sexplib0" {>= "v0.11" & < "v0.12"} 14 | "jbuilder" {build & >= "1.0+beta18.1"} 15 | ] 16 | synopsis: "S-expression parsing library" 17 | description: """ 18 | This library provides generic parsers for parsing S-expressions from 19 | strings or other medium. 20 | 21 | The library is focused on performances but still provide full generic 22 | parsers that can be used with strings, bigstrings, lexing buffers, 23 | character streams or any other sources effortlessly. 24 | 25 | It provides three different class of parsers: 26 | - the normal parsers, producing [Sexp.t] or [Sexp.t list] values 27 | - the parsers with positions, building compact position sequences so 28 | that one can recover original positions in order to report properly 29 | located errors at little cost 30 | - the Concrete Syntax Tree parsers, produce values of type 31 | [Parsexp.Cst.t] which record the concrete layout of the s-expression 32 | syntax, including comments 33 | 34 | This library is portable and doesn't provide IO functions. To read 35 | s-expressions from files or other external sources, you should use 36 | parsexp_io.""" 37 | url { 38 | src: 39 | "https://ocaml.janestreet.com/ocaml-core/v0.11/files/parsexp-v0.11.0.tar.gz" 40 | checksum: "md5=816fce8d14b71a379296577c803bdbca" 41 | } 42 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ppx_derivers.1.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "jeremie@dimino.org" 3 | authors: ["Jérémie Dimino"] 4 | license: "BSD3" 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 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" 13 | "jbuilder" {build & >= "1.0+beta7"} 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.0.tar.gz" 22 | checksum: "md5=4ddce8f43fdb9b0ef0ab6a7cbfebc3e3" 23 | } 24 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ppx_fields_conv.v0.11.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/ppx_fields_conv" 5 | bug-reports: "https://github.com/janestreet/ppx_fields_conv/issues" 6 | dev-repo: "git+https://github.com/janestreet/ppx_fields_conv.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.04.1"} 13 | "base" {>= "v0.11" & < "v0.12"} 14 | "fieldslib" {>= "v0.11" & < "v0.12"} 15 | "jbuilder" {build & >= "1.0+beta18.1"} 16 | "ocaml-migrate-parsetree" {>= "1.0"} 17 | "ppxlib" {>= "0.1.0"} 18 | ] 19 | synopsis: "Generation of accessor and iteration functions for ocaml records" 20 | description: "Part of the Jane Street's PPX rewriters collection." 21 | url { 22 | src: 23 | "https://ocaml.janestreet.com/ocaml-core/v0.11/files/ppx_fields_conv-v0.11.0.tar.gz" 24 | checksum: "md5=72f207c23d65f7f3eaabcc92e33ccdab" 25 | } 26 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ppx_sexp_conv.v0.11.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/ppx_sexp_conv" 5 | bug-reports: "https://github.com/janestreet/ppx_sexp_conv/issues" 6 | dev-repo: "git+https://github.com/janestreet/ppx_sexp_conv.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | conflicts: [ "jbuilder" { = "1.0+beta19" } ] 12 | depends: [ 13 | "ocaml" {>= "4.04.1"} 14 | "base" {>= "v0.11" & < "v0.12"} 15 | "jbuilder" {build & >= "1.0+beta18.1"} 16 | "ocaml-migrate-parsetree" {>= "1.0"} 17 | "ppxlib" {>= "0.3.0"} 18 | ] 19 | synopsis: 20 | "Generation of S-expression conversion functions from type definitions" 21 | description: "Part of the Jane Street's PPX rewriters collection." 22 | url { 23 | src: "https://github.com/janestreet/ppx_sexp_conv/archive/v0.11.2.tar.gz" 24 | checksum: "md5=77d3b30b3d9c5810552bde2027656b8d" 25 | } 26 | -------------------------------------------------------------------------------- /server.esy.lock/opam/ppxlib.0.5.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/ocaml-ppx/ppxlib" 5 | bug-reports: "https://github.com/ocaml-ppx/ppxlib/issues" 6 | dev-repo: "git+https://github.com/ocaml-ppx/ppxlib.git" 7 | doc: "https://ocaml-ppx.github.io/ppxlib/" 8 | license: "MIT" 9 | build: [ 10 | ["dune" "subst"] {pinned} 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ] 13 | run-test: [ 14 | ["dune" "runtest" "-p" name "-j" jobs] { ocaml >= "4.06" } 15 | ] 16 | depends: [ 17 | "ocaml" {>= "4.04.1"} 18 | "base" {>= "v0.11.0" & < "v0.13"} 19 | "dune" {build} 20 | "ocaml-compiler-libs" {>= "v0.11.0"} 21 | "ocaml-migrate-parsetree" {>= "1.0.9"} 22 | "ppx_derivers" {>= "1.0"} 23 | "stdio" {>= "v0.11.0" & < "v0.13"} 24 | "ocamlfind" {with-test} 25 | ] 26 | synopsis: "Base library and tools for ppx rewriters" 27 | description: """ 28 | A comprehensive toolbox for ppx development. It features: 29 | - a OCaml AST / parser / pretty-printer snapshot,to create a full 30 | frontend independent of the version of OCaml; 31 | - a library for library for ppx rewriters in general, and type-driven 32 | code generators in particular; 33 | - a feature-full driver for OCaml AST transformers; 34 | - a quotation mechanism allowing to write values representing the 35 | OCaml AST in the OCaml syntax; 36 | - a generator of open recursion classes from type definitions. 37 | """ 38 | url { 39 | src: 40 | "https://github.com/ocaml-ppx/ppxlib/releases/download/0.5.0/ppxlib-0.5.0.tbz" 41 | checksum: "md5=bb278ff6e819e0e4a4d8a005bb2512a4" 42 | } 43 | -------------------------------------------------------------------------------- /server.esy.lock/opam/re.1.8.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "rudi.grinberg@gmail.com" 3 | authors: [ 4 | "Jerome Vouillon" 5 | "Thomas Gazagnaire" 6 | "Anil Madhavapeddy" 7 | "Rudi Grinberg" 8 | "Gabriel Radanne" 9 | ] 10 | license: "LGPL-2.0 with OCaml linking exception" 11 | homepage: "https://github.com/ocaml/ocaml-re" 12 | bug-reports: "https://github.com/ocaml/ocaml-re/issues" 13 | dev-repo: "git+https://github.com/ocaml/ocaml-re.git" 14 | build: [ 15 | ["jbuilder" "subst" "-n" name] {pinned} 16 | ["jbuilder" "build" "-p" name "-j" jobs] 17 | ["jbuilder" "runtest" "-p" name "-j" jobs] {with-test} 18 | ] 19 | depends: [ 20 | "ocaml" {>= "4.02.3"} 21 | "jbuilder" {build & >= "1.0+beta10"} 22 | "ounit" {with-test} 23 | "seq" 24 | ] 25 | synopsis: "RE is a regular expression library for OCaml" 26 | description: """ 27 | Pure OCaml regular expressions with: 28 | * Perl-style regular expressions (module Re.Perl) 29 | * Posix extended regular expressions (module Re.Posix) 30 | * Emacs-style regular expressions (module Re.Emacs) 31 | * Shell-style file globbing (module Re.Glob) 32 | * Compatibility layer for OCaml's built-in Str module (module Re.Str)""" 33 | url { 34 | src: 35 | "https://github.com/ocaml/ocaml-re/releases/download/1.8.0/re-1.8.0.tbz" 36 | checksum: "md5=765f6f8d3e6ab200866e719ed7e5178d" 37 | } 38 | -------------------------------------------------------------------------------- /server.esy.lock/opam/reason.3.4.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Jordan Walke " 3 | authors: [ "Jordan Walke " ] 4 | license: "MIT" 5 | homepage: "https://github.com/facebook/reason" 6 | doc: "http://reasonml.github.io/" 7 | bug-reports: "https://github.com/facebook/reason/issues" 8 | dev-repo: "git://github.com/facebook/reason.git" 9 | tags: [ "syntax" ] 10 | build: [ 11 | ["dune" "build" "-p" name "-j" jobs] 12 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 13 | ] 14 | depends: [ 15 | "ocaml" {>= "4.02" & < "4.08"} 16 | "dune" {build & >= "1.4"} 17 | "ocamlfind" {build} 18 | "menhir" {>= "20170418"} 19 | "merlin-extend" {>= "0.3"} 20 | "result" 21 | "ocaml-migrate-parsetree" 22 | ] 23 | synopsis: "Reason: Syntax & Toolchain for OCaml" 24 | description: """ 25 | Reason gives OCaml a new syntax that is remniscient of languages like 26 | JavaScript. It's also the umbrella project for a set of tools for the OCaml & 27 | JavaScript ecosystem.""" 28 | url { 29 | src: "https://registry.npmjs.org/@esy-ocaml/reason/-/reason-3.4.0.tgz" 30 | checksum: "md5=1b6cba03588e5fba3b5eb693c0d02dea" 31 | } 32 | -------------------------------------------------------------------------------- /server.esy.lock/opam/result.1.3/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/result" 5 | dev-repo: "git+https://github.com/janestreet/result.git" 6 | bug-reports: "https://github.com/janestreet/result/issues" 7 | license: "BSD3" 8 | build: [["jbuilder" "build" "-p" name "-j" jobs]] 9 | depends: [ 10 | "ocaml" 11 | "jbuilder" {build & >= "1.0+beta11"} 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/releases/download/1.3/result-1.3.tbz" 21 | checksum: "md5=4beebefd41f7f899b6eeba7414e7ae01" 22 | } 23 | -------------------------------------------------------------------------------- /server.esy.lock/opam/rresult.0.6.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/rresult" 5 | doc: "http://erratique.ch/software/rresult" 6 | dev-repo: "git+http://erratique.ch/repos/rresult.git" 7 | bug-reports: "https://github.com/dbuenzli/rresult/issues" 8 | tags: [ "result" "error" "declarative" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "result" 16 | ] 17 | build:[[ 18 | "ocaml" "pkg/pkg.ml" "build" 19 | "--pinned" "%{pinned}%" ]] 20 | 21 | synopsis: """Result value combinators for OCaml""" 22 | description: """\ 23 | 24 | Rresult is an OCaml module for handling computation results and errors 25 | in an explicit and declarative manner, without resorting to 26 | exceptions. It defines combinators to operate on the `result` type 27 | available from OCaml 4.03 in the standard library. 28 | 29 | Rresult depends on the compatibility `result` package and is 30 | distributed under the ISC license. 31 | """ 32 | url { 33 | archive: "http://erratique.ch/software/rresult/releases/rresult-0.6.0.tbz" 34 | checksum: "aba88cffa29081714468c2c7bcdf7fb1" 35 | } 36 | -------------------------------------------------------------------------------- /server.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="" 5 | -------------------------------------------------------------------------------- /server.esy.lock/opam/seq.base/files/seq.install: -------------------------------------------------------------------------------- 1 | lib:[ 2 | "META.seq" {"META"} 3 | ] 4 | -------------------------------------------------------------------------------- /server.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 | ] 16 | -------------------------------------------------------------------------------- /server.esy.lock/opam/sexplib.v0.11.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/sexplib" 5 | bug-reports: "https://github.com/janestreet/sexplib/issues" 6 | dev-repo: "git+https://github.com/janestreet/sexplib.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.04.1"} 13 | "parsexp" {>= "v0.11" & < "v0.12"} 14 | "sexplib0" {>= "v0.11" & < "v0.12"} 15 | "jbuilder" {build & >= "1.0+beta18.1"} 16 | "num" 17 | ] 18 | synopsis: "Library for serializing OCaml values to and from S-expressions" 19 | description: """ 20 | Part of Jane Street's Core library 21 | The Core suite of libraries is an industrial strength alternative to 22 | OCaml's standard library that was developed by Jane Street, the 23 | largest industrial user of OCaml.""" 24 | url { 25 | src: 26 | "https://ocaml.janestreet.com/ocaml-core/v0.11/files/sexplib-v0.11.0.tar.gz" 27 | checksum: "md5=1d53d945914b6b9a380dc8923f19e9ae" 28 | } 29 | -------------------------------------------------------------------------------- /server.esy.lock/opam/sexplib0.v0.11.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/sexplib0" 5 | bug-reports: "https://github.com/janestreet/sexplib0/issues" 6 | dev-repo: "git+https://github.com/janestreet/sexplib0.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.04.1"} 13 | "jbuilder" {build & >= "1.0+beta18.1"} 14 | ] 15 | conflicts: [ 16 | "sexplib" { < "v0.11"} 17 | ] 18 | synopsis: 19 | "Library containing the definition of S-expressions and some base converters" 20 | description: """ 21 | Part of Jane Street's Core library 22 | The Core suite of libraries is an industrial strength alternative to 23 | OCaml's standard library that was developed by Jane Street, the 24 | largest industrial user of OCaml.""" 25 | url { 26 | src: 27 | "https://ocaml.janestreet.com/ocaml-core/v0.11/files/sexplib0-v0.11.0.tar.gz" 28 | checksum: "md5=1c14ba30b471e49f1b23fea5ff99ea6b" 29 | } 30 | -------------------------------------------------------------------------------- /server.esy.lock/opam/stdio.v0.11.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "opensource@janestreet.com" 3 | authors: ["Jane Street Group, LLC "] 4 | homepage: "https://github.com/janestreet/stdio" 5 | bug-reports: "https://github.com/janestreet/stdio/issues" 6 | dev-repo: "git+https://github.com/janestreet/stdio.git" 7 | license: "Apache-2.0" 8 | build: [ 9 | ["jbuilder" "build" "-p" name "-j" jobs] 10 | ] 11 | depends: [ 12 | "ocaml" {>= "4.04.1"} 13 | "base" {>= "v0.11" & < "v0.12"} 14 | "jbuilder" {build & >= "1.0+beta18.1"} 15 | ] 16 | synopsis: "Standard IO library for OCaml" 17 | description: """ 18 | Stdio implements simple input/output functionalities for OCaml. 19 | 20 | It re-exports the input/output functions of the OCaml standard 21 | libraries using a more consistent API.""" 22 | url { 23 | src: 24 | "https://ocaml.janestreet.com/ocaml-core/v0.11/files/stdio-v0.11.0.tar.gz" 25 | checksum: "md5=2db42ee38c91b3ff7126c2634c407b99" 26 | } 27 | -------------------------------------------------------------------------------- /server.esy.lock/opam/stringext.1.5.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "rudi.grinberg@gmail.com" 3 | authors: "Rudi Grinberg" 4 | homepage: "https://github.com/rgrinberg/stringext" 5 | bug-reports: "https://github.com/rgrinberg/stringext/issues" 6 | license: "MIT" 7 | dev-repo: "git+https://github.com/rgrinberg/stringext.git" 8 | build: [ 9 | ["jbuilder" "subst" "-p" name] {pinned} 10 | ["jbuilder" "build" "-p" name "-j" jobs] 11 | ["jbuilder" "runtest" "-p" name "-j" jobs] {with-test} 12 | ] 13 | depends: [ 14 | "ocaml" {>= "4.02.3"} 15 | "jbuilder" {build & >= "1.0+beta10"} 16 | "ounit" {with-test} 17 | "qtest" {with-test & >= "2.2"} 18 | "base-bytes" 19 | ] 20 | synopsis: "Extra string functions for OCaml" 21 | description: """ 22 | Extra string functions for OCaml. Mainly splitting. All functions are in the 23 | `Stringext` module.""" 24 | url { 25 | src: "https://github.com/rgrinberg/stringext/archive/1.5.0.zip" 26 | checksum: "md5=867263ea97532f150516677fa994cdf2" 27 | } 28 | -------------------------------------------------------------------------------- /server.esy.lock/opam/topkg.1.0.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/topkg" 5 | doc: "http://erratique.ch/software/topkg/doc" 6 | license: "ISC" 7 | dev-repo: "git+http://erratique.ch/repos/topkg.git" 8 | bug-reports: "https://github.com/dbuenzli/topkg/issues" 9 | tags: ["packaging" "ocamlbuild" "org:erratique"] 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build & >= "1.6.1"} 13 | "ocamlbuild" 14 | "result" ] 15 | build: [[ 16 | "ocaml" "pkg/pkg.ml" "build" 17 | "--pkg-name" name 18 | "--dev-pkg" "%{pinned}%" ]] 19 | synopsis: """The transitory OCaml software packager""" 20 | description: """\ 21 | 22 | Topkg is a packager for distributing OCaml software. It provides an 23 | API to describe the files a package installs in a given build 24 | configuration and to specify information about the package's 25 | distribution, creation and publication procedures. 26 | 27 | The optional topkg-care package provides the `topkg` command line tool 28 | which helps with various aspects of a package's life cycle: creating 29 | and linting a distribution, releasing it on the WWW, publish its 30 | documentation, add it to the OCaml opam repository, etc. 31 | 32 | Topkg is distributed under the ISC license and has **no** 33 | dependencies. This is what your packages will need as a *build* 34 | dependency. 35 | 36 | Topkg-care is distributed under the ISC license it depends on 37 | [fmt][fmt], [logs][logs], [bos][bos], [cmdliner][cmdliner], 38 | [webbrowser][webbrowser] and `opam-format`. 39 | 40 | [fmt]: http://erratique.ch/software/fmt 41 | [logs]: http://erratique.ch/software/logs 42 | [bos]: http://erratique.ch/software/bos 43 | [cmdliner]: http://erratique.ch/software/cmdliner 44 | [webbrowser]: http://erratique.ch/software/webbrowser 45 | """ 46 | url { 47 | src: "http://erratique.ch/software/topkg/releases/topkg-1.0.0.tbz" 48 | checksum: "md5=e3d76bda06bf68cb5853caf6627da603" 49 | } 50 | -------------------------------------------------------------------------------- /server.esy.lock/opam/uchar.0.0.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://ocaml.org" 5 | doc: "https://ocaml.github.io/uchar/" 6 | dev-repo: "git+https://github.com/ocaml/uchar.git" 7 | bug-reports: "https://github.com/ocaml/uchar/issues" 8 | tags: [ "text" "character" "unicode" "compatibility" "org:ocaml.org" ] 9 | license: "typeof OCaml system" 10 | depends: [ 11 | "ocaml" {>= "3.12.0"} 12 | "ocamlbuild" {build} 13 | ] 14 | build: [ 15 | ["ocaml" "pkg/git.ml"] 16 | [ 17 | "ocaml" 18 | "pkg/build.ml" 19 | "native=%{ocaml:native}%" 20 | "native-dynlink=%{ocaml:native-dynlink}%" 21 | ] 22 | ] 23 | synopsis: "Compatibility library for OCaml's Uchar module" 24 | description: """ 25 | The `uchar` package provides a compatibility library for the 26 | [`Uchar`][1] module introduced in OCaml 4.03. 27 | 28 | The `uchar` package is distributed under the license of the OCaml 29 | compiler. See [LICENSE](LICENSE) for details. 30 | 31 | [1]: http://caml.inria.fr/pub/docs/manual-ocaml/libref/Uchar.html""" 32 | url { 33 | src: 34 | "https://github.com/ocaml/uchar/releases/download/v0.0.2/uchar-0.0.2.tbz" 35 | checksum: "md5=c9ba2c738d264c420c642f7bb1cf4a36" 36 | } 37 | -------------------------------------------------------------------------------- /server.esy.lock/opam/uri.2.2.0/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "anil@recoil.org" 3 | authors: ["Anil Madhavapeddy" "David Sheets" "Rudi Grinberg"] 4 | license: "ISC" 5 | tags: ["url" "uri" "org:mirage" "org:xapi-project"] 6 | homepage: "https://github.com/mirage/ocaml-uri" 7 | bug-reports: "https://github.com/mirage/ocaml-uri/issues" 8 | dev-repo: "git+https://github.com/mirage/ocaml-uri.git" 9 | doc: "https://mirage.github.io/ocaml-uri/" 10 | synopsis: "An RFC3986 URI/URL parsing library" 11 | description: """ 12 | This is an OCaml implementation of the [RFC3986](http://tools.ietf.org/html/rfc3986) specification 13 | for parsing URI or URLs. 14 | """ 15 | depends: [ 16 | "ocaml" {>= "4.04.0"} 17 | "dune" {build & >= "1.2.0"} 18 | "ounit" {with-test & >= "1.0.2"} 19 | "ppx_sexp_conv" {build & >= "v0.9.0" & < "v0.13"} 20 | "re" {>= "1.7.2"} 21 | "sexplib0" {< "v0.13"} 22 | "stringext" {>= "1.4.0"} 23 | ] 24 | build: [ 25 | ["dune" "subst"] {pinned} 26 | ["dune" "build" "-p" name "-j" jobs] 27 | ["dune" "runtest" "-p" name "-j" jobs] {with-test} 28 | ] 29 | url { 30 | src: 31 | "https://github.com/mirage/ocaml-uri/releases/download/v2.2.0/uri-v2.2.0.tbz" 32 | checksum: "md5=e52e17fc6cc3491ab44994e6ebc5664c" 33 | } 34 | -------------------------------------------------------------------------------- /server.esy.lock/opam/uutf.1.0.2/opam: -------------------------------------------------------------------------------- 1 | opam-version: "2.0" 2 | maintainer: "Daniel Bünzli " 3 | authors: ["Daniel Bünzli "] 4 | homepage: "http://erratique.ch/software/uutf" 5 | doc: "http://erratique.ch/software/uutf/doc/Uutf" 6 | dev-repo: "git+http://erratique.ch/repos/uutf.git" 7 | bug-reports: "https://github.com/dbuenzli/uutf/issues" 8 | tags: [ "unicode" "text" "utf-8" "utf-16" "codec" "org:erratique" ] 9 | license: "ISC" 10 | depends: [ 11 | "ocaml" {>= "4.01.0"} 12 | "ocamlfind" {build} 13 | "ocamlbuild" {build} 14 | "topkg" {build} 15 | "uchar" 16 | ] 17 | depopts: ["cmdliner"] 18 | conflicts: ["cmdliner" { < "0.9.6"} ] 19 | build: [[ 20 | "ocaml" "pkg/pkg.ml" "build" 21 | "--pinned" "%{pinned}%" 22 | "--with-cmdliner" "%{cmdliner:installed}%" ]] 23 | synopsis: """Non-blocking streaming Unicode codec for OCaml""" 24 | description: """\ 25 | 26 | Uutf is a non-blocking streaming codec to decode and encode the UTF-8, 27 | UTF-16, UTF-16LE and UTF-16BE encoding schemes. It can efficiently 28 | work character by character without blocking on IO. Decoders perform 29 | character position tracking and support newline normalization. 30 | 31 | Functions are also provided to fold over the characters of UTF encoded 32 | OCaml string values and to directly encode characters in OCaml 33 | Buffer.t values. 34 | 35 | Uutf has no dependency and is distributed under the ISC license. 36 | """ 37 | url { 38 | archive: "http://erratique.ch/software/uutf/releases/uutf-1.0.2.tbz" 39 | checksum: "a7c542405a39630c689a82bd7ef2292c" 40 | } 41 | -------------------------------------------------------------------------------- /server.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" {build} 16 | "cppo" {build} 17 | "easy-format" 18 | "biniou" {>= "1.2.0"} 19 | "alcotest" {with-test & >= "0.8.5"} 20 | ] 21 | synopsis: 22 | "Yojson is an optimized parsing and printing library for the JSON format" 23 | description: """ 24 | Yojson is an optimized parsing and printing library for the JSON format. 25 | 26 | It addresses a few shortcomings of json-wheel including 2x speedup, 27 | polymorphic variants and optional syntax for tuples and variants. 28 | 29 | ydump is a pretty-printing command-line program provided with the 30 | yojson package. 31 | 32 | The program atdgen can be used to derive OCaml-JSON serializers and 33 | deserializers from type definitions.""" 34 | url { 35 | src: 36 | "https://github.com/ocaml-community/yojson/releases/download/1.7.0/yojson-1.7.0.tbz" 37 | checksum: "md5=b89d39ca3f8c532abe5f547ad3b8f84d" 38 | } 39 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__base_opam__c__v0.11.1_opam_override/files/base-v0.11.1.patch: -------------------------------------------------------------------------------- 1 | --- ./src/exn_stubs.c 2 | +++ ./src/exn_stubs.c 3 | @@ -1,8 +1,13 @@ 4 | #include 5 | 6 | extern int caml_backtrace_pos; 7 | +#ifndef _MSC_VER 8 | +#define UNUSED __attribute__((unused)) 9 | +#else 10 | +#define UNUSED 11 | +#endif 12 | 13 | -CAMLprim value Base_clear_caml_backtrace_pos (value __attribute__((unused)) unit) { 14 | +CAMLprim value Base_clear_caml_backtrace_pos (value UNUSED unit) { 15 | caml_backtrace_pos = 0; 16 | return Val_unit; 17 | } 18 | --- ./src/int_math_stubs.c 19 | +++ ./src/int_math_stubs.c 20 | @@ -5,6 +5,25 @@ 21 | #include 22 | #include 23 | 24 | +#if defined(_MSC_VER) 25 | +#include 26 | +#ifdef ARCH_SIXTYFOUR 27 | +#define __builtin_popcountll(x) __popcnt64((uint64_t)(x)) 28 | +static __inline uint32_t __builtin_clzll(uint64_t value) { 29 | + uint32_t leading_zero = 0; 30 | + _BitScanReverse64(&leading_zero, value); 31 | + return (63 - leading_zero); 32 | +} 33 | +#else 34 | +#define __builtin_popcount(x) __popcnt((unsigned int)(x)) 35 | +static __inline uint32_t __builtin_clz(uint32_t value) { 36 | + uint32_t leading_zero = 0; 37 | + _BitScanReverse(&leading_zero, value); 38 | + return (31 - leading_zero); 39 | +} 40 | +#endif /* ARCH_SIXTYFOUR */ 41 | +#endif /* defined(_MSC_VER) */ 42 | + 43 | static int64_t int_pow(int64_t base, int64_t exponent) { 44 | int64_t ret = 1; 45 | int64_t mul[4]; 46 | --- ./src/jbuild 47 | +++ ./src/jbuild 48 | @@ -65,7 +65,7 @@ 49 | (progn 50 | (with-stdout-to popcnt_test.c 51 | (echo "int main(int argc, char ** argv) { return __builtin_popcount(argc); }")) 52 | - (system "${CC} -mpopcnt -c popcnt_test.c 2> ${null} && \ 53 | + (bash "${CC} -mpopcnt -c popcnt_test.c 2> ${null} && \ 54 | echo '(-mpopcnt)' > ${@} || echo '()' > ${@}")))))) 55 | 56 | (ocamllex (hex_lexer)) 57 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__base_opam__c__v0.11.1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < base-v0.11.1.patch' : 'true'}" 7 | ], 8 | [ 9 | "jbuilder", 10 | "build", 11 | "-p", 12 | "base", 13 | "-j", 14 | "4" 15 | ] 16 | ] 17 | } 18 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__dune_opam__c__1.8.2_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "ocaml", 5 | "bootstrap.ml" 6 | ], 7 | [ 8 | "./boot.exe", 9 | "--release", 10 | "-j", 11 | "4" 12 | ] 13 | ] 14 | } 15 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/files/merlin-extend-winfix.patch: -------------------------------------------------------------------------------- 1 | --- ./extend_helper.ml 2 | +++ ./extend_helper.ml 3 | @@ -1,13 +1,6 @@ 4 | -(*pp cppo -V OCAML:`ocamlc -version` *) 5 | open Parsetree 6 | open Extend_protocol 7 | 8 | -#if OCAML_VERSION < (4, 3, 0) 9 | -# define CONST_STRING Asttypes.Const_string 10 | -#else 11 | -# define CONST_STRING Parsetree.Pconst_string 12 | -#endif 13 | - 14 | (** Default implementation for [Reader_def.print_outcome] using 15 | [Oprint] from compiler-libs *) 16 | let print_outcome_using_oprint ppf = function 17 | @@ -28,7 +21,7 @@ 18 | pstr_loc = Location.none; 19 | pstr_desc = Pstr_eval ({ 20 | pexp_loc = Location.none; 21 | - pexp_desc = Pexp_constant (CONST_STRING (msg, None)); 22 | + pexp_desc = Pexp_constant (Parsetree.Pconst_string (msg, None)); 23 | pexp_attributes = []; 24 | }, []); 25 | }] 26 | @@ -112,7 +105,7 @@ 27 | let msg = match payload with 28 | | PStr [{ 29 | pstr_desc = Pstr_eval ({ 30 | - pexp_desc = Pexp_constant (CONST_STRING (msg, _)); 31 | + pexp_desc = Pexp_constant (Parsetree.Pconst_string (msg, _)); 32 | }, _); 33 | }] -> msg 34 | | _ -> "Warning: extension produced an incorrect syntax-error node" 35 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__merlin_extend_opam__c__0.3_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < merlin-extend-winfix.patch' : 'true'}" 7 | ], 8 | [ 9 | "make" 10 | ] 11 | ] 12 | } 13 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__num_opam__c__1.1_opam_override/files/num-1.1.patch: -------------------------------------------------------------------------------- 1 | --- ./src/Makefile 2 | +++ ./src/Makefile 3 | @@ -80,7 +80,7 @@ 4 | ifeq "$(NATDYNLINK)" "true" 5 | TOINSTALL+=nums.cmxs 6 | endif 7 | ifeq "$(SUPPORTS_SHARED_LIBRARIES)" "true" 8 | -TOINSTALL_STUBS=dllnums.$(SO) 9 | +TOINSTALL_STUBS=dllnums$(EXT_DLL) 10 | else 11 | TOINSTALL_STUBS= 12 | @@ -112,7 +112,7 @@ 13 | endif 14 | 15 | clean: 16 | - rm -f *.cm[ioxta] *.cmx[as] *.cmti *.$(O) *.$(A) *.$(SO) 17 | + rm -f *.cm[ioxta] *.cmx[as] *.cmti *.$(O) *.$(A) *$(EXE_DLL) 18 | 19 | depend: 20 | $(OCAMLDEP) -slash *.mli *.ml > .depend 21 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__num_opam__c__1.1_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < num-1.1.patch' : 'true'}" 7 | ], 8 | [ 9 | "make" 10 | ] 11 | ], 12 | "install": [ 13 | [ 14 | "make", 15 | "findlib-install" 16 | ] 17 | ], 18 | "exportedEnv": { 19 | "CAML_LD_LIBRARY_PATH": { 20 | "val": "#{self.install / 'lib' / 'num' : $CAML_LD_LIBRARY_PATH}", 21 | "scope": "global" 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/files/ocamlbuild-0.14.0.patch: -------------------------------------------------------------------------------- 1 | --- ./Makefile 2 | +++ ./Makefile 3 | @@ -213,7 +213,7 @@ 4 | rm -f man/ocamlbuild.1 5 | 6 | man/options_man.byte: src/ocamlbuild_pack.cmo 7 | - $(OCAMLC) $^ -I src man/options_man.ml -o man/options_man.byte 8 | + $(OCAMLC) -I +unix unix.cma $^ -I src man/options_man.ml -o man/options_man.byte 9 | 10 | clean:: 11 | rm -f man/options_man.cm* 12 | --- ./src/command.ml 13 | +++ ./src/command.ml 14 | @@ -148,9 +148,10 @@ 15 | let self = string_of_command_spec_with_calls call_with_tags call_with_target resolve_virtuals in 16 | let b = Buffer.create 256 in 17 | (* The best way to prevent bash from switching to its windows-style 18 | - * quote-handling is to prepend an empty string before the command name. *) 19 | + * quote-handling is to prepend an empty string before the command name. 20 | + * space seems to work, too - and the ouput is nicer *) 21 | if Sys.os_type = "Win32" then 22 | - Buffer.add_string b "''"; 23 | + Buffer.add_char b ' '; 24 | let first = ref true in 25 | let put_space () = 26 | if !first then 27 | @@ -260,7 +261,7 @@ 28 | 29 | let execute_many ?(quiet=false) ?(pretend=false) cmds = 30 | add_parallel_stat (List.length cmds); 31 | - let degraded = !*My_unix.is_degraded || Sys.os_type = "Win32" in 32 | + let degraded = !*My_unix.is_degraded in 33 | let jobs = !jobs in 34 | if jobs < 0 then invalid_arg "jobs < 0"; 35 | let max_jobs = if jobs = 0 then None else Some jobs in 36 | --- ./src/findlib.ml 37 | +++ ./src/findlib.ml 38 | @@ -66,9 +66,6 @@ 39 | (fun command -> lexer & Lexing.from_string & run_and_read command) 40 | command 41 | 42 | -let run_and_read command = 43 | - Printf.ksprintf run_and_read command 44 | - 45 | let rec query name = 46 | try 47 | Hashtbl.find packages name 48 | @@ -135,7 +132,8 @@ 49 | with Not_found -> s 50 | 51 | let list () = 52 | - List.map before_space (split_nl & run_and_read "%s list" ocamlfind) 53 | + let cmd = Shell.quote_filename_if_needed ocamlfind ^ " list" in 54 | + List.map before_space (split_nl & run_and_read cmd) 55 | 56 | (* The closure algorithm is easy because the dependencies are already closed 57 | and sorted for each package. We only have to make the union. We could also 58 | --- ./src/main.ml 59 | +++ ./src/main.ml 60 | @@ -162,6 +162,9 @@ 61 | Tags.mem "traverse" tags 62 | || List.exists (Pathname.is_prefix path_name) !Options.include_dirs 63 | || List.exists (Pathname.is_prefix path_name) target_dirs) 64 | + && ((* beware: !Options.build_dir is an absolute directory *) 65 | + Pathname.normalize !Options.build_dir 66 | + <> Pathname.normalize (Pathname.pwd/path_name)) 67 | end 68 | end 69 | end 70 | --- ./src/my_std.ml 71 | +++ ./src/my_std.ml 72 | @@ -271,13 +271,107 @@ 73 | try Array.iter (fun x -> if x = basename then raise Exit) a; false 74 | with Exit -> true 75 | 76 | +let command_plain = function 77 | +| [| |] -> 0 78 | +| margv -> 79 | + let rec waitpid a b = 80 | + match Unix.waitpid a b with 81 | + | exception (Unix.Unix_error(Unix.EINTR,_,_)) -> waitpid a b 82 | + | x -> x 83 | + in 84 | + let pid = Unix.(create_process margv.(0) margv stdin stdout stderr) in 85 | + let pid', process_status = waitpid [] pid in 86 | + assert (pid = pid'); 87 | + match process_status with 88 | + | Unix.WEXITED n -> n 89 | + | Unix.WSIGNALED _ -> 2 (* like OCaml's uncaught exceptions *) 90 | + | Unix.WSTOPPED _ -> 127 91 | + 92 | +(* can't use Lexers because of circular dependency *) 93 | +let split_path_win str = 94 | + let rec aux pos = 95 | + try 96 | + let i = String.index_from str pos ';' in 97 | + let len = i - pos in 98 | + if len = 0 then 99 | + aux (succ i) 100 | + else 101 | + String.sub str pos (i - pos) :: aux (succ i) 102 | + with Not_found | Invalid_argument _ -> 103 | + let len = String.length str - pos in 104 | + if len = 0 then [] else [String.sub str pos len] 105 | + in 106 | + aux 0 107 | + 108 | +let windows_shell = lazy begin 109 | + let rec iter = function 110 | + | [] -> [| "bash.exe" ; "--norc" ; "--noprofile" |] 111 | + | hd::tl -> 112 | + let dash = Filename.concat hd "dash.exe" in 113 | + if Sys.file_exists dash then [|dash|] else 114 | + let bash = Filename.concat hd "bash.exe" in 115 | + if Sys.file_exists bash = false then iter tl else 116 | + (* if sh.exe and bash.exe exist in the same dir, choose sh.exe *) 117 | + let sh = Filename.concat hd "sh.exe" in 118 | + if Sys.file_exists sh then [|sh|] else [|bash ; "--norc" ; "--noprofile"|] 119 | + in 120 | + split_path_win (try Sys.getenv "PATH" with Not_found -> "") |> iter 121 | +end 122 | + 123 | +let prep_windows_cmd cmd = 124 | + (* workaround known ocaml bug, remove later *) 125 | + if String.contains cmd '\t' && String.contains cmd ' ' = false then 126 | + " " ^ cmd 127 | + else 128 | + cmd 129 | + 130 | +let run_with_shell = function 131 | +| "" -> 0 132 | +| cmd -> 133 | + let cmd = prep_windows_cmd cmd in 134 | + let shell = Lazy.force windows_shell in 135 | + let qlen = Filename.quote cmd |> String.length in 136 | + (* old versions of dash had problems with bs *) 137 | + try 138 | + if qlen < 7_900 then 139 | + command_plain (Array.append shell [| "-ec" ; cmd |]) 140 | + else begin 141 | + (* it can still work, if the called command is a cygwin tool *) 142 | + let ch_closed = ref false in 143 | + let file_deleted = ref false in 144 | + let fln,ch = 145 | + Filename.open_temp_file 146 | + ~mode:[Open_binary] 147 | + "ocamlbuildtmp" 148 | + ".sh" 149 | + in 150 | + try 151 | + let f_slash = String.map ( fun x -> if x = '\\' then '/' else x ) fln in 152 | + output_string ch cmd; 153 | + ch_closed:= true; 154 | + close_out ch; 155 | + let ret = command_plain (Array.append shell [| "-e" ; f_slash |]) in 156 | + file_deleted:= true; 157 | + Sys.remove fln; 158 | + ret 159 | + with 160 | + | x -> 161 | + if !ch_closed = false then 162 | + close_out_noerr ch; 163 | + if !file_deleted = false then 164 | + (try Sys.remove fln with _ -> ()); 165 | + raise x 166 | + end 167 | + with 168 | + | (Unix.Unix_error _) as x -> 169 | + (* Sys.command doesn't raise an exception, so run_with_shell also won't 170 | + raise *) 171 | + Printexc.to_string x ^ ":" ^ cmd |> prerr_endline; 172 | + 1 173 | + 174 | let sys_command = 175 | - match Sys.os_type with 176 | - | "Win32" -> fun cmd -> 177 | - if cmd = "" then 0 else 178 | - let cmd = "bash --norc -c " ^ Filename.quote cmd in 179 | - Sys.command cmd 180 | - | _ -> fun cmd -> if cmd = "" then 0 else Sys.command cmd 181 | + if Sys.win32 then run_with_shell 182 | + else fun cmd -> if cmd = "" then 0 else Sys.command cmd 183 | 184 | (* FIXME warning fix and use Filename.concat *) 185 | let filename_concat x y = 186 | --- ./src/my_std.mli 187 | +++ ./src/my_std.mli 188 | @@ -69,3 +69,6 @@ 189 | 190 | val split_ocaml_version : (int * int * int * string) option 191 | (** (major, minor, patchlevel, rest) *) 192 | + 193 | +val windows_shell : string array Lazy.t 194 | +val prep_windows_cmd : string -> string 195 | --- ./src/ocamlbuild_executor.ml 196 | +++ ./src/ocamlbuild_executor.ml 197 | @@ -34,6 +34,8 @@ 198 | job_stdin : out_channel; 199 | job_stderr : in_channel; 200 | job_buffer : Buffer.t; 201 | + job_pid : int; 202 | + job_tmp_file: string option; 203 | mutable job_dying : bool; 204 | };; 205 | 206 | @@ -76,6 +78,61 @@ 207 | in 208 | loop 0 209 | ;; 210 | + 211 | +let open_process_full_win cmd env = 212 | + let (in_read, in_write) = Unix.pipe () in 213 | + let (out_read, out_write) = Unix.pipe () in 214 | + let (err_read, err_write) = Unix.pipe () in 215 | + Unix.set_close_on_exec in_read; 216 | + Unix.set_close_on_exec out_write; 217 | + Unix.set_close_on_exec err_read; 218 | + let inchan = Unix.in_channel_of_descr in_read in 219 | + let outchan = Unix.out_channel_of_descr out_write in 220 | + let errchan = Unix.in_channel_of_descr err_read in 221 | + let shell = Lazy.force Ocamlbuild_pack.My_std.windows_shell in 222 | + let test_cmd = 223 | + String.concat " " (List.map Filename.quote (Array.to_list shell)) ^ 224 | + "-ec " ^ 225 | + Filename.quote (Ocamlbuild_pack.My_std.prep_windows_cmd cmd) in 226 | + let argv,tmp_file = 227 | + if String.length test_cmd < 7_900 then 228 | + Array.append 229 | + shell 230 | + [| "-ec" ; Ocamlbuild_pack.My_std.prep_windows_cmd cmd |],None 231 | + else 232 | + let fln,ch = Filename.open_temp_file ~mode:[Open_binary] "ocamlbuild" ".sh" in 233 | + output_string ch (Ocamlbuild_pack.My_std.prep_windows_cmd cmd); 234 | + close_out ch; 235 | + let fln' = String.map (function '\\' -> '/' | c -> c) fln in 236 | + Array.append 237 | + shell 238 | + [| "-c" ; fln' |], Some fln in 239 | + let pid = 240 | + Unix.create_process_env argv.(0) argv env out_read in_write err_write in 241 | + Unix.close out_read; 242 | + Unix.close in_write; 243 | + Unix.close err_write; 244 | + (pid, inchan, outchan, errchan,tmp_file) 245 | + 246 | +let close_process_full_win (pid,inchan, outchan, errchan, tmp_file) = 247 | + let delete tmp_file = 248 | + match tmp_file with 249 | + | None -> () 250 | + | Some x -> try Sys.remove x with Sys_error _ -> () in 251 | + let tmp_file_deleted = ref false in 252 | + try 253 | + close_in inchan; 254 | + close_out outchan; 255 | + close_in errchan; 256 | + let res = snd(Unix.waitpid [] pid) in 257 | + tmp_file_deleted := true; 258 | + delete tmp_file; 259 | + res 260 | + with 261 | + | x when tmp_file <> None && !tmp_file_deleted = false -> 262 | + delete tmp_file; 263 | + raise x 264 | + 265 | (* ***) 266 | (*** execute *) 267 | (* XXX: Add test for non reentrancy *) 268 | @@ -130,10 +187,16 @@ 269 | (*** add_job *) 270 | let add_job cmd rest result id = 271 | (*display begin fun oc -> fp oc "Job %a is %s\n%!" print_job_id id cmd; end;*) 272 | - let (stdout', stdin', stderr') = open_process_full cmd env in 273 | + let (pid,stdout', stdin', stderr', tmp_file) = 274 | + if Sys.win32 then open_process_full_win cmd env else 275 | + let a,b,c = open_process_full cmd env in 276 | + -1,a,b,c,None 277 | + in 278 | incr jobs_active; 279 | - set_nonblock (doi stdout'); 280 | - set_nonblock (doi stderr'); 281 | + if not Sys.win32 then ( 282 | + set_nonblock (doi stdout'); 283 | + set_nonblock (doi stderr'); 284 | + ); 285 | let job = 286 | { job_id = id; 287 | job_command = cmd; 288 | @@ -143,7 +206,9 @@ 289 | job_stdin = stdin'; 290 | job_stderr = stderr'; 291 | job_buffer = Buffer.create 1024; 292 | - job_dying = false } 293 | + job_dying = false; 294 | + job_tmp_file = tmp_file; 295 | + job_pid = pid } 296 | in 297 | outputs := FDM.add (doi stdout') job (FDM.add (doi stderr') job !outputs); 298 | jobs := JS.add job !jobs; 299 | @@ -199,6 +264,7 @@ 300 | try 301 | read fd u 0 (Bytes.length u) 302 | with 303 | + | Unix.Unix_error(Unix.EPIPE,_,_) when Sys.win32 -> 0 304 | | Unix.Unix_error(e,_,_) -> 305 | let msg = error_message e in 306 | display (fun oc -> fp oc 307 | @@ -241,14 +307,19 @@ 308 | decr jobs_active; 309 | 310 | (* PR#5371: we would get EAGAIN below otherwise *) 311 | - clear_nonblock (doi job.job_stdout); 312 | - clear_nonblock (doi job.job_stderr); 313 | - 314 | + if not Sys.win32 then ( 315 | + clear_nonblock (doi job.job_stdout); 316 | + clear_nonblock (doi job.job_stderr); 317 | + ); 318 | do_read ~loop:true (doi job.job_stdout) job; 319 | do_read ~loop:true (doi job.job_stderr) job; 320 | outputs := FDM.remove (doi job.job_stdout) (FDM.remove (doi job.job_stderr) !outputs); 321 | jobs := JS.remove job !jobs; 322 | - let status = close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in 323 | + let status = 324 | + if Sys.win32 then 325 | + close_process_full_win (job.job_pid, job.job_stdout, job.job_stdin, job.job_stderr, job.job_tmp_file) 326 | + else 327 | + close_process_full (job.job_stdout, job.job_stdin, job.job_stderr) in 328 | 329 | let shown = ref false in 330 | 331 | --- ./src/ocamlbuild_unix_plugin.ml 332 | +++ ./src/ocamlbuild_unix_plugin.ml 333 | @@ -48,12 +48,22 @@ 334 | end 335 | 336 | let run_and_open s kont = 337 | + let s_orig = s in 338 | + let s = 339 | + (* Be consistent! My_unix.run_and_open uses My_std.sys_command and 340 | + sys_command uses bash. *) 341 | + if Sys.win32 = false then s else 342 | + let l = match Lazy.force My_std.windows_shell |> Array.to_list with 343 | + | hd::tl -> (Filename.quote hd)::tl 344 | + | _ -> assert false in 345 | + "\"" ^ (String.concat " " l) ^ " -ec " ^ Filename.quote (" " ^ s) ^ "\"" 346 | + in 347 | let ic = Unix.open_process_in s in 348 | let close () = 349 | match Unix.close_process_in ic with 350 | | Unix.WEXITED 0 -> () 351 | | Unix.WEXITED _ | Unix.WSIGNALED _ | Unix.WSTOPPED _ -> 352 | - failwith (Printf.sprintf "Error while running: %s" s) in 353 | + failwith (Printf.sprintf "Error while running: %s" s_orig) in 354 | let res = try 355 | kont ic 356 | with e -> (close (); raise e) 357 | --- ./src/options.ml 358 | +++ ./src/options.ml 359 | @@ -174,11 +174,24 @@ 360 | build_dir := Filename.concat (Sys.getcwd ()) s 361 | else 362 | build_dir := s 363 | + 364 | +let slashify = 365 | + if Sys.win32 then fun p -> String.map (function '\\' -> '/' | x -> x) p 366 | + else fun p ->p 367 | + 368 | +let sb () = 369 | + match Sys.os_type with 370 | + | "Win32" -> 371 | + (try set_binary_mode_out stdout true with _ -> ()); 372 | + | _ -> () 373 | + 374 | + 375 | let spec = ref ( 376 | let print_version () = 377 | + sb (); 378 | Printf.printf "ocamlbuild %s\n%!" Ocamlbuild_config.version; raise Exit_OK 379 | in 380 | - let print_vnum () = print_endline Ocamlbuild_config.version; raise Exit_OK in 381 | + let print_vnum () = sb (); print_endline Ocamlbuild_config.version; raise Exit_OK in 382 | Arg.align 383 | [ 384 | "-version", Unit print_version , " Display the version"; 385 | @@ -257,8 +270,8 @@ 386 | "-build-dir", String set_build_dir, " Set build directory (implies no-links)"; 387 | "-install-lib-dir", Set_string Ocamlbuild_where.libdir, " Set the install library directory"; 388 | "-install-bin-dir", Set_string Ocamlbuild_where.bindir, " Set the install binary directory"; 389 | - "-where", Unit (fun () -> print_endline !Ocamlbuild_where.libdir; raise Exit_OK), " Display the install library directory"; 390 | - "-which", String (fun cmd -> print_endline (find_tool cmd); raise Exit_OK), " Display path to the tool command"; 391 | + "-where", Unit (fun () -> sb (); print_endline (slashify !Ocamlbuild_where.libdir); raise Exit_OK), " Display the install library directory"; 392 | + "-which", String (fun cmd -> sb (); print_endline (slashify (find_tool cmd)); raise Exit_OK), " Display path to the tool command"; 393 | "-ocamlc", set_cmd ocamlc, " Set the OCaml bytecode compiler"; 394 | "-plugin-ocamlc", set_cmd plugin_ocamlc, " Set the OCaml bytecode compiler \ 395 | used when building myocamlbuild.ml (only)"; 396 | --- ./src/pathname.ml 397 | +++ ./src/pathname.ml 398 | @@ -84,6 +84,26 @@ 399 | | x :: xs -> x :: normalize_list xs 400 | 401 | let normalize x = 402 | + let x = 403 | + if Sys.win32 = false then 404 | + x 405 | + else 406 | + let len = String.length x in 407 | + let b = Bytes.create len in 408 | + for i = 0 to pred len do 409 | + match x.[i] with 410 | + | '\\' -> Bytes.set b i '/' 411 | + | c -> Bytes.set b i c 412 | + done; 413 | + if len > 1 then ( 414 | + let c1 = Bytes.get b 0 in 415 | + let c2 = Bytes.get b 1 in 416 | + if c2 = ':' && c1 >= 'a' && c1 <= 'z' && 417 | + ( len = 2 || Bytes.get b 2 = '/') then 418 | + Bytes.set b 0 (Char.uppercase_ascii c1) 419 | + ); 420 | + Bytes.unsafe_to_string b 421 | + in 422 | if Glob.eval not_normal_form_re x then 423 | let root, paths = split x in 424 | join root (normalize_list paths) 425 | --- ./src/shell.ml 426 | +++ ./src/shell.ml 427 | @@ -24,12 +24,26 @@ 428 | | 'a'..'z' | 'A'..'Z' | '0'..'9' | '.' | '-' | '/' | '_' | ':' | '@' | '+' | ',' -> loop (pos + 1) 429 | | _ -> false in 430 | loop 0 431 | + 432 | +let generic_quote quotequote s = 433 | + let l = String.length s in 434 | + let b = Buffer.create (l + 20) in 435 | + Buffer.add_char b '\''; 436 | + for i = 0 to l - 1 do 437 | + if s.[i] = '\'' 438 | + then Buffer.add_string b quotequote 439 | + else Buffer.add_char b s.[i] 440 | + done; 441 | + Buffer.add_char b '\''; 442 | + Buffer.contents b 443 | +let unix_quote = generic_quote "'\\''" 444 | + 445 | let quote_filename_if_needed s = 446 | if is_simple_filename s then s 447 | (* We should probably be using [Filename.unix_quote] except that function 448 | * isn't exported. Users on Windows will have to live with not being able to 449 | * install OCaml into c:\o'caml. Too bad. *) 450 | - else if Sys.os_type = "Win32" then Printf.sprintf "'%s'" s 451 | + else if Sys.os_type = "Win32" then unix_quote s 452 | else Filename.quote s 453 | let chdir dir = 454 | reset_filesys_cache (); 455 | @@ -37,7 +51,7 @@ 456 | let run args target = 457 | reset_readdir_cache (); 458 | let cmd = String.concat " " (List.map quote_filename_if_needed args) in 459 | - if !*My_unix.is_degraded || Sys.os_type = "Win32" then 460 | + if !*My_unix.is_degraded then 461 | begin 462 | Log.event cmd target Tags.empty; 463 | let st = sys_command cmd in 464 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__ocamlbuild_opam__c__0.14.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < ocamlbuild-0.14.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "make", 10 | "-f", 11 | "configure.make", 12 | "all", 13 | "OCAMLBUILD_PREFIX=#{self.install}", 14 | "OCAMLBUILD_BINDIR=#{self.bin}", 15 | "OCAMLBUILD_LIBDIR=#{self.lib}", 16 | "OCAMLBUILD_MANDIR=#{self.man}", 17 | "OCAMLBUILD_NATIVE=true", 18 | "OCAMLBUILD_NATIVE_TOOLS=true" 19 | ], 20 | [ 21 | "make", 22 | "check-if-preinstalled", 23 | "all", 24 | "#{os == 'windows' ? 'install' : 'opam-install'}" 25 | ] 26 | ] 27 | } 28 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.0_opam_override/files/findlib-1.8.0.patch: -------------------------------------------------------------------------------- 1 | --- ./Makefile 2 | +++ ./Makefile 3 | @@ -57,16 +57,16 @@ 4 | cat findlib.conf.in | \ 5 | $(SH) tools/patch '@SITELIB@' '$(OCAML_SITELIB)' >findlib.conf 6 | if ./tools/cmd_from_same_dir ocamlc; then \ 7 | - echo 'ocamlc="ocamlc.opt"' >>findlib.conf; \ 8 | + echo 'ocamlc="ocamlc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 9 | fi 10 | if ./tools/cmd_from_same_dir ocamlopt; then \ 11 | - echo 'ocamlopt="ocamlopt.opt"' >>findlib.conf; \ 12 | + echo 'ocamlopt="ocamlopt.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 13 | fi 14 | if ./tools/cmd_from_same_dir ocamldep; then \ 15 | - echo 'ocamldep="ocamldep.opt"' >>findlib.conf; \ 16 | + echo 'ocamldep="ocamldep.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 17 | fi 18 | if ./tools/cmd_from_same_dir ocamldoc; then \ 19 | - echo 'ocamldoc="ocamldoc.opt"' >>findlib.conf; \ 20 | + echo 'ocamldoc="ocamldoc.opt$(EXEC_SUFFIX)"' >>findlib.conf; \ 21 | fi 22 | 23 | .PHONY: install-doc 24 | --- ./src/findlib/findlib_config.mlp 25 | +++ ./src/findlib/findlib_config.mlp 26 | @@ -24,3 +24,5 @@ 27 | | "MacOS" -> "" (* don't know *) 28 | | _ -> failwith "Unknown Sys.os_type" 29 | ;; 30 | + 31 | +let exec_suffix = "@EXEC_SUFFIX@";; 32 | --- ./src/findlib/findlib.ml 33 | +++ ./src/findlib/findlib.ml 34 | @@ -28,15 +28,20 @@ 35 | let conf_ldconf = ref "";; 36 | let conf_ignore_dups_in = ref ([] : string list);; 37 | 38 | -let ocamlc_default = "ocamlc";; 39 | -let ocamlopt_default = "ocamlopt";; 40 | -let ocamlcp_default = "ocamlcp";; 41 | -let ocamloptp_default = "ocamloptp";; 42 | -let ocamlmklib_default = "ocamlmklib";; 43 | -let ocamlmktop_default = "ocamlmktop";; 44 | -let ocamldep_default = "ocamldep";; 45 | -let ocamlbrowser_default = "ocamlbrowser";; 46 | -let ocamldoc_default = "ocamldoc";; 47 | +let add_exec str = 48 | + match Findlib_config.exec_suffix with 49 | + | "" -> str 50 | + | a -> str ^ a ;; 51 | +let ocamlc_default = add_exec "ocamlc";; 52 | +let ocamlopt_default = add_exec "ocamlopt";; 53 | +let ocamlcp_default = add_exec "ocamlcp";; 54 | +let ocamloptp_default = add_exec "ocamloptp";; 55 | +let ocamlmklib_default = add_exec "ocamlmklib";; 56 | +let ocamlmktop_default = add_exec "ocamlmktop";; 57 | +let ocamldep_default = add_exec "ocamldep";; 58 | +let ocamlbrowser_default = add_exec "ocamlbrowser";; 59 | +let ocamldoc_default = add_exec "ocamldoc";; 60 | + 61 | 62 | 63 | let init_manually 64 | --- ./src/findlib/fl_package_base.ml 65 | +++ ./src/findlib/fl_package_base.ml 66 | @@ -133,7 +133,15 @@ 67 | List.find (fun def -> def.def_var = "exists_if") p.package_defs in 68 | let files = Fl_split.in_words def.def_value in 69 | List.exists 70 | - (fun file -> Sys.file_exists (Filename.concat d' file)) 71 | + (fun file -> 72 | + let fln = Filename.concat d' file in 73 | + let e = Sys.file_exists fln in 74 | + (* necessary for ppx executables *) 75 | + if e || Sys.os_type <> "Win32" || Filename.check_suffix fln ".exe" then 76 | + e 77 | + else 78 | + Sys.file_exists (fln ^ ".exe") 79 | + ) 80 | files 81 | with Not_found -> true in 82 | 83 | --- ./src/findlib/fl_split.ml 84 | +++ ./src/findlib/fl_split.ml 85 | @@ -126,10 +126,17 @@ 86 | | '/' | '\\' -> true 87 | | _ -> false in 88 | let norm_dir_win() = 89 | - if l >= 1 && s.[0] = '/' then 90 | - Buffer.add_char b '\\' else Buffer.add_char b s.[0]; 91 | - if l >= 2 && s.[1] = '/' then 92 | - Buffer.add_char b '\\' else Buffer.add_char b s.[1]; 93 | + if l >= 1 then ( 94 | + if s.[0] = '/' then 95 | + Buffer.add_char b '\\' 96 | + else 97 | + Buffer.add_char b s.[0] ; 98 | + if l >= 2 then 99 | + if s.[1] = '/' then 100 | + Buffer.add_char b '\\' 101 | + else 102 | + Buffer.add_char b s.[1]; 103 | + ); 104 | for k = 2 to l - 1 do 105 | let c = s.[k] in 106 | if is_slash c then ( 107 | --- ./src/findlib/frontend.ml 108 | +++ ./src/findlib/frontend.ml 109 | @@ -31,10 +31,18 @@ 110 | else 111 | Sys_error (arg ^ ": " ^ Unix.error_message code) 112 | 113 | +let is_win = Sys.os_type = "Win32" 114 | + 115 | +let () = 116 | + match Findlib_config.system with 117 | + | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> 118 | + (try set_binary_mode_out stdout true with _ -> ()); 119 | + (try set_binary_mode_out stderr true with _ -> ()); 120 | + | _ -> () 121 | 122 | let slashify s = 123 | match Findlib_config.system with 124 | - | "mingw" | "mingw64" | "cygwin" -> 125 | + | "win32" | "win64" | "mingw" | "cygwin" | "mingw64" | "cygwin64" -> 126 | let b = Buffer.create 80 in 127 | String.iter 128 | (function 129 | @@ -49,7 +57,7 @@ 130 | 131 | let out_path ?(prefix="") s = 132 | match Findlib_config.system with 133 | - | "mingw" | "mingw64" | "cygwin" -> 134 | + | "win32" | "win64" | "mingw" | "mingw64" | "cygwin" -> 135 | let u = slashify s in 136 | prefix ^ 137 | (if String.contains u ' ' then 138 | @@ -273,11 +281,9 @@ 139 | 140 | 141 | let identify_dir d = 142 | - match Sys.os_type with 143 | - | "Win32" -> 144 | - failwith "identify_dir" (* not available *) 145 | - | _ -> 146 | - let s = Unix.stat d in 147 | + if is_win then 148 | + failwith "identify_dir"; (* not available *) 149 | + let s = Unix.stat d in 150 | (s.Unix.st_dev, s.Unix.st_ino) 151 | ;; 152 | 153 | @@ -459,6 +465,96 @@ 154 | ) 155 | packages 156 | 157 | +let rewrite_cmd s = 158 | + if s = "" || not is_win then 159 | + s 160 | + else 161 | + let s = 162 | + let l = String.length s in 163 | + let b = Buffer.create l in 164 | + for i = 0 to pred l do 165 | + match s.[i] with 166 | + | '/' -> Buffer.add_char b '\\' 167 | + | x -> Buffer.add_char b x 168 | + done; 169 | + Buffer.contents b 170 | + in 171 | + if (Filename.is_implicit s && String.contains s '\\' = false) || 172 | + Filename.check_suffix (String.lowercase s) ".exe" then 173 | + s 174 | + else 175 | + let s' = s ^ ".exe" in 176 | + if Sys.file_exists s' then 177 | + s' 178 | + else 179 | + s 180 | + 181 | +let rewrite_cmd s = 182 | + if s = "" || not is_win then s else 183 | + let s = 184 | + let l = String.length s in 185 | + let b = Buffer.create l in 186 | + for i = 0 to pred l do 187 | + match s.[i] with 188 | + | '/' -> Buffer.add_char b '\\' 189 | + | x -> Buffer.add_char b x 190 | + done; 191 | + Buffer.contents b 192 | + in 193 | + if (Filename.is_implicit s && String.contains s '\\' = false) || 194 | + Filename.check_suffix (String.lowercase s) ".exe" then 195 | + s 196 | + else 197 | + let s' = s ^ ".exe" in 198 | + if Sys.file_exists s' then 199 | + s' 200 | + else 201 | + s 202 | + 203 | +let rewrite_pp cmd = 204 | + if not is_win then cmd else 205 | + let module T = struct exception Keep end in 206 | + let is_whitespace = function 207 | + | ' ' | '\011' | '\012' | '\n' | '\r' | '\t' -> true 208 | + | _ -> false in 209 | + (* characters that triggers special behaviour (cmd.exe, not unix shell) *) 210 | + let is_unsafe_char = function 211 | + | '(' | ')' | '%' | '!' | '^' | '<' | '>' | '&' -> true 212 | + | _ -> false in 213 | + let len = String.length cmd in 214 | + let buf = Buffer.create (len + 4) in 215 | + let buf_cmd = Buffer.create len in 216 | + let rec iter_ws i = 217 | + if i >= len then () else 218 | + let cur = cmd.[i] in 219 | + if is_whitespace cur then ( 220 | + Buffer.add_char buf cur; 221 | + iter_ws (succ i) 222 | + ) 223 | + else 224 | + iter_cmd i 225 | + and iter_cmd i = 226 | + if i >= len then add_buf_cmd () else 227 | + let cur = cmd.[i] in 228 | + if is_unsafe_char cur || cur = '"' || cur = '\'' then 229 | + raise T.Keep; 230 | + if is_whitespace cur then ( 231 | + add_buf_cmd (); 232 | + Buffer.add_substring buf cmd i (len - i) 233 | + ) 234 | + else ( 235 | + Buffer.add_char buf_cmd cur; 236 | + iter_cmd (succ i) 237 | + ) 238 | + and add_buf_cmd () = 239 | + if Buffer.length buf_cmd > 0 then 240 | + Buffer.add_string buf (rewrite_cmd (Buffer.contents buf_cmd)) 241 | + in 242 | + try 243 | + iter_ws 0; 244 | + Buffer.contents buf 245 | + with 246 | + | T.Keep -> cmd 247 | 248 | let process_pp_spec syntax_preds packages pp_opts = 249 | (* Returns: pp_command *) 250 | @@ -549,7 +645,7 @@ 251 | None -> [] 252 | | Some cmd -> 253 | ["-pp"; 254 | - cmd ^ " " ^ 255 | + (rewrite_cmd cmd) ^ " " ^ 256 | String.concat " " (List.map Filename.quote pp_i_options) ^ " " ^ 257 | String.concat " " (List.map Filename.quote pp_archives) ^ " " ^ 258 | String.concat " " (List.map Filename.quote pp_opts)] 259 | @@ -625,9 +721,11 @@ 260 | in 261 | try 262 | let preprocessor = 263 | + rewrite_cmd ( 264 | resolve_path 265 | ~base ~explicit:true 266 | - (package_property predicates pname "ppx") in 267 | + (package_property predicates pname "ppx") ) 268 | + in 269 | ["-ppx"; String.concat " " (preprocessor :: options)] 270 | with Not_found -> [] 271 | ) 272 | @@ -895,6 +993,14 @@ 273 | switch (e.g. -L instead of -L ) 274 | *) 275 | 276 | +(* We may need to remove files on which we do not have complete control. 277 | + On Windows, removing a read-only file fails so try to change the 278 | + mode of the file first. *) 279 | +let remove_file fname = 280 | + try Sys.remove fname 281 | + with Sys_error _ when is_win -> 282 | + (try Unix.chmod fname 0o666 with Unix.Unix_error _ -> ()); 283 | + Sys.remove fname 284 | 285 | let ocamlc which () = 286 | 287 | @@ -1022,9 +1128,12 @@ 288 | 289 | "-intf", 290 | Arg.String (fun s -> pass_files := !pass_files @ [ Intf(slashify s) ]); 291 | - 292 | + 293 | "-pp", 294 | - Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" s); 295 | + Arg.String (fun s -> pp_specified := true; add_spec_fn "-pp" (rewrite_pp s)); 296 | + 297 | + "-ppx", 298 | + Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); 299 | 300 | "-thread", 301 | Arg.Unit (fun _ -> threads := threads_default); 302 | @@ -1237,7 +1346,7 @@ 303 | with 304 | any -> 305 | close_out initl; 306 | - Sys.remove initl_file_name; 307 | + remove_file initl_file_name; 308 | raise any 309 | end; 310 | 311 | @@ -1245,9 +1354,9 @@ 312 | at_exit 313 | (fun () -> 314 | let tr f x = try f x with _ -> () in 315 | - tr Sys.remove initl_file_name; 316 | - tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmi"); 317 | - tr Sys.remove (Filename.chop_extension initl_file_name ^ ".cmo"); 318 | + tr remove_file initl_file_name; 319 | + tr remove_file (Filename.chop_extension initl_file_name ^ ".cmi"); 320 | + tr remove_file (Filename.chop_extension initl_file_name ^ ".cmo"); 321 | ); 322 | 323 | let exclude_list = [ stdlibdir; threads_dir; vmthreads_dir ] in 324 | @@ -1493,7 +1602,9 @@ 325 | [ "-v", Arg.Unit (fun () -> verbose := Verbose); 326 | "-pp", Arg.String (fun s -> 327 | pp_specified := true; 328 | - options := !options @ ["-pp"; s]); 329 | + options := !options @ ["-pp"; rewrite_pp s]); 330 | + "-ppx", Arg.String (fun s -> 331 | + options := !options @ ["-ppx"; rewrite_pp s]); 332 | ] 333 | ) 334 | ) 335 | @@ -1672,7 +1783,9 @@ 336 | Arg.String (fun s -> add_spec_fn "-I" (slashify (resolve_path s))); 337 | 338 | "-pp", Arg.String (fun s -> pp_specified := true; 339 | - add_spec_fn "-pp" s); 340 | + add_spec_fn "-pp" (rewrite_pp s)); 341 | + "-ppx", Arg.String (fun s -> add_spec_fn "-ppx" (rewrite_pp s)); 342 | + 343 | ] 344 | ) 345 | ) 346 | @@ -1830,7 +1943,10 @@ 347 | output_string ch_out append; 348 | close_out ch_out; 349 | close_in ch_in; 350 | - Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime; 351 | + (try Unix.utimes outpath s.Unix.st_mtime s.Unix.st_mtime 352 | + with Unix.Unix_error(e,_,_) -> 353 | + prerr_endline("Warning: setting utimes for " ^ outpath 354 | + ^ ": " ^ Unix.error_message e)); 355 | 356 | prerr_endline("Installed " ^ outpath); 357 | with 358 | @@ -1882,6 +1998,8 @@ 359 | Unix.openfile (Filename.concat dir owner_file) [Unix.O_RDONLY] 0 in 360 | let f = 361 | Unix.in_channel_of_descr fd in 362 | + if is_win then 363 | + set_binary_mode_in f false; 364 | try 365 | let line = input_line f in 366 | let is_my_file = (line = pkg) in 367 | @@ -2208,7 +2326,7 @@ 368 | let lines = read_ldconf !ldconf in 369 | let dlldir_norm = Fl_split.norm_dir dlldir in 370 | let dlldir_norm_lc = string_lowercase_ascii dlldir_norm in 371 | - let ci_filesys = (Sys.os_type = "Win32") in 372 | + let ci_filesys = is_win in 373 | let check_dir d = 374 | let d' = Fl_split.norm_dir d in 375 | (d' = dlldir_norm) || 376 | @@ -2356,7 +2474,7 @@ 377 | List.iter 378 | (fun file -> 379 | let absfile = Filename.concat dlldir file in 380 | - Sys.remove absfile; 381 | + remove_file absfile; 382 | prerr_endline ("Removed " ^ absfile) 383 | ) 384 | dll_files 385 | @@ -2365,7 +2483,7 @@ 386 | (* Remove the files from the package directory: *) 387 | if Sys.file_exists pkgdir then begin 388 | let files = Sys.readdir pkgdir in 389 | - Array.iter (fun f -> Sys.remove (Filename.concat pkgdir f)) files; 390 | + Array.iter (fun f -> remove_file (Filename.concat pkgdir f)) files; 391 | Unix.rmdir pkgdir; 392 | prerr_endline ("Removed " ^ pkgdir) 393 | end 394 | @@ -2415,7 +2533,9 @@ 395 | 396 | 397 | let print_configuration() = 398 | + let sl = slashify in 399 | let dir s = 400 | + let s = sl s in 401 | if Sys.file_exists s then 402 | s 403 | else 404 | @@ -2453,27 +2573,27 @@ 405 | if md = "" then "the corresponding package directories" else dir md 406 | ); 407 | Printf.printf "The standard library is assumed to reside in:\n %s\n" 408 | - (Findlib.ocaml_stdlib()); 409 | + (sl (Findlib.ocaml_stdlib())); 410 | Printf.printf "The ld.conf file can be found here:\n %s\n" 411 | - (Findlib.ocaml_ldconf()); 412 | + (sl (Findlib.ocaml_ldconf())); 413 | flush stdout 414 | | Some "conf" -> 415 | - print_endline Findlib_config.config_file 416 | + print_endline (sl Findlib_config.config_file) 417 | | Some "path" -> 418 | - List.iter print_endline (Findlib.search_path()) 419 | + List.iter ( fun x -> print_endline (sl x)) (Findlib.search_path()) 420 | | Some "destdir" -> 421 | - print_endline (Findlib.default_location()) 422 | + print_endline ( sl (Findlib.default_location())) 423 | | Some "metadir" -> 424 | - print_endline (Findlib.meta_directory()) 425 | + print_endline ( sl (Findlib.meta_directory())) 426 | | Some "metapath" -> 427 | let mdir = Findlib.meta_directory() in 428 | let ddir = Findlib.default_location() in 429 | - print_endline 430 | - (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META") 431 | + print_endline ( sl 432 | + (if mdir <> "" then mdir ^ "/META.%s" else ddir ^ "/%s/META")) 433 | | Some "stdlib" -> 434 | - print_endline (Findlib.ocaml_stdlib()) 435 | + print_endline ( sl (Findlib.ocaml_stdlib())) 436 | | Some "ldconf" -> 437 | - print_endline (Findlib.ocaml_ldconf()) 438 | + print_endline ( sl (Findlib.ocaml_ldconf())) 439 | | _ -> 440 | assert false 441 | ;; 442 | @@ -2481,7 +2601,7 @@ 443 | 444 | let ocamlcall pkg cmd = 445 | let dir = package_directory pkg in 446 | - let path = Filename.concat dir cmd in 447 | + let path = rewrite_cmd (Filename.concat dir cmd) in 448 | begin 449 | try Unix.access path [ Unix.X_OK ] 450 | with 451 | @@ -2647,6 +2767,10 @@ 452 | | Sys_error f -> 453 | prerr_endline ("ocamlfind: " ^ f); 454 | exit 2 455 | + | Unix.Unix_error (e, fn, f) -> 456 | + prerr_endline ("ocamlfind: " ^ fn ^ " " ^ f 457 | + ^ ": " ^ Unix.error_message e); 458 | + exit 2 459 | | Findlib.No_such_package(pkg,info) -> 460 | prerr_endline ("ocamlfind: Package `" ^ pkg ^ "' not found" ^ 461 | (if info <> "" then " - " ^ info else "")); 462 | --- ./src/findlib/Makefile 463 | +++ ./src/findlib/Makefile 464 | @@ -90,6 +90,7 @@ 465 | cat findlib_config.mlp | \ 466 | $(SH) $(TOP)/tools/patch '@CONFIGFILE@' '$(OCAMLFIND_CONF)' | \ 467 | $(SH) $(TOP)/tools/patch '@STDLIB@' '$(OCAML_CORE_STDLIB)' | \ 468 | + $(SH) $(TOP)/tools/patch '@EXEC_SUFFIX@' '$(EXEC_SUFFIX)' | \ 469 | sed -e 's;@AUTOLINK@;$(OCAML_AUTOLINK);g' \ 470 | -e 's;@SYSTEM@;$(SYSTEM);g' \ 471 | >findlib_config.ml 472 | @@ -113,7 +114,7 @@ 473 | $(OCAMLC) -a -o num_top.cma $(NUMTOP_OBJECTS) 474 | 475 | clean: 476 | - rm -f *.cmi *.cmo *.cma *.cmx *.a *.o *.cmxa \ 477 | + rm -f *.cmi *.cmo *.cma *.cmx *.lib *.a *.o *.cmxa \ 478 | fl_meta.ml findlib_config.ml findlib.mml topfind.ml topfind \ 479 | ocamlfind$(EXEC_SUFFIX) ocamlfind_opt$(EXEC_SUFFIX) 480 | 481 | @@ -121,7 +122,7 @@ 482 | mkdir -p "$(prefix)$(OCAML_SITELIB)/$(NAME)" 483 | mkdir -p "$(prefix)$(OCAMLFIND_BIN)" 484 | test $(INSTALL_TOPFIND) -eq 0 || cp topfind "$(prefix)$(OCAML_CORE_STDLIB)" 485 | - files=`$(SH) $(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib.a findlib.cmxs topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib_top.cmxa findlib_top.a findlib_top.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload.a findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \ 486 | + files=`$(SH) $(TOP)/tools/collect_files $(TOP)/Makefile.config findlib.cmi findlib.mli findlib.cma findlib.cmxa findlib$(LIB_SUFFIX) findlib.cmxs topfind.cmi topfind.mli fl_package_base.mli fl_package_base.cmi fl_metascanner.mli fl_metascanner.cmi fl_metatoken.cmi findlib_top.cma findlib_top.cmxa findlib_top$(LIB_SUFFIX) findlib_top.cmxs findlib_dynload.cma findlib_dynload.cmxa findlib_dynload$(LIB_SUFFIX) findlib_dynload.cmxs fl_dynload.mli fl_dynload.cmi META` && \ 487 | cp $$files "$(prefix)$(OCAML_SITELIB)/$(NAME)" 488 | f="ocamlfind$(EXEC_SUFFIX)"; { test -f ocamlfind_opt$(EXEC_SUFFIX) && f="ocamlfind_opt$(EXEC_SUFFIX)"; }; \ 489 | cp $$f "$(prefix)$(OCAMLFIND_BIN)/ocamlfind$(EXEC_SUFFIX)" 490 | -------------------------------------------------------------------------------- /server.esy.lock/overrides/opam__s__ocamlfind_opam__c__1.8.0_opam_override/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "build": [ 3 | [ 4 | "bash", 5 | "-c", 6 | "#{os == 'windows' ? 'patch -p1 < findlib-1.8.0.patch' : 'true'}" 7 | ], 8 | [ 9 | "./configure", 10 | "-bindir", 11 | "#{self.bin}", 12 | "-sitelib", 13 | "#{self.lib}", 14 | "-mandir", 15 | "#{self.man}", 16 | "-config", 17 | "#{self.lib}/findlib.conf", 18 | "-no-custom", 19 | "-no-topfind" 20 | ], 21 | [ 22 | "make", 23 | "all" 24 | ], 25 | [ 26 | "make", 27 | "opt" 28 | ] 29 | ], 30 | "install": [ 31 | [ 32 | "make", 33 | "install" 34 | ], 35 | [ 36 | "install", 37 | "-m", 38 | "0755", 39 | "ocaml-stub", 40 | "#{self.bin}/ocaml" 41 | ], 42 | [ 43 | "mkdir", 44 | "-p", 45 | "#{self.toplevel}" 46 | ], 47 | [ 48 | "install", 49 | "-m", 50 | "0644", 51 | "src/findlib/topfind", 52 | "#{self.toplevel}/topfind" 53 | ] 54 | ], 55 | "exportedEnv": { 56 | "OCAML_TOPLEVEL_PATH": { 57 | "val": "#{self.toplevel}", 58 | "scope": "global" 59 | } 60 | } 61 | } 62 | -------------------------------------------------------------------------------- /server.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "reason-graphql-fullstack", 3 | "version": "0.1.0", 4 | "private": true, 5 | "dependencies": { 6 | "ocaml": "~4.7.1000", 7 | "@opam/dune": "*", 8 | "@opam/lwt": "*", 9 | "@opam/yojson": "*", 10 | "@opam/cohttp-lwt": "*", 11 | "@opam/cohttp-lwt-unix": "*", 12 | "@opam/graphql": "*", 13 | "@opam/graphql-lwt": "*", 14 | "@opam/reason": "^3.3.7", 15 | "@opam/sexplib0": ">= 0.11.0", 16 | "@opam/sexplib": ">= 0.11.0" 17 | }, 18 | "devDependencies": { 19 | "@opam/merlin": "*" 20 | }, 21 | "esy": { 22 | "build": "dune build -p #{self.name}" 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /src/client/App.re: -------------------------------------------------------------------------------- 1 | open Shared.Types; 2 | 3 | let str = ReasonReact.string; 4 | 5 | let style = ReactDOMRe.Style.make; 6 | 7 | module TodoItem = { 8 | let component = ReasonReact.statelessComponent("Todo"); 9 | let make = (~item, ~onToggle, ~onEdit, _) => { 10 | ...component, 11 | render: _ => 12 |
23 | 24 |
25 | 26 |
, 27 | }; 28 | }; 29 | 30 | let toggleItem = (item, update) => 31 | Mutations.ToggleTodo.mutate({"id": item.id}) 32 | |> Js.Promise.then_(response => 33 | update(response##toggleTodo) |. Js.Promise.resolve 34 | ); 35 | 36 | let editItem = (item, text, update) => 37 | if (text == "") { 38 | Mutations.RemoveTodo.mutate({"id": item.id}) 39 | |> Js.Promise.then_(response => 40 | update(response##removeTodo) |. Js.Promise.resolve 41 | ); 42 | } else { 43 | text !== item.title ? 44 | Mutations.EditTodo.mutate({"title": text, "id": item.id}) 45 | |> Js.Promise.then_(response => 46 | update(response##editTodo) |. Js.Promise.resolve 47 | ) : 48 | Js.Promise.resolve(); 49 | }; 50 | 51 | let addTodo = (update, text) => 52 | Mutations.AddTodo.mutate({"title": text}) 53 | |> Js.Promise.then_(response => 54 | update(response##addTodo) |. Js.Promise.resolve 55 | ); 56 | 57 | module Todos = { 58 | module TodosQuery = [%graphql 59 | {| 60 | query getTodos { 61 | todos @bsRecord { 62 | id 63 | title 64 | completed 65 | } 66 | } 67 | |} 68 | ]; 69 | let query = TodosQuery.make(); 70 | let component = ReasonReact.reducerComponent("Todos"); 71 | type todos = array(todo); 72 | type data = {. "todos": todos}; 73 | type state = todos; 74 | type action = state => state; 75 | let make = (~data, _) => { 76 | ...component, 77 | initialState: () => data##todos, 78 | reducer: (action, state) => ReasonReact.Update(action(state)), 79 | render: ({state, send}) => { 80 | let updateTodos = todos => send(_ => todos); 81 |
82 | ( 83 | Array.map( 84 | item => 85 | string_of_int) 88 | onToggle=(_ => toggleItem(item, updateTodos) |. ignore) 89 | onEdit=(text => editItem(item, text, updateTodos)) 90 | />, 91 | state, 92 | ) 93 | |> ReasonReact.array 94 | ) 95 | 102 |
; 103 | }, 104 | }; 105 | }; 106 | 107 | module GraphQLTodos = Loader.F(Todos); 108 | 109 | module Page = { 110 | let component = ReasonReact.statelessComponent("Page"); 111 | let make = _children => { 112 | ...component, 113 | render: _ => 114 |
122 |
130 | (str("Reason GraphQL Fullstack Todo List")) 131 |
132 | 133 |
, 134 | }; 135 | }; 136 | 137 | ReactDOMRe.renderToElementWithId(, "index"); 138 | -------------------------------------------------------------------------------- /src/client/Editor.re: -------------------------------------------------------------------------------- 1 | let style = ReactDOMRe.Style.make; 2 | 3 | let evtValue = event => ReactDOMRe.domElementToObj( 4 | ReactEventRe.Form.target(event), 5 | )##value; 6 | 7 | type retainedProps = string; 8 | 9 | let component = ReasonReact.reducerComponentWithRetainedProps("Editor"); 10 | 11 | let make = (~value, ~onChange, ~placeholder, ~className="", ~clear=false, _) => { 12 | ...component, 13 | initialState: () => None, 14 | reducer: (action, state) => ReasonReact.Update(action(state)), 15 | retainedProps: value, 16 | willReceiveProps: ({state, retainedProps}) => 17 | switch (state) { 18 | | None => None 19 | | Some(text) => 20 | retainedProps === value && value !== text ? Some(text) : None 21 | }, 22 | render: ({state, send}) => 23 | switch (state) { 24 | | None => 25 |
{ 30 | ReactEventRe.Mouse.stopPropagation(evt); 31 | send(_ => Some(value)); 32 | } 33 | )> 34 | (ReasonReact.string(value === "" ? placeholder : value)) 35 |
36 | | Some(text) => 37 | { 44 | let value = evtValue(evt); 45 | send(_ => Some(value)); 46 | } 47 | ) 48 | onClick=(evt => ReactEventRe.Mouse.stopPropagation(evt)) 49 | onKeyDown=( 50 | evt => 51 | switch (ReactEventRe.Keyboard.key(evt)) { 52 | | "Enter" => 53 | if (text == value) { 54 | send(_ => None); 55 | } else { 56 | onChange(text); 57 | if (clear) { 58 | send(_ => Some(value)); 59 | }; 60 | } 61 | | _ => () 62 | } 63 | ) 64 | style=( 65 | style(~fontFamily="inherit", ~flex="1", ~fontSize="inherit", ()) 66 | ) 67 | onBlur=( 68 | _ => 69 | if (text != value) { 70 | onChange(text); 71 | if (clear) { 72 | send(_ => Some(value)); 73 | }; 74 | } else { 75 | send(_ => None); 76 | } 77 | ) 78 | /> 79 | }, 80 | }; 81 | -------------------------------------------------------------------------------- /src/client/Loader.re: -------------------------------------------------------------------------------- 1 | module type Config = { 2 | type data; 3 | type state; 4 | type action; 5 | let query: { 6 | . 7 | "parse": Js.Json.t => data, 8 | "query": string, 9 | "variables": Js.Json.t, 10 | }; 11 | let make: 12 | (~data: data, array(int)) => 13 | ReasonReact.componentSpec( 14 | state, 15 | state, 16 | ReasonReact.noRetainedProps, 17 | ReasonReact.noRetainedProps, 18 | action, 19 | ); 20 | }; 21 | 22 | let style = ReactDOMRe.Style.make; 23 | 24 | exception Graphql_error(string); 25 | 26 | let sendQuery = q => 27 | Bs_fetch.( 28 | fetchWithInit( 29 | "/graphql", 30 | RequestInit.make( 31 | ~method_=Post, 32 | ~body= 33 | Js.Dict.fromList([ 34 | ("query", Js.Json.string(q##query)), 35 | ("variables", q##variables), 36 | ]) 37 | |> Js.Json.object_ 38 | |> Js.Json.stringify 39 | |> BodyInit.make, 40 | ~credentials=Include, 41 | ~headers= 42 | HeadersInit.makeWithArray([| 43 | ("content-type", "application/json"), 44 | |]), 45 | (), 46 | ), 47 | ) 48 | |> Js.Promise.then_(resp => 49 | if (Response.ok(resp)) { 50 | Response.json(resp) 51 | |> Js.Promise.then_(data => 52 | switch (Js.Json.decodeObject(data)) { 53 | | Some(obj) => 54 | Js.Dict.unsafeGet(obj, "data") 55 | |> q##parse 56 | |> Js.Promise.resolve 57 | | None => 58 | Js.Promise.reject( 59 | Graphql_error("Response is not an object"), 60 | ) 61 | } 62 | ); 63 | } else { 64 | Response.text(resp) 65 | |> Js.Promise.then_(text => 66 | Js.Promise.reject( 67 | Graphql_error( 68 | "Request failed: " 69 | ++ string_of_int(Response.status(resp)) 70 | ++ " " 71 | ++ Response.statusText(resp) 72 | ++ "\n" 73 | ++ text, 74 | ), 75 | ) 76 | ); 77 | } 78 | ) 79 | ); 80 | 81 | module F = (Config: Config) => { 82 | type state = 83 | | Loading 84 | | Error(string) 85 | | Loaded(Config.data); 86 | let component = ReasonReact.reducerComponent("Loader"); 87 | let make = _children => { 88 | ...component, 89 | initialState: () => Loading, 90 | reducer: (action, state) => ReasonReact.Update(action(state)), 91 | didMount: ({send}) => 92 | sendQuery(Config.query) 93 | |> Js.Promise.then_(response => 94 | send(_ => Loaded(response)) |> Js.Promise.resolve 95 | ) 96 | |> Js.Promise.catch(_ => 97 | send(_ => Error("Couldn't get todos")) |> Js.Promise.resolve 98 | ) 99 | |> ignore, 100 | render: self => 101 | switch (self.state) { 102 | | Loading => 103 |
107 | (ReasonReact.string("Loading")) 108 |
109 | | Error(text) => 110 |
(ReasonReact.string("Error")) (ReasonReact.string(text))
111 | | Loaded(data) => 112 | }, 113 | }; 114 | }; 115 | -------------------------------------------------------------------------------- /src/client/Mutations.re: -------------------------------------------------------------------------------- 1 | open Shared.Types; 2 | 3 | module type MutationType = { 4 | type t; 5 | type variables; 6 | 7 | module Mutation: { 8 | let makeWithVariables: 9 | variables => 10 | { 11 | . 12 | "parse": Js.Json.t => t, 13 | "query": string, 14 | "variables": Js.Json.t, 15 | }; 16 | }; 17 | }; 18 | 19 | module CreateMutation = (Config: MutationType) => { 20 | let mutate = variables => { 21 | let mutation = Config.Mutation.makeWithVariables(variables); 22 | Loader.sendQuery(mutation); 23 | }; 24 | }; 25 | 26 | module AddTodoMutation = { 27 | module Mutation = [%graphql 28 | {| 29 | mutation addTodo($title: String!) { 30 | addTodo(title: $title, completed: false) @bsRecord { 31 | id 32 | title 33 | completed 34 | } 35 | } 36 | |} 37 | ]; 38 | type t = {. "addTodo": Js.Array.t(Shared.Types.todo)}; 39 | type variables = {. "title": string}; 40 | }; 41 | 42 | module AddTodo = CreateMutation(AddTodoMutation); 43 | 44 | module ToggleTodoMutation = { 45 | module Mutation = [%graphql 46 | {| 47 | mutation toggleTodo($id: Int!) { 48 | toggleTodo(id: $id) @bsRecord { 49 | id 50 | title 51 | completed 52 | } 53 | } 54 | |} 55 | ]; 56 | type t = {. "toggleTodo": Js.Array.t(Shared.Types.todo)}; 57 | type variables = {. "id": int}; 58 | }; 59 | 60 | module ToggleTodo = CreateMutation(ToggleTodoMutation); 61 | 62 | module EditTodoMutation = { 63 | module Mutation = [%graphql 64 | {| 65 | mutation editTodo($id: Int!, $title: String!) { 66 | editTodo(id: $id, title: $title) @bsRecord { 67 | id 68 | title 69 | completed 70 | } 71 | } 72 | |} 73 | ]; 74 | type t = {. "editTodo": Js.Array.t(Shared.Types.todo)}; 75 | type variables = { 76 | . 77 | "title": string, 78 | "id": int, 79 | }; 80 | }; 81 | 82 | module EditTodo = CreateMutation(EditTodoMutation); 83 | 84 | module RemoveTodoMutation = { 85 | module Mutation = [%graphql 86 | {| 87 | mutation removeTodo($id: Int!) { 88 | removeTodo(id: $id) @bsRecord { 89 | id 90 | title 91 | completed 92 | } 93 | } 94 | |} 95 | ]; 96 | type t = {. "removeTodo": Js.Array.t(Shared.Types.todo)}; 97 | type variables = {. "id": int}; 98 | }; 99 | 100 | module RemoveTodo = CreateMutation(RemoveTodoMutation); 101 | -------------------------------------------------------------------------------- /src/server/dune: -------------------------------------------------------------------------------- 1 | (executable 2 | (name main) 3 | (public_name graphql) 4 | (libraries shared lwt cohttp cohttp-lwt-unix graphql-lwt yojson str) 5 | (flags (:standard -w -9))) 6 | 7 | -------------------------------------------------------------------------------- /src/server/main.re: -------------------------------------------------------------------------------- 1 | let main = () => Server.start(~ctx=_req => (), Schema.schema) |> Lwt_main.run; 2 | 3 | main(); 4 | -------------------------------------------------------------------------------- /src/server/schema.re: -------------------------------------------------------------------------------- 1 | open Shared.Types; 2 | 3 | module GQL = Graphql_lwt; 4 | 5 | type appState = { 6 | nextId: int, 7 | todos, 8 | }; 9 | 10 | let appState = 11 | ref({ 12 | nextId: 1, 13 | todos: [{id: 0, title: "Add some things to do", completed: false}], 14 | }); 15 | 16 | let todo = 17 | GQL.Schema.( 18 | obj("todo", ~fields=_ => 19 | [ 20 | field("id", ~args=Arg.[], ~typ=non_null(int), ~resolve=({ ctx : ()}, p) => 21 | p.id 22 | ), 23 | field("title", ~args=Arg.[], ~typ=non_null(string), ~resolve=(_ctx, p) => 24 | p.title 25 | ), 26 | field( 27 | "completed", ~args=Arg.[], ~typ=non_null(bool), ~resolve=(_ctx, p) => 28 | p.completed 29 | ), 30 | ] 31 | ) 32 | ); 33 | 34 | let schema = 35 | GQL.Schema.( 36 | schema( 37 | [ 38 | io_field( 39 | "todos", 40 | ~args=Arg.[], 41 | ~typ=non_null(list(non_null(todo))), 42 | ~resolve=(_ctx, ()) 43 | /* Hack: reverse the list because we insert new todos at the head */ 44 | => Lwt_result.return(appState^.todos |> List.rev)), 45 | ], 46 | ~mutations=[ 47 | io_field( 48 | "addTodo", 49 | ~typ=non_null(list(non_null(todo))), 50 | ~args= 51 | Arg.[ 52 | arg("title", ~typ=non_null(string)), 53 | arg("completed", ~typ=non_null(bool)), 54 | ], 55 | ~resolve=(_, _, title, completed) => { 56 | let newId = appState^.nextId; 57 | let newTodo = {id: newId, title, completed}; 58 | appState := 59 | {nextId: newId + 1, todos: [newTodo, ...appState^.todos]}; 60 | Lwt_result.return(appState^.todos |> List.rev); 61 | }, 62 | ), 63 | io_field( 64 | "toggleTodo", 65 | ~typ=non_null(list(non_null(todo))), 66 | ~args=Arg.[arg("id", ~typ=non_null(int))], 67 | ~resolve=(_, _, idToToggle) => { 68 | appState := 69 | { 70 | ...appState^, 71 | todos: 72 | List.map( 73 | ({id, completed} as todo) => 74 | if (id == idToToggle) { 75 | {...todo, completed: !completed}; 76 | } else { 77 | todo; 78 | }, 79 | appState^.todos, 80 | ), 81 | }; 82 | 83 | Lwt_result.return(appState^.todos |> List.rev); 84 | }, 85 | ), 86 | io_field( 87 | "editTodo", 88 | ~typ=non_null(list(non_null(todo))), 89 | ~args= 90 | Arg.[ 91 | arg("id", ~typ=non_null(int)), 92 | arg("title", ~typ=non_null(string)), 93 | ], 94 | ~resolve=(_, _, idToEdit, title) => { 95 | appState := 96 | { 97 | ...appState^, 98 | todos: 99 | List.map( 100 | ({id} as todo) => 101 | if (id == idToEdit) { 102 | {...todo, title}; 103 | } else { 104 | todo; 105 | }, 106 | appState^.todos, 107 | ), 108 | }; 109 | Lwt_result.return(appState^.todos |> List.rev); 110 | }, 111 | ), 112 | io_field( 113 | "removeTodo", 114 | ~typ=non_null(list(non_null(todo))), 115 | ~args=Arg.[arg("id", ~typ=non_null(int))], 116 | ~resolve=(_, _, idToRemove) => { 117 | appState := 118 | { 119 | ...appState^, 120 | todos: 121 | List.filter(({id}) => id !== idToRemove, appState^.todos), 122 | }; 123 | Lwt_result.return(appState^.todos |> List.rev); 124 | }, 125 | ), 126 | ], 127 | ) 128 | ); 129 | -------------------------------------------------------------------------------- /src/server/server.re: -------------------------------------------------------------------------------- 1 | open Lwt.Infix; 2 | 3 | module C = Cohttp_lwt_unix; 4 | 5 | module CServer = Cohttp_lwt_unix.Server; 6 | 7 | module Schema = Graphql_lwt.Schema; 8 | 9 | let serveStatic = (base, path) => { 10 | let fname = Filename.concat(base, path); 11 | if (Sys.file_exists(fname)) { 12 | if (Sys.is_directory(fname)) { 13 | if (Sys.file_exists(Filename.concat(fname, "index.html"))) { 14 | CServer.respond_file( 15 | ~fname=Filename.concat(fname, "index.html"), 16 | (), 17 | ); 18 | } else { 19 | C.Server.respond_string(~status=`Not_found, ~body="", ()); 20 | }; 21 | } else { 22 | CServer.respond_file(~fname, ()); 23 | }; 24 | } else if (Sys.file_exists(fname ++ ".html")) { 25 | CServer.respond_file(~fname=fname ++ ".html", ()); 26 | } else { 27 | C.Server.respond_string(~status=`Not_found, ~body="", ()); 28 | }; 29 | }; 30 | 31 | let json_err = 32 | fun 33 | | Ok(_) as ok => ok 34 | | Error(err) => Error(`String(err)); 35 | 36 | let execute_query = (ctx, schema, variables, query) => 37 | Lwt_result.( 38 | Lwt.return @@ 39 | json_err @@ 40 | Graphql_parser.parse(query) 41 | >>= (doc => Schema.execute(schema, ctx, ~variables, doc)) 42 | ); 43 | 44 | let execute_request = (ctx, schema, _req, body) => 45 | Cohttp_lwt.Body.to_string(body) 46 | >>= ( 47 | body' => { 48 | Printf.printf("Body: %s\n%!", body'); 49 | let json = Yojson.Basic.from_string(body'); 50 | let query = 51 | Yojson.Basic.(json |> Util.member("query") |> Util.to_string); 52 | let variables = 53 | try (Yojson.Basic.Util.(json |> member("variables") |> to_assoc)) { 54 | | _ => [] 55 | }; 56 | Printf.printf("Query: %s\n%!", query); 57 | let result = 58 | execute_query( 59 | ctx, 60 | schema, 61 | (variables :> list((string, Graphql_parser.const_value))), 62 | query, 63 | ); 64 | result 65 | >>= ( 66 | fun 67 | | Ok(`Response(data)) => { 68 | let body = Yojson.Basic.to_string(data); 69 | C.Server.respond_string(~status=`OK, ~body, ()); 70 | } 71 | | Ok(`Stream(_)) => 72 | C.Server.respond_error( 73 | ~body="Subscriptions are not implemented by this server.", 74 | (), 75 | ) 76 | | Error(err) => { 77 | let body = Yojson.Basic.to_string(err); 78 | C.Server.respond_error(~body, ()); 79 | } 80 | ); 81 | } 82 | ); 83 | 84 | let mk_callback = (mk_context, schema, _conn, req: Cohttp.Request.t, body) => { 85 | Printf.printf("Req: %s\n%!", req.resource); 86 | let req_path = Cohttp.Request.uri(req) |> Uri.path; 87 | let path_parts = Str.(split(regexp("/"), req_path)); 88 | switch (req.meth, path_parts) { 89 | | (`GET, ["graphql"]) => serveStatic("./public", "graphiql.html") 90 | /* | (`GET, ["graphql", path]) => serveStatic(path) */ 91 | | (`POST, ["graphql"]) => 92 | execute_request(mk_context(req), schema, req, body) 93 | | (`GET, _) => serveStatic("./public", req_path) 94 | | _ => C.Server.respond_string(~status=`Not_found, ~body="", ()) 95 | }; 96 | }; 97 | 98 | let start = (~port=8080, ~ctx, schema) => { 99 | let callback = mk_callback(ctx, schema); 100 | C.Server.create(~mode=`TCP(`Port(port)), C.Server.make(~callback, ())); 101 | }; 102 | -------------------------------------------------------------------------------- /src/shared/Shared.re: -------------------------------------------------------------------------------- 1 | module Types = { 2 | type todo = { 3 | id: int, 4 | title: string, 5 | completed: bool 6 | }; 7 | type todos = list(todo); 8 | }; 9 | -------------------------------------------------------------------------------- /src/shared/dune: -------------------------------------------------------------------------------- 1 | (library 2 | (name shared)) 3 | -------------------------------------------------------------------------------- /webpack.config.js: -------------------------------------------------------------------------------- 1 | module.exports = { 2 | entry: './lib/js/src/client/App.js', 3 | output: { 4 | path: __dirname +'/public', 5 | filename: 'bundle.js', 6 | }, 7 | }; 8 | --------------------------------------------------------------------------------