
wren ng thornton wrote:
Simon Marlow wrote:
Don Stewart wrote:
* GHC.Prim was moved,
Nobody should be importing GHC.Prim, use GHC.Exts instead.
This is oft declared, but as things stand I don't think it's a tenable position. If someone's bothering to dig as far as GHC.Exts then it's very likely they're trying to optimize numeric computations and for that there are a number of functions in GHC.Prim which are essential, in particular the fast conversion functions for numeric types[1]. If those were moved to GHC.Exts then I think many people would be more inclined to heed the advice.
GHC.Exts re-exports the whole of GHC.Prim. There's no reason to import GHC.Prim at all. Admittedly this isn't immediately obvious from the documentation, but it is there. Hopefully in the future we can improve Haddock so that it'll be able to paste in the whole of GHC.Prim into the GHC.Exts documentation, and we can then hide GHC.Prim. Cheers, Simon