mirror of
https://gitlab.com/scemama/QCaml.git
synced 2024-11-13 09:33:41 +01:00
44 lines
883 B
Org Mode
44 lines
883 B
Org Mode
#+TITLE: Top-level
|
|
#+SETUPFILE: ../docs/theme.setup
|
|
|
|
* Summary
|
|
|
|
#+name: synopsis
|
|
#+begin_src ocaml :exports none :results value
|
|
"Installs pretty printers for top-level"
|
|
#+end_src
|
|
|
|
#+RESULTS: synopsis
|
|
: Installs pretty printers for top-level
|
|
|
|
|
|
* Dune files :noexport:
|
|
|
|
** Generate dune files
|
|
|
|
Use [C-c C-c] on the code below to create the output for the dune files
|
|
|
|
#+header: :noweb strip-export
|
|
#+header: :var name=(file-name-directory buffer-file-name)
|
|
#+begin_src python :exports none :results output none
|
|
name = name.split('/')[-2]
|
|
synopsis = """
|
|
<<synopsis>>
|
|
"""
|
|
|
|
with open("lib/dune",'w') as f:
|
|
f.write(f"""
|
|
(library
|
|
(name {name})
|
|
(public_name qcaml.{name})
|
|
(synopsis {synopsis} )
|
|
(modes byte)
|
|
(libraries
|
|
compiler-libs.toplevel
|
|
qcaml
|
|
)
|
|
(instrumentation (backend landmarks))
|
|
)
|
|
""")
|
|
#+end_src
|