-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 6b6d5f6
Showing
6 changed files
with
63 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
*~ | ||
*.cm* | ||
.merlin | ||
*.install | ||
src/tests/*.iml | ||
_build | ||
_opam | ||
\#*\# | ||
.\#* | ||
docker/Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
[submodule "vendors/spotlib"] | ||
path = vendors/spotlib | ||
url = https://gitlab.com/camlspotter/spotlib | ||
[submodule "vendors/ppx_meta_conv"] | ||
path = vendors/ppx_meta_conv | ||
url = https://gitlab.com/camlspotter/ppx_meta_conv | ||
[submodule "vendors/scaml"] | ||
path = vendors/scaml | ||
url = https://gitlab.com/haochenxie/scaml.git |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
### scaml compilation and installation | ||
|
||
first of all, have `opam` installed and initialized | ||
|
||
(at the project root directory) | ||
$ opam switch create . ocaml-base-compiler.4.09.1 | ||
$ git submodule init | ||
$ git submodule update | ||
$ opam install -y vendors/*/*.opam | ||
|
||
this should setup a local opam switch and install scaml as well. | ||
|
||
### on merlin and emacs | ||
|
||
it is highly recommended to install `merlin` for the purpose of | ||
development. | ||
|
||
for emacs, the `tuareg` package is recommended for the authoring of | ||
OCaml files. | ||
|
||
to make emacs happy with local opam switches, you may find the | ||
following elisp helpful | ||
|
||
```elisp | ||
(defun opam-env () | ||
(interactive nil) | ||
(dolist (var (car (read-from-string (shell-command-to-string "opam config env --sexp")))) | ||
(setenv (car var) (cadr var)))) | ||
``` | ||
|
||
### on utop | ||
|
||
it is recommended to launch utop with dune, which could be done as: | ||
|
||
(under a project that refers scaml.inlined) | ||
$ dune utop | ||
|
||
(in emacs) | ||
$ dune utop . -- -emacs | ||
|
||
without doubt, there is a utop mode for emacs available |
Submodule ppx_meta_conv
added at
88f8f3
Submodule scaml
added at
efa544
Submodule spotlib
added at
e84524