Hey there, wip-haskell contains commits that do a number of things aimed to reduce the closure of packages:
1) make the “out” (and “lib”) output independent from “doc” 2) add a “doc” output to more packages 3) add a “static” output for all Haskell packages containing the “.a” files 4) change ghc-pandoc (and ghc-pandoc-citeproc) to use static linking Number 1 required some smelly hackery: the generated configuration file is edited to remove the “haddock-html” field. One unfortunate effect of doing this and moving the .haddock files is that there are now complaints about unresolvable links in generated documentation. I don’t know if we can avoid this, but it seems like a small price to pay for independent “doc” outputs. (Otherwise we’d have to download huge “doc” outputs even if we don’t want them.) Number 3 required circumventing bug 41569. Number 4 is by far the ugliest change of them all. In order to statically link packages we need to add all the “static” outputs of all Haskell inputs *and* the “static” outputs of *their* Haskell inputs. This is not easily accomplished, so I ended up using “package-closure” on all direct inputs, and then filtered the result to packages with names starting with “ghc-”. If there was a more appropriate tool I’d use it, but I don’t think it exists. The result is a much reduced closure for ghc-pandoc and all packages using it (such as R markdown). We should probably rename “ghc-pandoc” to “pandoc”, while we’re at it, because now the package contains the executable. I suppose we could change this so that “ghc-pandoc” is the usual library package with a new “pandoc” package inheriting from “ghc-pandoc”. I’ll give that a try soon. I’d be happy to hear your comments about all of this, and I’m looking forward to merging this branch into “master” soon. -- Ricardo