Lars Hupel
2018-10-05 15:52:02 UTC
I'm circling back to an old email thread about OCaml support in
Isabelle:
<https://mailmanbroy.informatik.tu-muenchen.de/pipermail/isabelle-dev/2018-May/007874.html>
The consensus, as far as I understood it, was to bundle OPAM as an
Isabelle component.
While Ubuntu 18.04 LTS still ships a "good" compiler version (4.05.0), I
think this is unfinished business and should be addressed. I'm pretty
sure Ubuntu 19.04 will ship a newer version, and people on other
platforms like Arch, Fedora and macOS may already have one that doesn't
work. Additionally, while preparing distribution upgrades through our
chair infrastructure, I'd really like to have a dependable OCaml version.
I have prepared a component that attempts to do just that:
<https://github.com/larsrh/isabelle-opam>
Steps to use it:
1) Clone the repository.
2) Run "./get_opam.sh", which will download the latest OPAM version
(2.0) for all supported platforms and verifies the checksum.
3) Register as a component in "~/.isabelle/etc/components".
4) Run "isabelle opam_setup".
5) To try it out, build the session "HOL-Codegenerator_Test", which
should successfully build the theory "Code_Test_OCaml".
This will:
- automatically set the "ISABELLE_OCAML" and "ISABELL_OCAMLC" variables
- provide the Isabelle tools "ocaml" and "ocamlc"
- upon use, download and install OCaml 4.05.0 into "~/.isabelle/opam" so
that it doesn't interfere with any user installation
- read the "ISABELLE_OCAML_VERSION" variable and pick the compiler
version accordingly
(Un)known issues:
- may not be thread-safe (to be investigated; it appears that OPAM locks
its workspace)
- can't install packages yet (like "zarith"), but for 4.05.0 that's
unproblematic
All the heavy lifting is done by OPAM, which means the component just
has maybe 70 lines of scripts.
So far, I have not yet uploaded this to
<https://isabelle.in.tum.de/components/>, and I don't plan to do that
just yet.
Next: Packaging stack, because the Haskell version mess is even bigger
than for OCaml.
Isabelle:
<https://mailmanbroy.informatik.tu-muenchen.de/pipermail/isabelle-dev/2018-May/007874.html>
The consensus, as far as I understood it, was to bundle OPAM as an
Isabelle component.
While Ubuntu 18.04 LTS still ships a "good" compiler version (4.05.0), I
think this is unfinished business and should be addressed. I'm pretty
sure Ubuntu 19.04 will ship a newer version, and people on other
platforms like Arch, Fedora and macOS may already have one that doesn't
work. Additionally, while preparing distribution upgrades through our
chair infrastructure, I'd really like to have a dependable OCaml version.
I have prepared a component that attempts to do just that:
<https://github.com/larsrh/isabelle-opam>
Steps to use it:
1) Clone the repository.
2) Run "./get_opam.sh", which will download the latest OPAM version
(2.0) for all supported platforms and verifies the checksum.
3) Register as a component in "~/.isabelle/etc/components".
4) Run "isabelle opam_setup".
5) To try it out, build the session "HOL-Codegenerator_Test", which
should successfully build the theory "Code_Test_OCaml".
This will:
- automatically set the "ISABELLE_OCAML" and "ISABELL_OCAMLC" variables
- provide the Isabelle tools "ocaml" and "ocamlc"
- upon use, download and install OCaml 4.05.0 into "~/.isabelle/opam" so
that it doesn't interfere with any user installation
- read the "ISABELLE_OCAML_VERSION" variable and pick the compiler
version accordingly
(Un)known issues:
- may not be thread-safe (to be investigated; it appears that OPAM locks
its workspace)
- can't install packages yet (like "zarith"), but for 4.05.0 that's
unproblematic
All the heavy lifting is done by OPAM, which means the component just
has maybe 70 lines of scripts.
So far, I have not yet uploaded this to
<https://isabelle.in.tum.de/components/>, and I don't plan to do that
just yet.
Next: Packaging stack, because the Haskell version mess is even bigger
than for OCaml.