diff options
Diffstat (limited to 'libraries')
-rw-r--r-- | libraries/ghc-prim/GHC/Magic.hs | 17 |
1 files changed, 2 insertions, 15 deletions
diff --git a/libraries/ghc-prim/GHC/Magic.hs b/libraries/ghc-prim/GHC/Magic.hs index d1f2650a96..cd9474271d 100644 --- a/libraries/ghc-prim/GHC/Magic.hs +++ b/libraries/ghc-prim/GHC/Magic.hs @@ -1,8 +1,6 @@ -{-# LANGUAGE CPP #-} {-# LANGUAGE Trustworthy #-} {-# LANGUAGE NoImplicitPrelude #-} {-# LANGUAGE MagicHash #-} -{-# LANGUAGE UnboxedTuples #-} {-# LANGUAGE DataKinds #-} {-# LANGUAGE PolyKinds #-} {-# LANGUAGE ScopedTypeVariables #-} @@ -32,13 +30,8 @@ module GHC.Magic ( inline, noinline, lazy, oneShot, runRW# ) where -- Here import TYPE explicitly from GHC.Types and not from GHC.Prim. This is -- because TYPE is not exported by the source Haskell module generated by --- genprimops which Haddock will typecheck. --- Likewise, realWorld# is not generated by genprimops so we use CPP and only --- import/use it when not building haddock docs. -#if !defined(__HADDOCK_VERSION__) -import GHC.Prim (realWorld#) -#endif -import GHC.Prim (State#, RealWorld) +-- genprimops which Haddock will typecheck (#15935). +import GHC.Prim (State#, realWorld#, RealWorld) import GHC.Types (RuntimeRep, TYPE) -- | The call @inline f@ arranges that @f@ is inlined, regardless of @@ -83,8 +76,6 @@ noinline x = x -- -- If 'lazy' were not lazy, 'Control.Parallel.par' would look strict in -- @y@ which would defeat the whole purpose of 'Control.Parallel.par'. --- --- Like 'seq', the argument of 'lazy' can have an unboxed type. lazy :: a -> a lazy x = x -- Implementation note: its strictness and unfolding are over-ridden @@ -124,8 +115,4 @@ runRW# :: forall (r :: RuntimeRep) (o :: TYPE r). (State# RealWorld -> o) -> o -- See Note [runRW magic] in GHC.CoreToStg.Prep. {-# NOINLINE runRW# #-} -- runRW# is inlined manually in CorePrep -#if !defined(__HADDOCK_VERSION__) runRW# m = m realWorld# -#else -runRW# = runRW# -- The realWorld# is too much for haddock -#endif |