diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2022-03-30 21:11:54 +0200 |
---|---|---|
committer | Matthew Pickering <matthewtpickering@gmail.com> | 2022-04-01 11:14:08 +0100 |
commit | f8f152e7089af9a5434408e17ff071999d381ee1 (patch) | |
tree | d00356e813c0fd95dbf81b796798f35fbe46e32a /docs | |
parent | 691508d87ec089e46524461a5c6ec59b1c17be4c (diff) | |
download | haskell-f8f152e7089af9a5434408e17ff071999d381ee1.tar.gz |
Change GHC.Prim to GHC.Exts in docs and tests
Users are supposed to import GHC.Exts rather than GHC.Prim.
Part of #18749.
Diffstat (limited to 'docs')
-rw-r--r-- | docs/users_guide/exts/ffi.rst | 2 | ||||
-rw-r--r-- | docs/users_guide/exts/magic_hash.rst | 2 | ||||
-rw-r--r-- | docs/users_guide/exts/primitives.rst | 5 |
3 files changed, 4 insertions, 5 deletions
diff --git a/docs/users_guide/exts/ffi.rst b/docs/users_guide/exts/ffi.rst index 6d96a0216a..22f8f33280 100644 --- a/docs/users_guide/exts/ffi.rst +++ b/docs/users_guide/exts/ffi.rst @@ -1102,7 +1102,7 @@ to move. Consequently, it has a stable address that can be safely requested with ``byteArrayContents#``. Not that being pinned doesn't prevent the byteArray from being gc'ed in the same fashion a regular byte array would be. -There are a handful of primitive functions in :ghc-prim-ref:`GHC.Prim.` +There are a handful of primitive functions in :base-ref:`GHC.Exts.` used to enforce or check for pinnedness: ``isByteArrayPinned#``, ``isMutableByteArrayPinned#``, and ``newPinnedByteArray#``. A byte array can be pinned as a result of three possible causes: diff --git a/docs/users_guide/exts/magic_hash.rst b/docs/users_guide/exts/magic_hash.rst index 3873620959..f47708786f 100644 --- a/docs/users_guide/exts/magic_hash.rst +++ b/docs/users_guide/exts/magic_hash.rst @@ -19,7 +19,7 @@ names ending in "#" for unboxed values or types (e.g. ``Int#``), but there is no requirement to do so; they are just plain ordinary variables. Nor does the :extension:`MagicHash` extension bring anything into scope. For example, to bring ``Int#`` into scope you must import -``GHC.Prim`` (see :ref:`primitives`); the :extension:`MagicHash` extension then +``GHC.Exts`` (see :ref:`primitives`); the :extension:`MagicHash` extension then allows you to *refer* to the ``Int#`` that is now in scope. Note that with this option, the meaning of ``x#y = 0`` is changed: it defines a function ``x#`` taking a single argument ``y``; to define the operator diff --git a/docs/users_guide/exts/primitives.rst b/docs/users_guide/exts/primitives.rst index 46c8dfb13b..f5107cc8b4 100644 --- a/docs/users_guide/exts/primitives.rst +++ b/docs/users_guide/exts/primitives.rst @@ -12,11 +12,10 @@ you write will be optimised to the efficient unboxed version in any case. And if it isn't, we'd like to know about it. All these primitive data types and operations are exported by the -library :ghc-prim-ref:`GHC.Prim.`. (This documentation is generated from -the file ``compiler/GHC/Builtin/primops.txt.pp``.) +library :base-ref:`GHC.Exts.`. If you want to mention any of the primitive data types or operations in -your program, you must first import ``GHC.Prim`` to bring them into +your program, you must first import ``GHC.Exts`` to bring them into scope. Many of them have names ending in ``#``, and to mention such names you need the :extension:`MagicHash` extension. |