I've talked about polyglot ATS/Haskell builds previously, but I wanted to show off the results of all this work without so much didactic focus.
This does the following:
- Calls
atspkg
within theSetup.hs
file atspkg
then reads the Dhall configuration file as in any otheratspkg
build.atspkg
, using the configuration information obtained, downloads and installs the appropriate compiler ATS dependencies.atspkg
builds the library with shake, generatinglibnumbertheory.a
- We then modify the library path inside
Setup.hs
to allow the linker to findlibnumbertheory.a
This is actually robust enough to distribute: we do have to add a dummy file
dist-newstyle/lib/empty
in order to allow it under extra-lib-dirs
, but this
rube goldberg build passes the Hackage matrix CI. It has the downside of
bringing in quite a few dependencies, but it avoids the need for hand-packaging
ATS.