- Create a dune file:
(library
(public_name aggregate_ppx_name)
(kind ppx_rewriter)
(libraries ppx_deriving_protobuf other_ppx another_ppx))
- Build:
dune build --profile release
type t('list, 'last) = | |
| []: t('a, 'a) | |
| ::('a, t('l, 't)): t('a => 'l, 't); | |
let rec (@): | |
type start mid rest. (t(start, mid => rest), mid) => t(start, rest) = | |
(l, r) => | |
switch (l) { | |
| [] => [r] | |
| [a, ...q] => [a, ...q @ r] |
(library
(public_name aggregate_ppx_name)
(kind ppx_rewriter)
(libraries ppx_deriving_protobuf other_ppx another_ppx))
dune build --profile release
type validatorData('a) = { | |
value: 'a, | |
isTouched: bool, | |
submitted: bool, | |
}; | |
type shouldDisplayError('error) = { | |
error: 'error, | |
isTouched: bool, | |
submitted: bool, |
λ esy build-plan -p @opam/postgresql | |
{ | |
"id": "opam__s__postgresql-opam__c__4.5.2-7fdcd1e6", | |
"name": "@opam/postgresql", | |
"version": "opam:4.5.2", | |
"sourceType": "immutable", | |
"buildType": "in-source", | |
"build": [ [ "dune", "build", "-p", "postgresql", "-j", "4" ] ], | |
"install": [], | |
"sourcePath": |
vim
+ official ocaml-lsp setup for Reason/OCamlesy 0.6.0
.esy version
(it has to be >0.6.0
)esy.json
with the following contents next to package.json
:Sending build context to Docker daemon 1.931MB | |
Step 1/7 : FROM ulrikaugustsson/esy:latest | |
---> e2f92066e3df | |
Step 2/7 : ARG ocaml_version=4.9.0 | |
---> Using cache | |
---> eb02038ad958 | |
Step 3/7 : ENV TERM=dumb LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib | |
---> Using cache | |
---> 2602c8833912 |
input
output
#!/bin/zsh | |
PID_FILE="$HOME/.boundary_session_ttcp_BRTTDbGBAK" | |
connect() { | |
echo "Inititating a boundary session to k8s..." | |
TMP_FILE=$(mktemp) | |
nohup -- boundary connect -target-id ttcp_BRTTDbGBAK -format json &> $TMP_FILE & | |
CONNECT_PID=$! |
type expectException | |
type expect<'a, 'ret> | |
@module("@jest/globals") external describe: (string, unit => unit) => unit = "describe" | |
@module("@jest/globals") external test: (string, unit => unit) => unit = "test" | |
@module("@jest/globals") external testAsync: (string, unit => Js.Promise.t<unit>) => unit = "test" | |
@module("@jest/globals") external expect: 'a => expect<'a, unit> = "expect" | |
@module("@jest/globals") external expectF: (unit => 'a) => expect<expectException, unit> = "expect" | |
@module("@jest/globals") |