Ocaml & Opam
perf: profile ocaml performance
Description | Command |
---|---|
Profile file | sudo perf record --call-graph lbr -- OCAML_BIN |
Profile with name | sudo perf record --call-graph lbr -o perf.data.old -- OCAML_BIN |
Compare perf files | sudo perf diff perf.data.old perf.data |
A good pointer: here
Opam
Main commands
Description | Command |
---|---|
Create global switch | opam switch create SWITCH_NAME 4.14.1 |
Create local switch | opam switch create . 4.14.1 |
Remove switch | opam switch remove SWITCH_NAME |
Export switch | opam switch export FILE_EXPORT.txt --switch SWITCH_NAME |
Import switch | opam switch import FILE_EXPORT.txt --switch SWITCH_NAME |
Install only deps | opam install --deps-only PKG_NAME |
Pin git branch | opam pin add https://github.com/PATH_TO_REPO.git#BRANCH_NAME |
Install pkg version | opam install PKG_NAME=VERSION |
Create empty switch for coq
opam switch create SWITCH_NAME 4.14.1
opam switch SWITCH_NAME
eval $(opam env)
opam install --deps-only coq-core coq-elpi ocamlformat
./configure
- the first answer is
/home/USER/.opam/SWITCH_NAME/bin
- the other add the suggested postfix to the previous path without bin
- the first answer is
make world
dune install coq-core coq-stdlib coqide-server
Rectype error in lsp-server
Use merlin file to get dependency in a ocaml project not using
dune
make .merlin
touch dune-project
- in
./.vscode/settings.json
1 2 3
"ocaml.server.args": [ "--fallback-read-dot-merlin" ]
Vnorm error in coq-elpi
git clean -dfx
Opam exported files
- Coq end elpi : here
Useful links
This post is licensed under
CC BY 4.0
by the author.