Can stackage host pre-compiled packages?

Just an idea, but would it be possible for Stackage to host pre-compiled binaries for common archs/toolchains, and not only source codes from Hackage? I know that stack keeps precompiled packages on my machine to use in other projects, so it should be possible to share them between machines also. It would surely save a lot of time for many people compiling the same things over again.

1 Like

Note that officially hosted binary caches is almost impossible, since GHC has no ABI stability whatsoever. If you install a different bindist (of the same version even), the ABI might break and you get undefined results. Even if the tools are ABI aware (cabal isn’t… not sure about stack), that would just mean you have to host a lot of caches. Then there’s the problem with glibc version…

4 Likes

Even if the tools are ABI aware

That would be nice to fix. If all the issues with Cabal and Nix that make Haskell.nix harder to use were fixed, I would advocate making such Nix support a first-class Cabal feature and indeed having a community build farm.

3 Likes

I’ve been thinking about the feasibility of pre-compiled packages very recently too. I even meant to post something about it yesterday but you beat me to it.

Yesterday I attempted to build with reflex-platform a project for iOS. I failed miserably, but only after almost the whole day waiting for the compilation to finish. It might have been due to some sleeping my computer decided to do while I was doing other things, but nonetheless it was a lot of time compiling the dependencies

3 Likes

Well since reflex platform uses Nix, you should get precompiled binaries! :slight_smile:

2 Likes