Skip to content

Commit

Permalink
init commit
Browse files Browse the repository at this point in the history
  • Loading branch information
haochenx committed May 30, 2020
0 parents commit 6b6d5f6
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 0 deletions.
10 changes: 10 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
*~
*.cm*
.merlin
*.install
src/tests/*.iml
_build
_opam
\#*\#
.\#*
docker/Dockerfile
9 changes: 9 additions & 0 deletions .gitmodules
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
41 changes: 41 additions & 0 deletions SCAML-SETUP.md
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
1 change: 1 addition & 0 deletions vendors/ppx_meta_conv
Submodule ppx_meta_conv added at 88f8f3
1 change: 1 addition & 0 deletions vendors/scaml
Submodule scaml added at efa544
1 change: 1 addition & 0 deletions vendors/spotlib
Submodule spotlib added at e84524

0 comments on commit 6b6d5f6

Please sign in to comment.