echo 'true : package(landmarks.ppx,landmarks)' >> _tags
export OCAML_LANDMARK=auto
topkg build
topkg run exe
View opam #4445
> opam switch create 4.06.0 --debug-level=3 | |
00:00.003 GSTATE LOAD-GLOBAL-STATE @ /Users/dbuenzli/.opam | |
00:00.004 SYSTEM LOCK /Users/dbuenzli/.opam/lock (none => read) | |
00:00.004 SYSTEM LOCK /Users/dbuenzli/.opam/config.lock (none => write) | |
00:00.004 FILE(config) Read ~/.opam/config in 0.000s | |
00:00.005 RSTATE LOAD-REPOSITORY-STATE @ /Users/dbuenzli/.opam | |
00:00.008 FILE(repos-config) Read ~/.opam/repo/repos-config in 0.003s | |
00:00.008 SYSTEM LOCK /Users/dbuenzli/.opam/repo/state.cache (none => read) | |
00:00.108 RSTATE Loaded /Users/dbuenzli/.opam/repo/state.cache in 0.099s | |
00:00.264 SYSTEM LOCK /Users/dbuenzli/.opam/repo/state.cache (read => none) |
View landmark.md
View ocaml-deprecate.md
Deprecation procedure for OCaml
In order to deprecate a feature from the OCaml system the following steps are taken:
- Introduce a workaround for the deprecation (if needed). Document the workaround, see below.
- When Debian stable has the version in which the workaround was introduced, start deprecating the feature with a visible warning
View readmeta.ml
(* | |
ocamlfind ocamlopt -o readmeta -linkpkg \ | |
-package dynlink,compiler-libs.optcomp,compiler-libs.bytecomp readmeta.ml | |
*) | |
let read_cma ic = | |
let lib = | |
let toc_pos = input_binary_int ic in | |
seek_in ic toc_pos; | |
(input_value ic : Cmo_format.library) |
View ocaml-emacs.md
Install the following opam packages:
opam install caml-mode merlin ocp-indent
Tweak your .emacs
file with some or all of the following:
; shift tab to complete
(global-set-key (kbd "S-<tab>") 'company-complete)
View ioserial.ml
(*---------------------------------------------------------------------------- | |
Copyright (c) 2009, Daniel C. Bünzli. All rights reserved. | |
Distributed under a BSD license, see license at the end of the file. | |
----------------------------------------------------------------------------*) | |
let str = Printf.sprintf | |
let exec = Filename.basename Sys.executable_name | |
let pr = Format.printf | |
let pr_err s = Printf.eprintf "%s:%s\n" exec s |
View opam
opam-version: "2.0" | |
synopsis: "Build setenv" | |
maintainer: "Daniel Bünzli <daniel.buenzl i@erratique.ch>" | |
setenv: [[BLA += "BLA"]] | |
authors:[] | |
build:[[ "env" ]] |
View opam
opam-version: "2.0" | |
synopsis: "Build environment" | |
maintainer: "Daniel Bünzli <daniel.buenzl i@erratique.ch>" | |
authors:[] | |
build:[[ "env" ]] |
View Vagrantfile
# Download vagrant box for Windows 10 from: | |
# | |
# https://developer.microsoft.com/en-us/microsoft-edge/tools/vms/ | |
# | |
# Unzip and add with: | |
# | |
# vagrant box add --name win10 MSEdge\ -\ Win10.box | |
# | |
# During the first `vagrant up` need to connect to vm UI to do this: | |
# |
NewerOlder