mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-06 22:23:42 +01:00
30 lines
726 B
Org Mode
30 lines
726 B
Org Mode
|
#+begin_src elisp tangle: no :results none :exports none
|
||
|
(setq pwd (file-name-directory buffer-file-name))
|
||
|
(setq name (file-name-nondirectory (substring buffer-file-name 0 -4)))
|
||
|
(setq lib (concat pwd "lib/"))
|
||
|
(setq testdir (concat pwd "test/"))
|
||
|
(setq mli (concat lib name ".mli"))
|
||
|
(setq ml (concat lib name ".ml"))
|
||
|
(setq test-ml (concat testdir name ".ml"))
|
||
|
(org-babel-tangle)
|
||
|
#+end_src
|
||
|
|
||
|
* Zmap
|
||
|
:PROPERTIES:
|
||
|
:header-args: :noweb yes :comments both
|
||
|
:END:
|
||
|
|
||
|
A hash table where the keys are ~Zkey~
|
||
|
|
||
|
** Type
|
||
|
|
||
|
#+begin_src ocaml :tangle (eval mli)
|
||
|
include module type of Hashtbl.Make(Zkey)
|
||
|
#+end_src
|
||
|
|
||
|
#+begin_src ocaml :tangle (eval ml) :exports none
|
||
|
module Zmap = Hashtbl.Make(Zkey)
|
||
|
include Zmap
|
||
|
#+end_src
|
||
|
|