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 the Setup.hs file
• atspkg then reads the Dhall configuration file as in any other atspkg build.
• atspkg, using the configuration information obtained, downloads and installs the appropriate compiler ATS dependencies.
• atspkg builds the library with shake, generating libnumbertheory.a
• We then modify the library path inside Setup.hs to allow the linker to find libnumbertheory.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.