
On Tue, 21 Aug 2012, Brent Yorgey wrote:
I would also like people's opinions on the one big question remaining: whether to use cabal's mechanisms to conditionally include some code, allowing the 'build' function to be taken from GHC.Exts when available, or defined manually otherwise. This would make split fully H2010-compatible. The currently released version does NOT include this, so it is H2010-compatible but GHC specific. The options are:
1) just use a generic version of 'build' (simplest option)
2) use only GHC's version of build (slightly faster)
3) do the conditional thing to choose between 1) and 2) at compile time (most general but most complicated/cumbersome)
The best solution would be to have a package that provides the 'build' function for all compilers. For GHC it exports the fusing 'build' and for other compilers it exports a generic version. I think this 'build' function is useful for other packages, too. This package does not yet exist and if it would exist then it should or must be part of the platform. For now I would think a simple solution is ok, thus I vote for solution number 1. Later you can simply switch the import of 'build'.