Skip to content

Discourage importing GHC.Prim

The module GHC.Prim contains primitives which are defined internally in GHC. Whether something is a primitive or not is an implementation detail; we can change this between releases.

The documentation of the module already states "Use GHC.Exts from the base package instead of importing this module directly." but we should be more consistent:

  1. The user's guide suggests importing GHC.Prim in a few places. This should be changed to GHC.Exts.

  2. We should not import GHC.Prim in the testsuite.

  3. We could possibly add a warning when GHC.Prim is imported (as if we had module GHC.Prim {-# WARNING "This is unstable. Use GHC.Exts instead." #-})

Edited by Krzysztof Gogolewski
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information