diff --git a/docs/users_guide/exts/ffi.rst b/docs/users_guide/exts/ffi.rst index 6d96a0216a0cb0eac3ab165abb4e048fc337924d..22f8f33280b3919375d8966c66500639afbbf416 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 3873620959929650438b688fac4f593b240de527..f47708786f94bf0fa499cfcd6bd770f3fbb2e093 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 46c8dfb13bcdc75bcac4cfa1bf01128b2a43d2c6..f5107cc8b45fc6d460fa1e076eda2e9812eec2af 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. diff --git a/testsuite/tests/backpack/should_compile/bkp16.bkp b/testsuite/tests/backpack/should_compile/bkp16.bkp index f1a161e53c8b2d69be7dc10aa0243fb1ceb21a8d..d61184c49963f099d1c70df6e264a6074b913b7f 100644 --- a/testsuite/tests/backpack/should_compile/bkp16.bkp +++ b/testsuite/tests/backpack/should_compile/bkp16.bkp @@ -2,7 +2,7 @@ unit p where dependency ghc-prim signature Int where - import GHC.Prim + import GHC.Exts data Int = I# Int# unit q where dependency p[Int=base:GHC.Exts] diff --git a/testsuite/tests/backpack/should_run/T13955.bkp b/testsuite/tests/backpack/should_run/T13955.bkp index eadeee6f5c0bac3ac6cdee94cd75adbcb60f2e55..f469076dd773f8b8de6a9e95bbb6d5fa5870721a 100644 --- a/testsuite/tests/backpack/should_run/T13955.bkp +++ b/testsuite/tests/backpack/should_run/T13955.bkp @@ -28,7 +28,7 @@ unit number-int where unit number-unboxed-int where module NumberUnknown where import GHC.Types - import GHC.Prim + import GHC.Exts type Rep = IntRep type Number = Int# plus :: Int# -> Int# -> Int# diff --git a/testsuite/tests/backpack/should_run/T20133.bkp b/testsuite/tests/backpack/should_run/T20133.bkp index 304f857ae96c6eafdd2dd14ac29324577fdaaa1e..557d1f2f7c6c206a853ec5ce27df8ed9b90ffea1 100644 --- a/testsuite/tests/backpack/should_run/T20133.bkp +++ b/testsuite/tests/backpack/should_run/T20133.bkp @@ -18,7 +18,7 @@ unit number-unknown where unit number-unboxed-int where module NumberUnknown where import GHC.Types - import GHC.Prim + import GHC.Exts type Rep a = IntRep type Number a = Int# plus :: Int# -> Int# -> Int# diff --git a/testsuite/tests/codeGen/should_compile/T12115.hs b/testsuite/tests/codeGen/should_compile/T12115.hs index bc119e58b4c27f5b22ddf7502ab27f55cd0fbf61..87a96c3ade137afb8c76566ce5410151de311ac0 100644 --- a/testsuite/tests/codeGen/should_compile/T12115.hs +++ b/testsuite/tests/codeGen/should_compile/T12115.hs @@ -2,7 +2,7 @@ module T12115 where -import GHC.Prim +import GHC.Exts import GHC.Types f :: (# (# #), (# #) #) -> String diff --git a/testsuite/tests/codeGen/should_compile/T12355.hs b/testsuite/tests/codeGen/should_compile/T12355.hs index 9ad9ebea905a18b7654854701005fa48b4a11c1a..534b8963c0c4bb781f729b4162904244da5d0546 100644 --- a/testsuite/tests/codeGen/should_compile/T12355.hs +++ b/testsuite/tests/codeGen/should_compile/T12355.hs @@ -2,6 +2,6 @@ module Lib where -import GHC.Prim +import GHC.Exts foreign import prim f1 :: Int# -> Int# diff --git a/testsuite/tests/codeGen/should_run/CopySmallArray.hs b/testsuite/tests/codeGen/should_run/CopySmallArray.hs index 6902fe2db20dddde23f1f91073046017fa4ac6f8..e3a5143ac878ec90889cc2195b474ff2cb93a18d 100644 --- a/testsuite/tests/codeGen/should_run/CopySmallArray.hs +++ b/testsuite/tests/codeGen/should_run/CopySmallArray.hs @@ -6,7 +6,6 @@ module Main ( main ) where import GHC.Exts hiding (IsList(..)) -import GHC.Prim import GHC.ST main :: IO () diff --git a/testsuite/tests/codeGen/should_run/SizeOfSmallArray.hs b/testsuite/tests/codeGen/should_run/SizeOfSmallArray.hs index 2e62709748715b1d45c220ec646e0491c87f3f05..ad5b26c6502c93059c95d699e50fdcf13b84677f 100644 --- a/testsuite/tests/codeGen/should_run/SizeOfSmallArray.hs +++ b/testsuite/tests/codeGen/should_run/SizeOfSmallArray.hs @@ -3,7 +3,6 @@ module Main ( main ) where import GHC.Exts -import GHC.Prim import GHC.ST main = putStr diff --git a/testsuite/tests/codeGen/should_run/T15696_1.hs b/testsuite/tests/codeGen/should_run/T15696_1.hs index e747c0ad1694564916f40b0e7a6a3ca392c7df1a..a3b53d4b24bc5cd8ce6ca4d232f38bb36d96c5fa 100644 --- a/testsuite/tests/codeGen/should_run/T15696_1.hs +++ b/testsuite/tests/codeGen/should_run/T15696_1.hs @@ -1,7 +1,6 @@ {-# LANGUAGE MagicHash #-} import GHC.Exts -import GHC.Prim main :: IO () main = print (cmpT a T2) diff --git a/testsuite/tests/codeGen/should_run/T15696_2.hs b/testsuite/tests/codeGen/should_run/T15696_2.hs index 1a404bee9227165c06eadfd208a8f79d9f6bc81a..bb17e3bc712c0fddab6fce55f3d43d3a11a92a93 100644 --- a/testsuite/tests/codeGen/should_run/T15696_2.hs +++ b/testsuite/tests/codeGen/should_run/T15696_2.hs @@ -1,7 +1,6 @@ {-# LANGUAGE MagicHash #-} import GHC.Exts -import GHC.Prim main :: IO () main = do diff --git a/testsuite/tests/codeGen/should_run/T16449_2.hs b/testsuite/tests/codeGen/should_run/T16449_2.hs index de461ab438b6eed18baefd90c2816f2a300bb211..4eee64e70d7fb439394ab2d4c5afdd54d16668d7 100644 --- a/testsuite/tests/codeGen/should_run/T16449_2.hs +++ b/testsuite/tests/codeGen/should_run/T16449_2.hs @@ -2,7 +2,7 @@ module Main where -import GHC.Prim +import GHC.Exts import GHC.Int -- Test that large unchecked shifts, which constitute undefined behavior, do diff --git a/testsuite/tests/codeGen/should_run/T8256.hs b/testsuite/tests/codeGen/should_run/T8256.hs index d9dbd25b9cfdb87bfb0e2b8036fa9315eea747ee..5af51d6be52f99de2ed1984e4c651b0ac7bb6602 100644 --- a/testsuite/tests/codeGen/should_run/T8256.hs +++ b/testsuite/tests/codeGen/should_run/T8256.hs @@ -3,7 +3,7 @@ module Main where -import GHC.Prim +import GHC.Exts import GHC.Types import Foreign import Foreign.Ptr diff --git a/testsuite/tests/codeGen/should_run/T9013.hs b/testsuite/tests/codeGen/should_run/T9013.hs index 35c074e68d35b97ae3b6a3c0d89eaef15919ac82..2bc821002cad04b9ac8d4b0c74307d93e3a03483 100644 --- a/testsuite/tests/codeGen/should_run/T9013.hs +++ b/testsuite/tests/codeGen/should_run/T9013.hs @@ -1,6 +1,6 @@ {-# LANGUAGE MagicHash, UnboxedTuples #-} -import GHC.Prim +import GHC.Exts import GHC.Word big :: Word diff --git a/testsuite/tests/codeGen/should_run/cas_int.hs b/testsuite/tests/codeGen/should_run/cas_int.hs index f3c0bd0137652054a0bf19473caea0a05f5c72d1..dc2bd4507d7d84307afdcc3c6ff033e4466fde34 100644 --- a/testsuite/tests/codeGen/should_run/cas_int.hs +++ b/testsuite/tests/codeGen/should_run/cas_int.hs @@ -12,7 +12,7 @@ module Main ( main ) where import Data.Bits import GHC.Int -import GHC.Prim +import GHC.Exts import GHC.Word import Control.Monad import Control.Concurrent diff --git a/testsuite/tests/codeGen/should_run/cgrun064.hs b/testsuite/tests/codeGen/should_run/cgrun064.hs index 527c6bde6734c1b829ba2ed8ccb797df29b28fe6..3c071afb9fcc91651fc7d72e2f4e77565326f1c4 100644 --- a/testsuite/tests/codeGen/should_run/cgrun064.hs +++ b/testsuite/tests/codeGen/should_run/cgrun064.hs @@ -6,7 +6,6 @@ module Main ( main ) where import GHC.Exts hiding (IsList(..)) -import GHC.Prim import GHC.ST main :: IO () diff --git a/testsuite/tests/codeGen/should_run/cgrun065.hs b/testsuite/tests/codeGen/should_run/cgrun065.hs index 69348320134c9a714885b5ade2783086a3560ccf..1c6f3589bfa457f5e4af525b0fbe7b888564b8bb 100644 --- a/testsuite/tests/codeGen/should_run/cgrun065.hs +++ b/testsuite/tests/codeGen/should_run/cgrun065.hs @@ -3,7 +3,6 @@ module Main ( main ) where import GHC.Exts -import GHC.Prim import GHC.ST main = putStr diff --git a/testsuite/tests/codeGen/should_run/cgrun070.hs b/testsuite/tests/codeGen/should_run/cgrun070.hs index d37032a707e7c09c5f4ad37cfeb3142bff76b124..6d1614120281d3e97ffe4016eb143cf0e42e539e 100644 --- a/testsuite/tests/codeGen/should_run/cgrun070.hs +++ b/testsuite/tests/codeGen/should_run/cgrun070.hs @@ -7,7 +7,6 @@ module Main ( main ) where import GHC.Word import GHC.Exts hiding (IsList(..)) -import GHC.Prim import GHC.ST import GHC.IO import GHC.Ptr diff --git a/testsuite/tests/codeGen/should_run/cgrun071.hs b/testsuite/tests/codeGen/should_run/cgrun071.hs index 21ee04121b2e63d9f96e32db41fd137c4d8a498b..70a605fd2f4d95cffa4d1a20794cd6f55c1e7ad4 100644 --- a/testsuite/tests/codeGen/should_run/cgrun071.hs +++ b/testsuite/tests/codeGen/should_run/cgrun071.hs @@ -3,7 +3,7 @@ module Main ( main ) where import Data.Bits -import GHC.Prim +import GHC.Exts import GHC.Word #include "MachDeps.h" diff --git a/testsuite/tests/codeGen/should_run/cgrun072.hs b/testsuite/tests/codeGen/should_run/cgrun072.hs index b97ce56d014abfcccbda207dfd94be18cffb43f8..2d7e90f1151c1410bfcbd709e260ca14376e44db 100644 --- a/testsuite/tests/codeGen/should_run/cgrun072.hs +++ b/testsuite/tests/codeGen/should_run/cgrun072.hs @@ -14,7 +14,7 @@ module Main ( main ) where import Data.Bits -import GHC.Prim +import GHC.Exts import GHC.Word #include "MachDeps.h" diff --git a/testsuite/tests/codeGen/should_run/cgrun075.hs b/testsuite/tests/codeGen/should_run/cgrun075.hs index 5babde12547cb4be4736e883e3dc39771d0640e3..6dcbda04c79c9038478c7405ed69fb1e7081e624 100644 --- a/testsuite/tests/codeGen/should_run/cgrun075.hs +++ b/testsuite/tests/codeGen/should_run/cgrun075.hs @@ -4,7 +4,7 @@ module Main ( main ) where import Data.Bits import GHC.Int -import GHC.Prim +import GHC.Exts import GHC.Word import Data.Int import Data.Word diff --git a/testsuite/tests/codeGen/should_run/cgrun076.hs b/testsuite/tests/codeGen/should_run/cgrun076.hs index 4779b5beb83695a12798324991d3977a8fc7a2bb..7721183ec1153b87b273dda4d74ef0f7a0dca42e 100644 --- a/testsuite/tests/codeGen/should_run/cgrun076.hs +++ b/testsuite/tests/codeGen/should_run/cgrun076.hs @@ -4,7 +4,7 @@ module Main ( main ) where import Data.Bits import GHC.Int -import GHC.Prim +import GHC.Exts import GHC.Word import Data.Int import Data.Word diff --git a/testsuite/tests/codeGen/should_run/cgrun077.hs b/testsuite/tests/codeGen/should_run/cgrun077.hs index fa224e9eca8d80cb3accd9c36bd2c6e2373e36e9..965b86214bfcaeaec1b49777ddb3da282c7168bc 100644 --- a/testsuite/tests/codeGen/should_run/cgrun077.hs +++ b/testsuite/tests/codeGen/should_run/cgrun077.hs @@ -3,7 +3,7 @@ module Main ( main ) where import Data.Bits -import GHC.Prim +import GHC.Exts import GHC.Word #include "MachDeps.h" diff --git a/testsuite/tests/codeGen/should_run/cgrun079.hs b/testsuite/tests/codeGen/should_run/cgrun079.hs index e299c860c3af581cffb36fcbe7a236a840e58530..80fea2cc2c9df4e063ce4395b0de2b9a235ab759 100644 --- a/testsuite/tests/codeGen/should_run/cgrun079.hs +++ b/testsuite/tests/codeGen/should_run/cgrun079.hs @@ -5,7 +5,7 @@ module Main ( main ) where import Data.Bits import GHC.Int -import GHC.Prim +import GHC.Exts import GHC.Word import Control.Monad diff --git a/testsuite/tests/codeGen/should_run/cgrun080.hs b/testsuite/tests/codeGen/should_run/cgrun080.hs index 78d54700f951340a9341c0e4c35f2fc2f999b3a1..7c40450ea9c295640d9645f0f614cbc9ab5217ef 100644 --- a/testsuite/tests/codeGen/should_run/cgrun080.hs +++ b/testsuite/tests/codeGen/should_run/cgrun080.hs @@ -10,7 +10,7 @@ module Main ( main ) where import Data.Bits import GHC.Int -import GHC.Prim +import GHC.Exts import GHC.Word import Control.Monad import Control.Concurrent diff --git a/testsuite/tests/codeGen/should_run/compareByteArrays.hs b/testsuite/tests/codeGen/should_run/compareByteArrays.hs index 5bd0e5858838c51febb24a4d69588a5fe024116b..7131b2791438bf11d8e67b8470c9de7ffc0c6348 100644 --- a/testsuite/tests/codeGen/should_run/compareByteArrays.hs +++ b/testsuite/tests/codeGen/should_run/compareByteArrays.hs @@ -9,8 +9,7 @@ module Main (main) where import Control.Monad import Control.Monad.ST import Data.List (sort, intercalate) -import GHC.Exts (Int (..)) -import GHC.Prim +import GHC.Exts import GHC.ST (ST (ST)) import GHC.Word (Word8 (..)) import Text.Printf diff --git a/testsuite/tests/concurrent/should_run/T367_letnoescape.hs b/testsuite/tests/concurrent/should_run/T367_letnoescape.hs index 5230509e71a112f565e340287d22bbcca0bd7915..0e91ea693a85491115b08984d75f525cd0323731 100644 --- a/testsuite/tests/concurrent/should_run/T367_letnoescape.hs +++ b/testsuite/tests/concurrent/should_run/T367_letnoescape.hs @@ -4,7 +4,6 @@ import Control.Concurrent import GHC.Conc -import GHC.Prim import GHC.Exts main = do diff --git a/testsuite/tests/concurrent/should_run/hs_try_putmvar001.hs b/testsuite/tests/concurrent/should_run/hs_try_putmvar001.hs index af4eabb26357f1334907ffb778a09d62645b566f..a16ae482cbb5e7f9ae0c01d2e33d4e15af0adaa1 100644 --- a/testsuite/tests/concurrent/should_run/hs_try_putmvar001.hs +++ b/testsuite/tests/concurrent/should_run/hs_try_putmvar001.hs @@ -6,7 +6,7 @@ import Control.Exception import Foreign import Foreign.C import GHC.Conc -import GHC.Prim +import GHC.Exts -- Sample code demonstrating proper use of hs_try_putmvar() diff --git a/testsuite/tests/concurrent/should_run/hs_try_putmvar002.hs b/testsuite/tests/concurrent/should_run/hs_try_putmvar002.hs index a8eac42decac76c3a907fa04f3e060bb1081a983..d1130981d61f23ceea89aac6e00e4c9f975643cb 100644 --- a/testsuite/tests/concurrent/should_run/hs_try_putmvar002.hs +++ b/testsuite/tests/concurrent/should_run/hs_try_putmvar002.hs @@ -7,7 +7,7 @@ import Control.Monad import Foreign hiding (void) import Foreign.C import GHC.Conc -import GHC.Prim +import GHC.Exts import System.Environment -- Measure raw throughput, for M threads that each do N calls to C diff --git a/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs b/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs index caaadc1aae1f2b3eb2eab2992e5a31631774c310..66772076651e2cc452480c17ecc47c4e62b48911 100644 --- a/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs +++ b/testsuite/tests/concurrent/should_run/hs_try_putmvar003.hs @@ -8,7 +8,7 @@ import Foreign hiding (void) import Foreign.C import GHC.Conc import GHC.MVar (MVar(..)) -import GHC.Prim +import GHC.Exts import System.Environment import System.Exit import Unsafe.Coerce diff --git a/testsuite/tests/concurrent/should_run/setnumcapabilities001.hs b/testsuite/tests/concurrent/should_run/setnumcapabilities001.hs index a18d75aeef33c70fa72ddeb75274412e35a32bfa..436c068b29a33ce260c775c3cea4349b3940b792 100644 --- a/testsuite/tests/concurrent/should_run/setnumcapabilities001.hs +++ b/testsuite/tests/concurrent/should_run/setnumcapabilities001.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash, UnboxedTuples #-} import GHC.Conc -import GHC.Prim +import GHC.Exts import System.Environment import System.IO import Control.Monad diff --git a/testsuite/tests/dependent/should_compile/T15076c.hs b/testsuite/tests/dependent/should_compile/T15076c.hs index b689b5b6f0e7fe06fa8de4656d106451b25c2d92..948928a8fbe89300001d9bae39c2686dd5fe084c 100644 --- a/testsuite/tests/dependent/should_compile/T15076c.hs +++ b/testsuite/tests/dependent/should_compile/T15076c.hs @@ -6,7 +6,7 @@ module Super where import Data.Kind import Data.Proxy -import GHC.Prim +import GHC.Exts class (a ~ b) => C a b data SameKind :: k -> k -> Type where diff --git a/testsuite/tests/dependent/should_fail/T17541.hs b/testsuite/tests/dependent/should_fail/T17541.hs index dcf6e913815fc2ff6362a3999e17c0fceb1e1ae0..48d9c0c37eb426f333cd399c7e2803a2a1bed0a6 100644 --- a/testsuite/tests/dependent/should_fail/T17541.hs +++ b/testsuite/tests/dependent/should_fail/T17541.hs @@ -9,7 +9,6 @@ TypeFamilyDependencies #-} module T17541 where -import GHC.Prim import GHC.Exts diff --git a/testsuite/tests/dependent/should_fail/T17541.stderr b/testsuite/tests/dependent/should_fail/T17541.stderr index d0ea673a2b408e8bf0639c48ca52df349202534e..2321aee6ed25ec8105a0a8f20641eb6390a19a28 100644 --- a/testsuite/tests/dependent/should_fail/T17541.stderr +++ b/testsuite/tests/dependent/should_fail/T17541.stderr @@ -1,5 +1,5 @@ -T17541.hs:20:17: error: +T17541.hs:19:17: error: • Couldn't match kind ‘Rep rep’ with ‘'IntRep’ Expected kind ‘TYPE (Rep rep)’, but ‘Int#’ has kind ‘TYPE 'IntRep’ The type variable ‘rep’ is ambiguous diff --git a/testsuite/tests/deriving/perf/T10858.hs b/testsuite/tests/deriving/perf/T10858.hs index b4eb7e8a45ea7cd0bd69b96155f250dfbdcb702e..b32f3bc01855395b6300d46f8464612c80944a82 100644 --- a/testsuite/tests/deriving/perf/T10858.hs +++ b/testsuite/tests/deriving/perf/T10858.hs @@ -1,6 +1,6 @@ {-# LANGUAGE MagicHash #-} -import GHC.Prim +import GHC.Exts data TestData = First Int Double String Int Int Int Int | Second Char# Int# Word# Double# diff --git a/testsuite/tests/deriving/should_compile/T11174.hs b/testsuite/tests/deriving/should_compile/T11174.hs index c3b2bc711c8c81b2aaf9e87a2ef21d60e8f5c571..cb0a85172d22f8a9d6934352a25fac2df07a67c4 100644 --- a/testsuite/tests/deriving/should_compile/T11174.hs +++ b/testsuite/tests/deriving/should_compile/T11174.hs @@ -4,7 +4,7 @@ {-# LANGUAGE MagicHash #-} module T11174 where -import GHC.Prim (Int#) +import GHC.Exts (Int#) data IntHash a = IntHash Int# deriving (Functor, Foldable, Traversable) diff --git a/testsuite/tests/deriving/should_fail/T2701.hs b/testsuite/tests/deriving/should_fail/T2701.hs index 0d6dab3fbb66ae811b5b9d7dc59fea4b334f7064..6964ddc44e4d689cc449f8f00809bcb7cefef4e9 100644 --- a/testsuite/tests/deriving/should_fail/T2701.hs +++ b/testsuite/tests/deriving/should_fail/T2701.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash, DeriveDataTypeable #-} module T2700 where -import GHC.Prim +import GHC.Exts import Data.Data import Data.Typeable diff --git a/testsuite/tests/deriving/should_run/T10104.hs b/testsuite/tests/deriving/should_run/T10104.hs index 154a6097f71193123f0d93debaba63caa8060285..f22e446353d24a1863ad66f4a45bf06a8f87b9b5 100644 --- a/testsuite/tests/deriving/should_run/T10104.hs +++ b/testsuite/tests/deriving/should_run/T10104.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash #-} module Main where -import GHC.Prim +import GHC.Exts data P = Positives Int# Float# Double# Char# Word# deriving Show data N = Negatives Int# Float# Double# deriving Show diff --git a/testsuite/tests/driver/T10600.hs b/testsuite/tests/driver/T10600.hs index 86b6e6cbfc55b45ebec36e5571285155a9fa6378..3dbce43e4d07d643eae5785e98b66d92b8068ea8 100644 --- a/testsuite/tests/driver/T10600.hs +++ b/testsuite/tests/driver/T10600.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash #-} module T10600 where -import GHC.Prim +import GHC.Exts -- This shouldn't compile as unlifted bindings aren't allowed at top-level. -- However, #10600 described the situation where an error isn't throw when we diff --git a/testsuite/tests/ffi/should_compile/cc016.hs b/testsuite/tests/ffi/should_compile/cc016.hs index 549dc15c77e47c7bd2bf9dc754a1047187a4d176..5e1125de3f89edf502bda6696b04ca6c62b4e3ee 100644 --- a/testsuite/tests/ffi/should_compile/cc016.hs +++ b/testsuite/tests/ffi/should_compile/cc016.hs @@ -6,7 +6,7 @@ module Cc015 where import Foreign import Foreign.C.Types -import GHC.Prim +import GHC.Exts type family F a type instance F Int = Int# -> Int# diff --git a/testsuite/tests/ffi/should_fail/ccfail001.hs b/testsuite/tests/ffi/should_fail/ccfail001.hs index 0b7d5e8c7fc4c95ce924d6a186171e75fae54d8a..de3f7327875ceda477eed1b1ea444b8ef22c0b5c 100644 --- a/testsuite/tests/ffi/should_fail/ccfail001.hs +++ b/testsuite/tests/ffi/should_fail/ccfail001.hs @@ -5,6 +5,6 @@ module Foo where -import GHC.Prim +import GHC.Exts foreign import ccall foo :: Int -> State# RealWorld diff --git a/testsuite/tests/generics/T8468.hs b/testsuite/tests/generics/T8468.hs index f76be9f951a8a6b36aed7d73af74c758ba5e4d26..c4292cd9709b899583f8596e86ded70d836539a6 100644 --- a/testsuite/tests/generics/T8468.hs +++ b/testsuite/tests/generics/T8468.hs @@ -1,7 +1,7 @@ {-# Language DeriveGeneric, MagicHash #-} import GHC.Generics -import GHC.Prim +import GHC.Exts data Array a = Array (Array# a) deriving Generic1 newtype Vec a = MkVec {unVec :: Array a} deriving Generic1 diff --git a/testsuite/tests/ghci/scripts/T12520.hs b/testsuite/tests/ghci/scripts/T12520.hs index cedf5875c4fc397856f1ba77e8c17224d415053a..8d8eb1471acdb87494c1aed0c18b32e736ff471e 100644 --- a/testsuite/tests/ghci/scripts/T12520.hs +++ b/testsuite/tests/ghci/scripts/T12520.hs @@ -2,7 +2,7 @@ module Bug ( box, wrap, proxy ) where -import GHC.Prim +import GHC.Exts box :: (# Proxy# a, b #) -> b box (# x, y #) = y diff --git a/testsuite/tests/ghci/should_run/T19733.hs b/testsuite/tests/ghci/should_run/T19733.hs index 7bb8102a2d74302918697761c5488699d8754f97..25ac106867cfecc4ab4f6edce51d2a5ca3b8bf2f 100644 --- a/testsuite/tests/ghci/should_run/T19733.hs +++ b/testsuite/tests/ghci/should_run/T19733.hs @@ -6,7 +6,7 @@ module Main where -import GHC.Prim +import GHC.Exts import GHC.IO import Foreign.C diff --git a/testsuite/tests/indexed-types/should_compile/T13244.hs b/testsuite/tests/indexed-types/should_compile/T13244.hs index 6cfea014a4953a242a34b04434ae40ee1f267c59..1fb7d073a078109b344ccb87f9783b9c086edcd8 100644 --- a/testsuite/tests/indexed-types/should_compile/T13244.hs +++ b/testsuite/tests/indexed-types/should_compile/T13244.hs @@ -4,7 +4,7 @@ module T13244 where import Data.Int import Data.Word -import GHC.Prim +import GHC.Exts import GHC.Types type family Rep x where diff --git a/testsuite/tests/llvm/should_compile/T5681.hs b/testsuite/tests/llvm/should_compile/T5681.hs index d1c073a328ff787d37d698f6164821bc681a00e7..a853295516bc26e9b0a91663c2a1328b3af46a31 100644 --- a/testsuite/tests/llvm/should_compile/T5681.hs +++ b/testsuite/tests/llvm/should_compile/T5681.hs @@ -3,7 +3,7 @@ -- Test case for #5681 module Main where -import GHC.Prim +import GHC.Exts work :: Int -> Int work n = work (n-1) diff --git a/testsuite/tests/llvm/should_compile/T7575.hs b/testsuite/tests/llvm/should_compile/T7575.hs index 78b0bd29a8012b964fb8525d1ca897a15bef0ed1..49e1cd970897209508120c264968ed53fac53e71 100644 --- a/testsuite/tests/llvm/should_compile/T7575.hs +++ b/testsuite/tests/llvm/should_compile/T7575.hs @@ -2,7 +2,7 @@ {-# LANGUAGE MagicHash, UnliftedFFITypes #-} module T7575 where -import GHC.Prim +import GHC.Exts import GHC.Word import GHC.Types diff --git a/testsuite/tests/llvm/should_compile/T8131b.hs b/testsuite/tests/llvm/should_compile/T8131b.hs index e57d6dcf77d761e885f52ab72ad909040ad5c522..af384da3d6441bf6db6d175c532d6a397e414d77 100644 --- a/testsuite/tests/llvm/should_compile/T8131b.hs +++ b/testsuite/tests/llvm/should_compile/T8131b.hs @@ -1,6 +1,6 @@ {-# LANGUAGE Haskell2010 #-} {-# LANGUAGE MagicHash, UnboxedTuples #-} -import GHC.Prim +import GHC.Exts import GHC.IO main = IO $ \s -> diff --git a/testsuite/tests/module/base01/GHC/Base.hs b/testsuite/tests/module/base01/GHC/Base.hs index 9149f8544b3a5939a8a488bcbedab90e674d7d80..ef32f89cdd7d7f8d63b7b76d85ad645ed4f2e559 100644 --- a/testsuite/tests/module/base01/GHC/Base.hs +++ b/testsuite/tests/module/base01/GHC/Base.hs @@ -1,7 +1,6 @@ module GHC.Base (module GHC.Base, Bool(..)) where -import GHC.Prim import GHC.Types default () diff --git a/testsuite/tests/numeric/should_run/CarryOverflow.hs b/testsuite/tests/numeric/should_run/CarryOverflow.hs index 1a543de7131f6e2d66468da5aa2fe37b0a83c1cf..bcbcf121bc91236767725f02b239171048338b78 100644 --- a/testsuite/tests/numeric/should_run/CarryOverflow.hs +++ b/testsuite/tests/numeric/should_run/CarryOverflow.hs @@ -1,6 +1,5 @@ {-# LANGUAGE MagicHash, UnboxedTuples #-} -import GHC.Prim import GHC.Word import GHC.Exts diff --git a/testsuite/tests/numeric/should_run/add2.hs b/testsuite/tests/numeric/should_run/add2.hs index 5990f4fa832fe83fc26d84970160255a01c6df6b..8aa320dacb288f64daeef28a33fc456f09bf8e86 100644 --- a/testsuite/tests/numeric/should_run/add2.hs +++ b/testsuite/tests/numeric/should_run/add2.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash, UnboxedTuples #-} -import GHC.Prim +import GHC.Exts import GHC.Word import Data.Bits diff --git a/testsuite/tests/numeric/should_run/mul2.hs b/testsuite/tests/numeric/should_run/mul2.hs index 82a89d66d0757da64ce12556b95f4b57619bfd3f..474e421b40cd088bd5c6005cbeaad9e4fbb9b0bd 100644 --- a/testsuite/tests/numeric/should_run/mul2.hs +++ b/testsuite/tests/numeric/should_run/mul2.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash, UnboxedTuples #-} -import GHC.Prim +import GHC.Exts import GHC.Word import Data.Bits diff --git a/testsuite/tests/numeric/should_run/quotRem2.hs b/testsuite/tests/numeric/should_run/quotRem2.hs index bb7fb6cd12c9d015ebffbd959163429355258b11..dc302cbac0a7edc6b36ce741afdbbc352ed1fcd5 100644 --- a/testsuite/tests/numeric/should_run/quotRem2.hs +++ b/testsuite/tests/numeric/should_run/quotRem2.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash, UnboxedTuples #-} -import GHC.Prim +import GHC.Exts import GHC.Word import Control.Monad import Data.Bits diff --git a/testsuite/tests/parser/should_fail/T15209.hs b/testsuite/tests/parser/should_fail/T15209.hs index 1679d80ba601cd6b169786cdf38c08cdc0546134..944b967965e037bed861a2595497912aa3e2a547 100644 --- a/testsuite/tests/parser/should_fail/T15209.hs +++ b/testsuite/tests/parser/should_fail/T15209.hs @@ -1,7 +1,7 @@ {-# LANGUAGE GADTs, TypeOperators #-} module T15209 where -import GHC.Prim +import GHC.Exts foo :: a ~# Int -> () foo = () diff --git a/testsuite/tests/parser/should_fail/T15209.stderr b/testsuite/tests/parser/should_fail/T15209.stderr index fe1666c37e7f869f75dfd81e32c98f9694e0a33d..23f8876d678baf0d3e628d0dc6a22a7b7c4701f8 100644 --- a/testsuite/tests/parser/should_fail/T15209.stderr +++ b/testsuite/tests/parser/should_fail/T15209.stderr @@ -1,4 +1,6 @@ T15209.hs:6:10: error: Not in scope: type constructor or class ‘~#’ - Suggested fix: Perhaps use ‘~’ (imported from Prelude) + Suggested fix: + Perhaps use one of these: + ‘~’ (imported from GHC.Exts), ‘~~’ (imported from GHC.Exts) diff --git a/testsuite/tests/polykinds/T12718.hs b/testsuite/tests/polykinds/T12718.hs index 7bbe1d572eb8f883d6b63e4acc09ded3c77f60b6..8018e097fa48f04202338f596df1aec3a04d85fa 100644 --- a/testsuite/tests/polykinds/T12718.hs +++ b/testsuite/tests/polykinds/T12718.hs @@ -5,7 +5,7 @@ module Main where import Prelude hiding (Eq (..), Num(..)) import qualified Prelude as P -import GHC.Prim +import GHC.Exts import GHC.Types class XNum (a :: TYPE rep) where diff --git a/testsuite/tests/primops/should_compile/T19851.hs b/testsuite/tests/primops/should_compile/T19851.hs index a3a5dd78fcef19e0266d9ca5838b3858fd038ca0..934d243ea48779b36a48e48b8417a20bfd06f357 100644 --- a/testsuite/tests/primops/should_compile/T19851.hs +++ b/testsuite/tests/primops/should_compile/T19851.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash #-} module T19851 where -import GHC.Prim +import GHC.Exts import GHC.Word diff --git a/testsuite/tests/primops/should_run/ArithInt16.hs b/testsuite/tests/primops/should_run/ArithInt16.hs index 373a61ccd8546b8fbab1eaacf09ce4aa9c8b42a7..297973fe3bb564e8376909ee0cf84ad4cda7e984 100644 --- a/testsuite/tests/primops/should_run/ArithInt16.hs +++ b/testsuite/tests/primops/should_run/ArithInt16.hs @@ -6,7 +6,6 @@ module Main where import Data.Int import Data.List (findIndex) -import GHC.Prim import GHC.Exts main :: IO () diff --git a/testsuite/tests/primops/should_run/ArithInt32.hs b/testsuite/tests/primops/should_run/ArithInt32.hs index 8d1c6a4ad00f31ce67ba629d85b34d783611de03..d9a68bc85df391b277ba4f5227b5152c1d464fa3 100644 --- a/testsuite/tests/primops/should_run/ArithInt32.hs +++ b/testsuite/tests/primops/should_run/ArithInt32.hs @@ -6,7 +6,6 @@ module Main where import Data.Int import Data.List (findIndex) -import GHC.Prim import GHC.Exts main :: IO () diff --git a/testsuite/tests/primops/should_run/ArithInt8.hs b/testsuite/tests/primops/should_run/ArithInt8.hs index 4629772a7d470ecc5bcc7f6624d313effe06c69e..2e9ab0a49e727e5da8abbc38500e5502cae7e4de 100644 --- a/testsuite/tests/primops/should_run/ArithInt8.hs +++ b/testsuite/tests/primops/should_run/ArithInt8.hs @@ -6,7 +6,6 @@ module Main where import Data.Int import Data.List (findIndex) -import GHC.Prim import GHC.Exts main :: IO () diff --git a/testsuite/tests/primops/should_run/ArithWord16.hs b/testsuite/tests/primops/should_run/ArithWord16.hs index cd64614873251ae2dea8a47d23198885b5fe5964..0b38ca76535b9af2e1ad7496533fb0c2fb1af2df 100644 --- a/testsuite/tests/primops/should_run/ArithWord16.hs +++ b/testsuite/tests/primops/should_run/ArithWord16.hs @@ -7,7 +7,6 @@ module Main where import Data.Word import Data.Bits import Data.List (findIndex) -import GHC.Prim import GHC.Exts main :: IO () diff --git a/testsuite/tests/primops/should_run/ArithWord32.hs b/testsuite/tests/primops/should_run/ArithWord32.hs index ad0352435eb2f1ab500f082b7dc9be275d6c755f..111d4861789474a22b86621f41833f9a94ad8223 100644 --- a/testsuite/tests/primops/should_run/ArithWord32.hs +++ b/testsuite/tests/primops/should_run/ArithWord32.hs @@ -7,7 +7,6 @@ module Main where import Data.Word import Data.Bits import Data.List (findIndex) -import GHC.Prim import GHC.Exts main :: IO () diff --git a/testsuite/tests/primops/should_run/ArithWord8.hs b/testsuite/tests/primops/should_run/ArithWord8.hs index 6fea314bb2607842bf89b1ba9bbf2be4d6e7fada..7bfe7c3979520a0b89cb00c075cc2653239ff9c4 100644 --- a/testsuite/tests/primops/should_run/ArithWord8.hs +++ b/testsuite/tests/primops/should_run/ArithWord8.hs @@ -7,7 +7,6 @@ module Main where import Data.Word import Data.Bits import Data.List (findIndex) -import GHC.Prim import GHC.Exts main :: IO () diff --git a/testsuite/tests/primops/should_run/CmpInt16.hs b/testsuite/tests/primops/should_run/CmpInt16.hs index 0fdec359d7a0410deac732e56e0f89a488500d84..b83302fcaadd6d6528868a57914308cd68b93d67 100644 --- a/testsuite/tests/primops/should_run/CmpInt16.hs +++ b/testsuite/tests/primops/should_run/CmpInt16.hs @@ -5,7 +5,6 @@ module Main where import Data.Int import Data.List (findIndex) -import GHC.Prim import GHC.Exts diff --git a/testsuite/tests/primops/should_run/CmpInt32.hs b/testsuite/tests/primops/should_run/CmpInt32.hs index a9b560664b3e78fda8d1cf3d486bef2b4351d1eb..fc3aeacd837c2922d6bedf601b33b48a68f99433 100644 --- a/testsuite/tests/primops/should_run/CmpInt32.hs +++ b/testsuite/tests/primops/should_run/CmpInt32.hs @@ -5,7 +5,6 @@ module Main where import Data.Int import Data.List (findIndex) -import GHC.Prim import GHC.Exts diff --git a/testsuite/tests/primops/should_run/CmpInt8.hs b/testsuite/tests/primops/should_run/CmpInt8.hs index 2bed2000daf211df91e7ba9a3797dcf9db30be7e..4ef9f360a4980e0ada821725aada6f6e4e0a626f 100644 --- a/testsuite/tests/primops/should_run/CmpInt8.hs +++ b/testsuite/tests/primops/should_run/CmpInt8.hs @@ -5,7 +5,6 @@ module Main where import Data.Int import Data.List (findIndex) -import GHC.Prim import GHC.Exts diff --git a/testsuite/tests/primops/should_run/CmpWord16.hs b/testsuite/tests/primops/should_run/CmpWord16.hs index a5d527afd076a2057a0de10dd93a7195c1b9a4b3..53560faa0d8d1af32cc12bb8cc1f30da21d68813 100644 --- a/testsuite/tests/primops/should_run/CmpWord16.hs +++ b/testsuite/tests/primops/should_run/CmpWord16.hs @@ -5,7 +5,6 @@ module Main where import Data.Word import Data.List (findIndex) -import GHC.Prim import GHC.Exts diff --git a/testsuite/tests/primops/should_run/CmpWord32.hs b/testsuite/tests/primops/should_run/CmpWord32.hs index aeb7ec28e4a62a581d663662ba1d3aa7717e7b78..b08d0d342f142e81fd89016bdba581c4f60c72cb 100644 --- a/testsuite/tests/primops/should_run/CmpWord32.hs +++ b/testsuite/tests/primops/should_run/CmpWord32.hs @@ -5,7 +5,6 @@ module Main where import Data.Word import Data.List (findIndex) -import GHC.Prim import GHC.Exts diff --git a/testsuite/tests/primops/should_run/CmpWord8.hs b/testsuite/tests/primops/should_run/CmpWord8.hs index 813ae7c2701ce9589e3ea0b23b52053840026a55..85e95ab233901817ebdb7c8210aad803726a9126 100644 --- a/testsuite/tests/primops/should_run/CmpWord8.hs +++ b/testsuite/tests/primops/should_run/CmpWord8.hs @@ -5,7 +5,6 @@ module Main where import Data.Word import Data.List (findIndex) -import GHC.Prim import GHC.Exts diff --git a/testsuite/tests/primops/should_run/T10678.hs b/testsuite/tests/primops/should_run/T10678.hs index 9019ab6345e8439d464385d389aaefa462c589ea..3321d656f5549a4ac501ffd592c38de911d2a4fe 100644 --- a/testsuite/tests/primops/should_run/T10678.hs +++ b/testsuite/tests/primops/should_run/T10678.hs @@ -1,6 +1,6 @@ {-# LANGUAGE MagicHash #-} -import GHC.Prim +import GHC.Exts main :: IO () main = go 1000000# 10 (2^100) diff --git a/testsuite/tests/printer/Ppr041.hs b/testsuite/tests/printer/Ppr041.hs index 154a6097f71193123f0d93debaba63caa8060285..f22e446353d24a1863ad66f4a45bf06a8f87b9b5 100644 --- a/testsuite/tests/printer/Ppr041.hs +++ b/testsuite/tests/printer/Ppr041.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash #-} module Main where -import GHC.Prim +import GHC.Exts data P = Positives Int# Float# Double# Char# Word# deriving Show data N = Negatives Int# Float# Double# deriving Show diff --git a/testsuite/tests/printer/Test12417.hs b/testsuite/tests/printer/Test12417.hs index 67da7f2107dcf0672f2cdd4b1f1184d8111a569b..b991f59f4079b9f0d0e9fa9ea30f81572ee4f028 100644 --- a/testsuite/tests/printer/Test12417.hs +++ b/testsuite/tests/printer/Test12417.hs @@ -2,7 +2,7 @@ module Test12417 where -import GHC.Prim +import GHC.Exts import GHC.Types import System.Mem (performMajorGC) diff --git a/testsuite/tests/profiling/should_compile/prof-late-cc.hs b/testsuite/tests/profiling/should_compile/prof-late-cc.hs index 9ae777e023d9ef6101a706234d09c3c4dc66f217..02209efde6819e3871e9f949b4a1e802aa18940f 100644 --- a/testsuite/tests/profiling/should_compile/prof-late-cc.hs +++ b/testsuite/tests/profiling/should_compile/prof-late-cc.hs @@ -2,7 +2,7 @@ {-# LANGUAGE NoImplicitPrelude #-} module Test where -import GHC.Prim +import GHC.Exts import GHC.Types -- This caused problems during implementation. diff --git a/testsuite/tests/profiling/should_run/T11627b.hs b/testsuite/tests/profiling/should_run/T11627b.hs index 5e5545a4eb875f8f2ecc937443bb33f67bdb58dd..2368f91f415cf491062a8a38b5a688efbf558d23 100644 --- a/testsuite/tests/profiling/should_run/T11627b.hs +++ b/testsuite/tests/profiling/should_run/T11627b.hs @@ -5,7 +5,7 @@ -- A reduced test case for #11627 -import GHC.Prim +import GHC.Exts import GHC.Types (Int(..),IO(..)) import System.Mem diff --git a/testsuite/tests/rep-poly/RepPolyBackpack4.bkp b/testsuite/tests/rep-poly/RepPolyBackpack4.bkp index 8f151278cb3da34802e376ce61c064ea6f9fe989..3a96f1b42ed237c6df0028383329144c9d189f3f 100644 --- a/testsuite/tests/rep-poly/RepPolyBackpack4.bkp +++ b/testsuite/tests/rep-poly/RepPolyBackpack4.bkp @@ -26,7 +26,7 @@ unit number-int where unit number-unboxed-int where module NumberUnknown where import GHC.Types - import GHC.Prim + import GHC.Exts type Rep = IntRep type Number = Int# plus :: Int# -> Int# -> Int# diff --git a/testsuite/tests/rep-poly/T12709.hs b/testsuite/tests/rep-poly/T12709.hs index 6a7e37a5d256bf4e7c0ae86efcf2c739cd0eac3c..397dcd7d2c597887e02ea1c041d964938e6aa3a7 100644 --- a/testsuite/tests/rep-poly/T12709.hs +++ b/testsuite/tests/rep-poly/T12709.hs @@ -6,7 +6,7 @@ module T12709 where import GHC.Types import Prelude hiding (Num (..)) import qualified Prelude as P -import GHC.Prim +import GHC.Exts data BoxUnbox = BUB Int Int# diff --git a/testsuite/tests/rts/T14900.hs b/testsuite/tests/rts/T14900.hs index bd29289e1939832dc240dd986c70d9cb6991c618..613f66d3a938f5ba1d430d1982eb78563a046971 100644 --- a/testsuite/tests/rts/T14900.hs +++ b/testsuite/tests/rts/T14900.hs @@ -2,7 +2,7 @@ import GHC.Compact import GHC.Int -import GHC.Prim +import GHC.Exts import GHC.IO import GHC.Exts diff --git a/testsuite/tests/rts/T17088.hs b/testsuite/tests/rts/T17088.hs index 6ca24d88d4fa32544d022032253033be4326f242..6d7aadc7490245a431949b51d987f625d62fc021 100644 --- a/testsuite/tests/rts/T17088.hs +++ b/testsuite/tests/rts/T17088.hs @@ -6,7 +6,7 @@ module Main (main) where import Data.Word import Foreign.Storable -import GHC.Prim +import GHC.Exts import GHC.Ptr import GHC.Types import System.IO.Unsafe diff --git a/testsuite/tests/rts/cloneMyStack.hs b/testsuite/tests/rts/cloneMyStack.hs index 11a69201e0d339a41a6328c4863467a42e304a68..9de6c359e785688d2bee7175ff6cca8160e1a5dc 100644 --- a/testsuite/tests/rts/cloneMyStack.hs +++ b/testsuite/tests/rts/cloneMyStack.hs @@ -2,7 +2,7 @@ {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnliftedFFITypes #-} -import GHC.Prim (StackSnapshot#) +import GHC.Exts (StackSnapshot#) import GHC.Stack.CloneStack import Foreign import Foreign.C.Types (CUInt) diff --git a/testsuite/tests/rts/cloneMyStack_retBigStackFrame.hs b/testsuite/tests/rts/cloneMyStack_retBigStackFrame.hs index cccc8ec618ac8f0f42af372373c81b55331ceff0..0fe4c291c1310dc335952c2ed1899705bb213053 100644 --- a/testsuite/tests/rts/cloneMyStack_retBigStackFrame.hs +++ b/testsuite/tests/rts/cloneMyStack_retBigStackFrame.hs @@ -8,7 +8,7 @@ module Main where import Control.Concurrent import Data.IORef import GHC.IO.Unsafe -import GHC.Prim (StackSnapshot#) +import GHC.Exts (StackSnapshot#) import GHC.Stack.CloneStack import System.Mem diff --git a/testsuite/tests/rts/cloneThreadStack.hs b/testsuite/tests/rts/cloneThreadStack.hs index fa2bc66795d1f0b94a3e33ec0fd36986bcf8ac8a..1cd5107892e2030092f796de5128e489fdeb8c16 100644 --- a/testsuite/tests/rts/cloneThreadStack.hs +++ b/testsuite/tests/rts/cloneThreadStack.hs @@ -2,7 +2,7 @@ {-# LANGUAGE MagicHash #-} {-# LANGUAGE UnliftedFFITypes #-} -import GHC.Prim (StackSnapshot#, ThreadId#) +import GHC.Exts (StackSnapshot#, ThreadId#) import GHC.Conc.Sync (ThreadId(..)) import GHC.Stack.CloneStack import Control.Concurrent diff --git a/testsuite/tests/simplCore/T9646/Type.hs b/testsuite/tests/simplCore/T9646/Type.hs index 337a7859cc2386993647495ec90dbd67277e9a68..4de77648cea578d150febaf3c96d0eb661259823 100644 --- a/testsuite/tests/simplCore/T9646/Type.hs +++ b/testsuite/tests/simplCore/T9646/Type.hs @@ -4,7 +4,7 @@ module Type where -import GHC.Prim +import GHC.Exts import GHC.Types import StrictPrim diff --git a/testsuite/tests/simplCore/should_compile/T13155.hs b/testsuite/tests/simplCore/should_compile/T13155.hs index f3ec2c8e506352d9cad6eaa099d9bfe14637c3f4..fd968c62398c6da0cf89f31ec83b9cee7fe5a6b1 100644 --- a/testsuite/tests/simplCore/should_compile/T13155.hs +++ b/testsuite/tests/simplCore/should_compile/T13155.hs @@ -4,7 +4,6 @@ module T13155 where import GHC.Ptr -import GHC.Prim import GHC.Exts foo :: Ptr Float -> State# RealWorld -> (# State# RealWorld, Float #) diff --git a/testsuite/tests/simplCore/should_compile/T18589.hs b/testsuite/tests/simplCore/should_compile/T18589.hs index c892bc844e058b061ad33ffa1d7edd872677856f..82c67237309ce5d06672e943ef6320e6c8a0db8f 100644 --- a/testsuite/tests/simplCore/should_compile/T18589.hs +++ b/testsuite/tests/simplCore/should_compile/T18589.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash #-} module T18589 where -import GHC.Prim +import GHC.Exts -- See Note [Guarding against silly shifts] -- Make sure that a silly shift is optimized correctly diff --git a/testsuite/tests/simplCore/should_compile/T5658b.hs b/testsuite/tests/simplCore/should_compile/T5658b.hs index baaea86640f36515f765224d933c2f36fd810e96..7b4273839542f0fa690c7b10662ce8f2e10f6929 100644 --- a/testsuite/tests/simplCore/should_compile/T5658b.hs +++ b/testsuite/tests/simplCore/should_compile/T5658b.hs @@ -1,7 +1,6 @@ {-# LANGUAGE MagicHash, BangPatterns #-} module T5658b where -import GHC.Prim -import GHC.Exts ( isTrue# ) +import GHC.Exts foo :: ByteArray# -> ByteArray# -> Int# -> Int# -> Bool foo xs ys m n = go 0# 0# diff --git a/testsuite/tests/simplCore/should_compile/T7088.hs b/testsuite/tests/simplCore/should_compile/T7088.hs index 7b3ec2c603f533179cd0c0eb03a755fb7f1c4acf..254d7851fa08297d23b0345702806c912161b629 100644 --- a/testsuite/tests/simplCore/should_compile/T7088.hs +++ b/testsuite/tests/simplCore/should_compile/T7088.hs @@ -2,7 +2,7 @@ module Float where -import GHC.Prim +import GHC.Exts foo vs = let w = if length (reverse vs) > 10 then Just (length vs) else Nothing diff --git a/testsuite/tests/simplCore/should_compile/T7287.hs b/testsuite/tests/simplCore/should_compile/T7287.hs index bb9035a6aec4a6f4f934d6880641a8ffb75e5416..e8dc1bda11a4d11e0f387bcdd9a56b18cb9dcf35 100644 --- a/testsuite/tests/simplCore/should_compile/T7287.hs +++ b/testsuite/tests/simplCore/should_compile/T7287.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash #-} module T7287 where -import GHC.Prim +import GHC.Exts {-# RULES "int2Word#/word2Int#" forall x. int2Word# (word2Int# x) = x diff --git a/testsuite/tests/simplCore/should_compile/T7796.hs b/testsuite/tests/simplCore/should_compile/T7796.hs index f0f535331687b9940332774df5ca705a5f02e5fb..6d6c82433252385e348f32203ecdb1a20a202764 100644 --- a/testsuite/tests/simplCore/should_compile/T7796.hs +++ b/testsuite/tests/simplCore/should_compile/T7796.hs @@ -2,7 +2,7 @@ module T7796 where -import GHC.Prim +import GHC.Exts -- -- test for #7796 diff --git a/testsuite/tests/simplCore/should_compile/T8274.hs b/testsuite/tests/simplCore/should_compile/T8274.hs index 03f50ef3ea87711ee67a56cdb44bed3af9ad586f..97a1cde04cdc83e5690661b9fd7054afaf5ac109 100644 --- a/testsuite/tests/simplCore/should_compile/T8274.hs +++ b/testsuite/tests/simplCore/should_compile/T8274.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash #-} module T8274 where -import GHC.Prim +import GHC.Exts data P = Positives Int# Float# Double# Char# Word# data N = Negatives Int# Float# Double# diff --git a/testsuite/tests/simplCore/should_run/T9390.hs b/testsuite/tests/simplCore/should_run/T9390.hs index 04b4da0e4dded47842642a70eccb5e248b1c6b0b..2d5d9ce6e49d877f3ea605029e11bf0b3e795f9d 100644 --- a/testsuite/tests/simplCore/should_run/T9390.hs +++ b/testsuite/tests/simplCore/should_run/T9390.hs @@ -2,7 +2,7 @@ module Main(main ) where import GHC.IO (IO (..)) -import GHC.Prim +import GHC.Exts writeB :: MutableArray# RealWorld Char -> IO () writeB arr# = IO $ \s0# -> (# writeArray# arr# 0# 'B' s0#, () #) diff --git a/testsuite/tests/simplCore/should_run/simplrun010.hs b/testsuite/tests/simplCore/should_run/simplrun010.hs index eeeb48281f0eba4d9b240322f3517dcd7fdb58ae..eb9d18973d599b59ff651465d24e92a57030c229 100644 --- a/testsuite/tests/simplCore/should_run/simplrun010.hs +++ b/testsuite/tests/simplCore/should_run/simplrun010.hs @@ -17,7 +17,7 @@ import Data.Char(ord,chr) -- low level imports import GHC.Base (realWorld#) import GHC.IO (IO(IO), unIO, unsafePerformIO) -import GHC.Prim (State#,RealWorld) +import GHC.Exts (State#,RealWorld) -- FFI replacements for Haskell stuff diff --git a/testsuite/tests/stranal/should_compile/T13031.hs b/testsuite/tests/stranal/should_compile/T13031.hs index d5fe761b343988304a502a28d5b49dccac5c8b77..99b714b5a16a76d0295b270933c211bc230ab992 100644 --- a/testsuite/tests/stranal/should_compile/T13031.hs +++ b/testsuite/tests/stranal/should_compile/T13031.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash #-} module Foo( f ) where -import GHC.Prim +import GHC.Exts f True = raise# True f False = \p q -> raise# False diff --git a/testsuite/tests/th/TH_StringPrimL.hs b/testsuite/tests/th/TH_StringPrimL.hs index 92f791fb5631913a6da3a603d59badbb022b2158..7a88e8b63e2b4fbc39d3014912ecf22577bd5460 100644 --- a/testsuite/tests/th/TH_StringPrimL.hs +++ b/testsuite/tests/th/TH_StringPrimL.hs @@ -2,7 +2,7 @@ module Main where import Language.Haskell.TH -import GHC.Prim(Addr#) +import GHC.Exts(Addr#) import GHC.Ptr import Foreign.Marshal.Array (peekArray) import Data.Word (Word8) diff --git a/testsuite/tests/th/TH_foreignCallingConventions.hs b/testsuite/tests/th/TH_foreignCallingConventions.hs index ee3951016932e57cfeabb1200ddcaa6d50f2d088..66548b91bb0a66c11939f4abb9d6c095c6c8156a 100644 --- a/testsuite/tests/th/TH_foreignCallingConventions.hs +++ b/testsuite/tests/th/TH_foreignCallingConventions.hs @@ -4,7 +4,7 @@ module TH_foreignCallingConventions where -import GHC.Prim +import GHC.Exts import Control.Applicative import Language.Haskell.TH import System.IO diff --git a/testsuite/tests/typecheck/should_compile/T14185.hs b/testsuite/tests/typecheck/should_compile/T14185.hs index 41e47d2913297c59766ef795a028fc52444e59a2..7d1152fc33cd1c758c36f5eb79aeb37cf3a85a3e 100644 --- a/testsuite/tests/typecheck/should_compile/T14185.hs +++ b/testsuite/tests/typecheck/should_compile/T14185.hs @@ -4,7 +4,7 @@ module T14185 where import GHC.Types -import GHC.Prim +import GHC.Exts class Unbox (t :: *) (r :: TYPE k) | t -> r, r -> t where diff --git a/testsuite/tests/typecheck/should_compile/T7888.hs b/testsuite/tests/typecheck/should_compile/T7888.hs index de9792784aca9960f1e2f615ef755537ad5c0304..ba979e5cbc499c8c9cf740b0bf96f14062e91c7d 100644 --- a/testsuite/tests/typecheck/should_compile/T7888.hs +++ b/testsuite/tests/typecheck/should_compile/T7888.hs @@ -2,7 +2,7 @@ module T7888 where import GHC.Err( undefined ) -import GHC.Prim +import GHC.Exts {- The fix for #11431 makes this no longer work. But it shouldn't really, without impredicativity. diff --git a/testsuite/tests/typecheck/should_fail/T12373.hs b/testsuite/tests/typecheck/should_fail/T12373.hs index 3f23779b8250c572007112ab579a0517b4f89a7f..22867a8dc6256e16108e485cbfcbcee6147e7e1a 100644 --- a/testsuite/tests/typecheck/should_fail/T12373.hs +++ b/testsuite/tests/typecheck/should_fail/T12373.hs @@ -3,7 +3,7 @@ module T12373 where import GHC.MVar -import GHC.Prim +import GHC.Exts import GHC.Types main :: IO () diff --git a/testsuite/tests/typecheck/should_fail/T13610.hs b/testsuite/tests/typecheck/should_fail/T13610.hs index 371c3388e9eeb0569eb5913021991bcd583872b6..bee75b8faaf5f90a678e86f8920de9e63105dc11 100644 --- a/testsuite/tests/typecheck/should_fail/T13610.hs +++ b/testsuite/tests/typecheck/should_fail/T13610.hs @@ -2,7 +2,7 @@ module T13610 where -import GHC.Prim +import GHC.Exts import GHC.Types main = do diff --git a/testsuite/tests/typecheck/should_fail/T13611.hs b/testsuite/tests/typecheck/should_fail/T13611.hs index ea22791dab82611f154fef5a732df74fe1ee1e80..9bc894af59f308f0caddf39f389528a629eb82e8 100644 --- a/testsuite/tests/typecheck/should_fail/T13611.hs +++ b/testsuite/tests/typecheck/should_fail/T13611.hs @@ -1,5 +1,5 @@ {-# LANGUAGE MagicHash, UnboxedTuples #-} -import GHC.Prim +import GHC.Exts import GHC.Types main = do diff --git a/testsuite/tests/typecheck/should_fail/T13821A.hs-boot b/testsuite/tests/typecheck/should_fail/T13821A.hs-boot index 4fda6bce214e05c8576ace904d7ec8495051d3e6..4406ae4fb750f4d690fb5a5f030da8a133346b7d 100644 --- a/testsuite/tests/typecheck/should_fail/T13821A.hs-boot +++ b/testsuite/tests/typecheck/should_fail/T13821A.hs-boot @@ -1,6 +1,6 @@ {-# LANGUAGE MagicHash #-} module T13821A where -import GHC.Prim +import GHC.Exts x :: Int# diff --git a/testsuite/tests/typecheck/should_fail/T13821B.bkp b/testsuite/tests/typecheck/should_fail/T13821B.bkp index 8d5e066c042b1b90e8fbead3666e97d62292f1d0..238ad6e9abd79ba0c6977e06a8054adf796d472c 100644 --- a/testsuite/tests/typecheck/should_fail/T13821B.bkp +++ b/testsuite/tests/typecheck/should_fail/T13821B.bkp @@ -1,6 +1,6 @@ {-# LANGUAGE MagicHash #-} unit T13821B where signature A where - import GHC.Prim + import GHC.Exts - x :: Int# \ No newline at end of file + x :: Int# diff --git a/testsuite/tests/typecheck/should_fail/T14605.hs b/testsuite/tests/typecheck/should_fail/T14605.hs index 4f75d59ebde21b713204be8f2bbe120137555464..907b8f65a3df421e4c4002b50d787f96f2a86798 100644 --- a/testsuite/tests/typecheck/should_fail/T14605.hs +++ b/testsuite/tests/typecheck/should_fail/T14605.hs @@ -9,6 +9,6 @@ module T14605 where -import GHC.Prim (coerce) +import GHC.Exts (coerce) duplicate = coerce @(forall x. ()) @(forall x. x) diff --git a/testsuite/tests/typecheck/should_fail/tcfail075.hs b/testsuite/tests/typecheck/should_fail/tcfail075.hs index d9189bf18cc70c25e6dbfc62e3bfedc28a342e75..b964fe7b37cbf5c51c77606148dce0f29063f307 100644 --- a/testsuite/tests/typecheck/should_fail/tcfail075.hs +++ b/testsuite/tests/typecheck/should_fail/tcfail075.hs @@ -5,7 +5,7 @@ module ShouldFail where import GHC.Base -import GHC.Prim +import GHC.Exts x = 1# diff --git a/testsuite/tests/typecheck/should_run/T11120.hs b/testsuite/tests/typecheck/should_run/T11120.hs index 5b5d7f343c7d2d3821805b3968556ed244b8e424..12dc5e279124aaf02398eb17d2de79f0f49a3da2 100644 --- a/testsuite/tests/typecheck/should_run/T11120.hs +++ b/testsuite/tests/typecheck/should_run/T11120.hs @@ -1,7 +1,7 @@ {-# LANGUAGE MagicHash, DataKinds #-} -- See also TypeOf.hs -import GHC.Prim +import GHC.Exts import Data.Typeable data CharHash = CharHash Char# diff --git a/testsuite/tests/typecheck/should_run/tcrun048.hs b/testsuite/tests/typecheck/should_run/tcrun048.hs index 57308c3aaada3dd35730f6e06e5f5d2b36febad9..df9a6f0f0cc9ca4404fa073a36cd7a693bc4dad7 100644 --- a/testsuite/tests/typecheck/should_run/tcrun048.hs +++ b/testsuite/tests/typecheck/should_run/tcrun048.hs @@ -2,7 +2,7 @@ module Main where -import GHC.Prim (Int#, Double#) +import GHC.Exts (Int#, Double#) main :: IO () main = let f = int2Integer# 0# in putStrLn "" diff --git a/testsuite/tests/unboxedsums/unboxedsums1.hs b/testsuite/tests/unboxedsums/unboxedsums1.hs index 42a04ae94e3f3361dcd378f32f2b66451ce24032..78d35b7170727829a8e0e7d4c031dcbe86601bc1 100644 --- a/testsuite/tests/unboxedsums/unboxedsums1.hs +++ b/testsuite/tests/unboxedsums/unboxedsums1.hs @@ -2,7 +2,7 @@ module Main where -import GHC.Prim +import GHC.Exts import GHC.Types import System.Mem (performMajorGC) diff --git a/testsuite/tests/unboxedsums/unboxedsums12.hs b/testsuite/tests/unboxedsums/unboxedsums12.hs index 93f1793e8ab6ab330430f74993521c6a42aaa020..a9ae2efa5f19462857de690e8cb5dea98ad1f752 100644 --- a/testsuite/tests/unboxedsums/unboxedsums12.hs +++ b/testsuite/tests/unboxedsums/unboxedsums12.hs @@ -2,7 +2,7 @@ module Lib where -import GHC.Prim +import GHC.Exts data B = B1 Int# Int# Int# Int# Int# | B2 Float# diff --git a/testsuite/tests/unboxedsums/unboxedsums2.hs b/testsuite/tests/unboxedsums/unboxedsums2.hs index 115415f7c69ea0a5a7d63137c8aa2b35efb15cf8..ae05b5c3866ce6cca2213371ec9042850b8d0682 100644 --- a/testsuite/tests/unboxedsums/unboxedsums2.hs +++ b/testsuite/tests/unboxedsums/unboxedsums2.hs @@ -2,7 +2,7 @@ module Main where -import GHC.Prim +import GHC.Exts import GHC.Types -- Code generator used to fail with illegal instruction errors when Float# is diff --git a/testsuite/tests/unboxedsums/unboxedsums3.hs b/testsuite/tests/unboxedsums/unboxedsums3.hs index add8aa73dfba78225683ae7743c6b2c32c09fb1e..096e0a70f16163ff0014f8c18b58ead873eea1bc 100644 --- a/testsuite/tests/unboxedsums/unboxedsums3.hs +++ b/testsuite/tests/unboxedsums/unboxedsums3.hs @@ -2,7 +2,7 @@ module Main where -import GHC.Prim +import GHC.Exts import GHC.Types import Data.Void (Void) diff --git a/testsuite/tests/unboxedsums/unboxedsums6.hs b/testsuite/tests/unboxedsums/unboxedsums6.hs index 767366d4d58d106185adee463ff77edb7a379916..78c9f393504bfb24802a49f3d1f1b8d17d0a94df 100644 --- a/testsuite/tests/unboxedsums/unboxedsums6.hs +++ b/testsuite/tests/unboxedsums/unboxedsums6.hs @@ -4,7 +4,7 @@ module Main where -import GHC.Prim +import GHC.Exts import GHC.Types import System.Mem (performMajorGC) diff --git a/testsuite/tests/unboxedsums/unboxedsums7.hs b/testsuite/tests/unboxedsums/unboxedsums7.hs index d64dabb13a8002c8820f0bc999629105fb6e3a30..901ba4004dbf26764422590f80baf57c6b06c2ea 100644 --- a/testsuite/tests/unboxedsums/unboxedsums7.hs +++ b/testsuite/tests/unboxedsums/unboxedsums7.hs @@ -2,7 +2,7 @@ module Main where -import GHC.Prim +import GHC.Exts import GHC.Types type Either1 a b c = (# a | (# b, c #) #) diff --git a/testsuite/tests/unboxedsums/unboxedsums8.hs b/testsuite/tests/unboxedsums/unboxedsums8.hs index 07ef122b696e811d5b4bb8880b01c7bb028a2d9c..8a7344c950f8d9e489f8420cdaec0d13aec363dd 100644 --- a/testsuite/tests/unboxedsums/unboxedsums8.hs +++ b/testsuite/tests/unboxedsums/unboxedsums8.hs @@ -2,7 +2,7 @@ module Main where -import GHC.Prim +import GHC.Exts import GHC.Types type Sum1 = (# (# Int#, Int #) | (# Int#, Int# #) | (# Int, Int# #) #)