Commit 15312bbb authored by Sylvain Henry's avatar Sylvain Henry

Modules (#13009)

* SysTools
* Parser
* GHC.Builtin
* GHC.Iface.Recomp
* Settings

Update Haddock submodule

Metric Decrease:
    Naperian
    parsing001
parent 3ca52151
Pipeline #18228 failed with stages
in 421 minutes and 50 seconds
......@@ -319,7 +319,7 @@ import GHC.Hs
import GHC.Core.Type hiding( typeKind )
import GHC.Tc.Utils.TcType
import GHC.Types.Id
import TysPrim ( alphaTyVars )
import GHC.Builtin.Types.Prim ( alphaTyVars )
import GHC.Core.TyCon
import GHC.Core.TyCo.Ppr ( pprForAll )
import GHC.Core.Class
......@@ -338,8 +338,8 @@ import GHC.Driver.Types
import GHC.Driver.CmdLine
import GHC.Driver.Session hiding (WarnReason(..))
import GHC.Driver.Ways
import SysTools
import SysTools.BaseDir
import GHC.SysTools
import GHC.SysTools.BaseDir
import GHC.Types.Annotations
import GHC.Types.Module
import Panic
......@@ -352,15 +352,15 @@ import StringBuffer
import Outputable
import GHC.Types.Basic
import FastString
import qualified Parser
import Lexer
import ApiAnnotation
import qualified GHC.Parser as Parser
import GHC.Parser.Lexer
import GHC.Parser.Annotation
import qualified GHC.LanguageExtensions as LangExt
import GHC.Types.Name.Env
import GHC.Tc.Module
import GHC.Tc.Utils.Instantiate
import GHC.Tc.Instance.Family
import FileCleanup
import GHC.SysTools.FileCleanup
import Data.Foldable
import qualified Data.Map.Strict as Map
......@@ -857,7 +857,7 @@ data ParsedModule =
, pm_parsed_source :: ParsedSource
, pm_extra_src_files :: [FilePath]
, pm_annotations :: ApiAnns }
-- See Note [Api annotations] in ApiAnnotation.hs
-- See Note [Api annotations] in GHC.Parser.Annotation
instance ParsedMod ParsedModule where
modSummary m = pm_mod_summary m
......@@ -951,7 +951,7 @@ parseModule ms = do
hpm <- liftIO $ hscParse hsc_env_tmp ms
return (ParsedModule ms (hpm_module hpm) (hpm_src_files hpm)
(hpm_annotations hpm))
-- See Note [Api annotations] in ApiAnnotation.hs
-- See Note [Api annotations] in GHC.Parser.Annotation
-- | Typecheck and rename a parsed module.
--
......
{-
(c) The GRASP/AQUA Project, Glasgow University, 1992-1998
\section[PrelNames]{Definitions of prelude modules and names}
\section[GHC.Builtin.Names]{Definitions of prelude modules and names}
Nota Bene: all Names defined in here should come from the base package
......@@ -63,7 +63,7 @@ This is accomplished through a combination of mechanisms:
2. The knownKeyNames (which consist of the basicKnownKeyNames from
the module, and those names reachable via the wired-in stuff from
TysWiredIn) are used to initialise the "OrigNameCache" in
GHC.Builtin.Types) are used to initialise the "OrigNameCache" in
GHC.Iface.Env. This initialization ensures that when the type checker
or renamer (both of which use GHC.Iface.Env) look up an original name
(i.e. a pair of a Module and an OccName) for a known-key name
......@@ -98,7 +98,7 @@ things,
GHC.Iface.Binary.putName, with that special treatment detected when we read
back to ensure that we get back to the correct uniques. See Note [Symbol
table representation of names] in GHC.Iface.Binary and Note [How tuples
work] in TysWiredIn.
work] in GHC.Builtin.Types.
Most of the infinite families cannot occur in source code, so mechanisms (a) and (b)
suffice to ensure that they always have the right Unique. In particular,
......@@ -145,16 +145,17 @@ Note [Wired-in packages] in GHC.Types.Module. This is done in Packages.findWired
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
module PrelNames (
Unique, Uniquable(..), hasKey, -- Re-exported for convenience
module GHC.Builtin.Names
( Unique, Uniquable(..), hasKey, -- Re-exported for convenience
-----------------------------------------------------------
module PrelNames, -- A huge bunch of (a) Names, e.g. intTyConName
-- (b) Uniques e.g. intTyConKey
-- (c) Groups of classes and types
-- (d) miscellaneous things
-- So many that we export them all
) where
-----------------------------------------------------------
module GHC.Builtin.Names, -- A huge bunch of (a) Names, e.g. intTyConName
-- (b) Uniques e.g. intTyConKey
-- (c) Groups of classes and types
-- (d) miscellaneous things
-- So many that we export them all
)
where
#include "HsVersions.h"
......@@ -210,7 +211,7 @@ isUnboundName name = name `hasKey` unboundKey
This section tells what the compiler knows about the association of
names with uniques. These ones are the *non* wired-in ones. The
wired in ones are defined in TysWiredIn etc.
wired in ones are defined in GHC.Builtin.Types etc.
-}
basicKnownKeyNames :: [Name] -- See Note [Known-key names]
......@@ -1648,7 +1649,7 @@ hasFieldClassNameKey = mkPreludeClassUnique 49
---------------- Template Haskell -------------------
-- THNames.hs: USES ClassUniques 200-299
-- GHC.Builtin.Names.TH: USES ClassUniques 200-299
-----------------------------------------------------
{-
......@@ -1895,7 +1896,7 @@ unsafeEqualityTyConKey = mkPreludeTyConUnique 191
---------------- Template Haskell -------------------
-- THNames.hs: USES TyConUniques 200-299
-- GHC.Builtin.Names.TH: USES TyConUniques 200-299
-----------------------------------------------------
----------------------- SIMD ------------------------
......@@ -2025,7 +2026,7 @@ vecRepDataConKey = mkPreludeDataConUnique 71
tupleRepDataConKey = mkPreludeDataConUnique 72
sumRepDataConKey = mkPreludeDataConUnique 73
-- See Note [Wiring in RuntimeRep] in TysWiredIn
-- See Note [Wiring in RuntimeRep] in GHC.Builtin.Types
runtimeRepSimpleDataConKeys, unliftedSimpleRepDataConKeys, unliftedRepDataConKeys :: [Unique]
liftedRepDataConKey :: Unique
runtimeRepSimpleDataConKeys@(liftedRepDataConKey : unliftedSimpleRepDataConKeys)
......@@ -2036,12 +2037,12 @@ unliftedRepDataConKeys = vecRepDataConKey :
sumRepDataConKey :
unliftedSimpleRepDataConKeys
-- See Note [Wiring in RuntimeRep] in TysWiredIn
-- See Note [Wiring in RuntimeRep] in GHC.Builtin.Types
-- VecCount
vecCountDataConKeys :: [Unique]
vecCountDataConKeys = map mkPreludeDataConUnique [89..94]
-- See Note [Wiring in RuntimeRep] in TysWiredIn
-- See Note [Wiring in RuntimeRep] in GHC.Builtin.Types
-- VecElem
vecElemDataConKeys :: [Unique]
vecElemDataConKeys = map mkPreludeDataConUnique [95..104]
......@@ -2068,7 +2069,7 @@ unsafeReflDataConKey :: Unique
unsafeReflDataConKey = mkPreludeDataConUnique 114
---------------- Template Haskell -------------------
-- THNames.hs: USES DataUniques 200-250
-- GHC.Builtin.Names.TH: USES DataUniques 200-250
-----------------------------------------------------
......@@ -2319,7 +2320,7 @@ proxyHashKey :: Unique
proxyHashKey = mkPreludeMiscIdUnique 502
---------------- Template Haskell -------------------
-- THNames.hs: USES IdUniques 200-499
-- GHC.Builtin.Names.TH: USES IdUniques 200-499
-----------------------------------------------------
-- Used to make `Typeable` dictionaries
......
module PrelNames where
module GHC.Builtin.Names where
import GHC.Types.Module
import GHC.Types.Unique
......
......@@ -4,11 +4,11 @@
-- %* *
-- %************************************************************************
module THNames where
module GHC.Builtin.Names.TH where
import GhcPrelude ()
import PrelNames( mk_known_key_name )
import GHC.Builtin.Names( mk_known_key_name )
import GHC.Types.Module( Module, mkModuleNameFS, mkModule, thUnitId )
import GHC.Types.Name( Name )
import GHC.Types.Name.Occurrence( tcName, clsName, dataName, varName )
......@@ -608,7 +608,7 @@ incoherentDataConName = thCon (fsLit "Incoherent") incoherentDataConKey
********************************************************************* -}
-- ClassUniques available: 200-299
-- Check in PrelNames if you want to change this
-- Check in GHC.Builtin.Names if you want to change this
liftClassKey :: Unique
liftClassKey = mkPreludeClassUnique 200
......@@ -623,7 +623,7 @@ quoteClassKey = mkPreludeClassUnique 201
********************************************************************* -}
-- TyConUniques available: 200-299
-- Check in PrelNames if you want to change this
-- Check in GHC.Builtin.Names if you want to change this
expTyConKey, matchTyConKey, clauseTyConKey, qTyConKey, expQTyConKey,
patTyConKey,
......@@ -675,7 +675,7 @@ decsTyConKey = mkPreludeTyConUnique 236
********************************************************************* -}
-- DataConUniques available: 100-150
-- If you want to change this, make sure you check in PrelNames
-- If you want to change this, make sure you check in GHC.Builtin.Names
-- data Inline = ...
noInlineDataConKey, inlineDataConKey, inlinableDataConKey :: Unique
......@@ -715,7 +715,7 @@ incoherentDataConKey = mkPreludeDataConUnique 212
********************************************************************* -}
-- IdUniques available: 200-499
-- If you want to change this, make sure you check in PrelNames
-- If you want to change this, make sure you check in GHC.Builtin.Names
returnQIdKey, bindQIdKey, sequenceQIdKey, liftIdKey, newNameIdKey,
mkNameIdKey, mkNameG_vIdKey, mkNameG_dIdKey, mkNameG_tcIdKey,
......
......@@ -6,7 +6,7 @@
{-# LANGUAGE CPP #-}
module PrimOp (
module GHC.Builtin.PrimOps (
PrimOp(..), PrimOpVecCat(..), allThePrimOps,
primOpType, primOpSig,
primOpTag, maxPrimOpTag, primOpOcc,
......@@ -27,15 +27,15 @@ module PrimOp (
import GhcPrelude
import TysPrim
import TysWiredIn
import GHC.Builtin.Types.Prim
import GHC.Builtin.Types
import GHC.Cmm.Type
import GHC.Types.Demand
import GHC.Types.Id ( Id, mkVanillaGlobalWithInfo )
import GHC.Types.Id.Info ( vanillaIdInfo, setCafInfo, CafInfo(NoCafRefs) )
import GHC.Types.Name
import PrelNames ( gHC_PRIMOPWRAPPERS )
import GHC.Builtin.Names ( gHC_PRIMOPWRAPPERS )
import GHC.Core.TyCon ( TyCon, isPrimTyCon, PrimRep(..) )
import GHC.Core.Type
import GHC.Types.RepType ( typePrimRep1, tyConPrimRep1 )
......
module PrimOp where
module GHC.Builtin.PrimOps where
import GhcPrelude ()
......
{-
(c) The GRASP Project, Glasgow University, 1994-1998
\section[TysWiredIn]{Wired-in knowledge about {\em non-primitive} types}
Wired-in knowledge about {\em non-primitive} types
-}
{-# LANGUAGE CPP #-}
......@@ -10,10 +10,10 @@
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
-- | This module is about types that can be defined in Haskell, but which
-- must be wired into the compiler nonetheless. C.f module TysPrim
module TysWiredIn (
-- must be wired into the compiler nonetheless. C.f module GHC.Builtin.Types.Prim
module GHC.Builtin.Types (
-- * Helper functions defined here
mkWiredInTyConName, -- This is used in TcTypeNats to define the
mkWiredInTyConName, -- This is used in GHC.Builtin.Types.Literals to define the
-- built-in functions for evaluation.
mkWiredInIdName, -- used in GHC.Types.Id.Make
......@@ -135,14 +135,14 @@ import GhcPrelude
import {-# SOURCE #-} GHC.Types.Id.Make ( mkDataConWorkId, mkDictSelId )
-- friends:
import PrelNames
import TysPrim
import {-# SOURCE #-} KnownUniques
import GHC.Builtin.Names
import GHC.Builtin.Types.Prim
import {-# SOURCE #-} GHC.Builtin.Uniques
-- others:
import GHC.Core.Coercion.Axiom
import GHC.Types.Id
import Constants ( mAX_TUPLE_SIZE, mAX_CTUPLE_SIZE, mAX_SUM_SIZE )
import GHC.Settings.Constants ( mAX_TUPLE_SIZE, mAX_CTUPLE_SIZE, mAX_SUM_SIZE )
import GHC.Types.Module ( Module )
import GHC.Core.Type
import GHC.Types.RepType
......@@ -193,10 +193,10 @@ See also Note [Getting from RuntimeRep to PrimRep] in GHC.Types.RepType.
************************************************************************
If you change which things are wired in, make sure you change their
names in PrelNames, so they use wTcQual, wDataQual, etc
names in GHC.Builtin.Names, so they use wTcQual, wDataQual, etc
-}
-- This list is used only to define PrelInfo.wiredInThings. That in turn
-- This list is used only to define GHC.Builtin.Utils.wiredInThings. That in turn
-- is used to initialise the name environment carried around by the renamer.
-- This means that if we look up the name of a TyCon (or its implicit binders)
-- that occurs in this list that name will be assigned the wired-in key we
......@@ -375,7 +375,7 @@ It has these properties:
* If (Any k) is the type of a value, it must be a /lifted/ value. So
if we have (Any @(TYPE rr)) then rr must be 'LiftedRep. See
Note [TYPE and RuntimeRep] in TysPrim. This is a convenient
Note [TYPE and RuntimeRep] in GHC.Builtin.Types.Prim. This is a convenient
invariant, and makes isUnliftedTyCon well-defined; otherwise what
would (isUnliftedTyCon Any) be?
......@@ -654,7 +654,7 @@ constraintKind = mkTyConApp constraintKindTyCon []
* *
************************************************************************
Note [How tuples work] See also Note [Known-key names] in PrelNames
Note [How tuples work] See also Note [Known-key names] in GHC.Builtin.Names
~~~~~~~~~~~~~~~~~~~~~~
* There are three families of tuple TyCons and corresponding
DataCons, expressed by the type BasicTypes.TupleSort:
......@@ -701,7 +701,7 @@ Note [How tuples work] See also Note [Known-key names] in PrelNames
* Serialization to interface files works via the usual mechanism for known-key
things: instead of serializing the OccName we just serialize the key. During
deserialization we lookup the Name associated with the unique with the logic
in KnownUniques. See Note [Symbol table representation of names] for details.
in GHC.Builtin.Uniques. See Note [Symbol table representation of names] for details.
Note [One-tuples]
~~~~~~~~~~~~~~~~~
......@@ -1091,7 +1091,7 @@ mk_sum arity = (tycon, sum_cons)
* *
********************************************************************* -}
-- See Note [The equality types story] in TysPrim
-- See Note [The equality types story] in GHC.Builtin.Types.Prim
-- ((~~) :: forall k1 k2 (a :: k1) (b :: k2). a -> b -> Constraint)
--
-- It's tempting to put functional dependencies on (~~), but it's not
......@@ -1171,11 +1171,11 @@ mk_class tycon sc_pred sc_sel_id
********************************************************************* -}
-- For information about the usage of the following type,
-- see Note [TYPE and RuntimeRep] in module TysPrim
-- see Note [TYPE and RuntimeRep] in module GHC.Builtin.Types.Prim
runtimeRepTy :: Type
runtimeRepTy = mkTyConTy runtimeRepTyCon
-- Type synonyms; see Note [TYPE and RuntimeRep] in TysPrim
-- Type synonyms; see Note [TYPE and RuntimeRep] in GHC.Builtin.Types.Prim
-- type Type = tYPE 'LiftedRep
liftedTypeKindTyCon :: TyCon
liftedTypeKindTyCon = buildSynTyCon liftedTypeKindTyConName
......
module TysWiredIn where
module GHC.Builtin.Types where
import {-# SOURCE #-} GHC.Core.TyCon ( TyCon )
import {-# SOURCE #-} GHC.Core.TyCo.Rep (Type, Kind)
......
{-# LANGUAGE LambdaCase #-}
module TcTypeNats
module GHC.Builtin.Types.Literals
( typeNatTyCons
, typeNatCoAxiomRules
, BuiltInSynFamily(..)
......@@ -32,9 +32,10 @@ import GHC.Core.Coercion ( Role(..) )
import GHC.Tc.Types.Constraint ( Xi )
import GHC.Core.Coercion.Axiom ( CoAxiomRule(..), BuiltInSynFamily(..), TypeEqn )
import GHC.Types.Name ( Name, BuiltInSyntax(..) )
import TysWiredIn
import TysPrim ( mkTemplateAnonTyConBinders )
import PrelNames ( gHC_TYPELITS
import GHC.Builtin.Types
import GHC.Builtin.Types.Prim ( mkTemplateAnonTyConBinders )
import GHC.Builtin.Names
( gHC_TYPELITS
, gHC_TYPENATS
, typeNatAddTyFamNameKey
, typeNatMulTyFamNameKey
......@@ -60,7 +61,7 @@ import Data.List ( isPrefixOf, isSuffixOf )
Note [Type-level literals]
~~~~~~~~~~~~~~~~~~~~~~~~~~
There are currently two forms of type-level literals: natural numbers, and
symbols (even though this module is named TcTypeNats, it covers both).
symbols (even though this module is named GHC.Builtin.Types.Literals, it covers both).
Type-level literals are supported by CoAxiomRules (conditional axioms), which
power the built-in type families (see Note [Adding built-in type families]).
......@@ -77,20 +78,20 @@ There are a few steps to adding a built-in type family:
* Adding a unique for the type family TyCon
These go in PrelNames. It will likely be of the form
These go in GHC.Builtin.Names. It will likely be of the form
@myTyFamNameKey = mkPreludeTyConUnique xyz@, where @xyz@ is a number that
has not been chosen before in PrelNames. There are several examples already
in PrelNames—see, for instance, typeNatAddTyFamNameKey.
has not been chosen before in GHC.Builtin.Names. There are several examples already
in GHC.Builtin.Names—see, for instance, typeNatAddTyFamNameKey.
* Adding the type family TyCon itself
This goes in TcTypeNats. There are plenty of examples of how to define
This goes in GHC.Builtin.Types.Literals. There are plenty of examples of how to define
these—see, for instance, typeNatAddTyCon.
Once your TyCon has been defined, be sure to:
- Export it from TcTypeNats. (Not doing so caused #14632.)
- Include it in the typeNatTyCons list, defined in TcTypeNats.
- Export it from GHC.Builtin.Types.Literals. (Not doing so caused #14632.)
- Include it in the typeNatTyCons list, defined in GHC.Builtin.Types.Literals.
* Exposing associated type family axioms
......@@ -100,7 +101,7 @@ There are a few steps to adding a built-in type family:
axAdd0L and axAdd0R).
After you have defined all of these axioms, be sure to include them in the
typeNatCoAxiomRules list, defined in TcTypeNats.
typeNatCoAxiomRules list, defined in GHC.Builtin.Types.Literals.
(Not doing so caused #14934.)
* Define the type family somewhere
......@@ -109,7 +110,7 @@ There are a few steps to adding a built-in type family:
Currently, all of the built-in type families are defined in GHC.TypeLits or
GHC.TypeNats, so those are likely candidates.
Since the behavior of your built-in type family is specified in TcTypeNats,
Since the behavior of your built-in type family is specified in GHC.Builtin.Types.Literals,
you should give an open type family definition with no instances, like so:
type family MyTypeFam (m :: Nat) (n :: Nat) :: Nat
......
......@@ -2,16 +2,16 @@
(c) The AQUA Project, Glasgow University, 1994-1998
\section[TysPrim]{Wired-in knowledge about primitive types}
Wired-in knowledge about primitive types
-}
{-# LANGUAGE CPP #-}
{-# OPTIONS_GHC -Wno-incomplete-uni-patterns #-}
-- | This module defines TyCons that can't be expressed in Haskell.
-- They are all, therefore, wired-in TyCons. C.f module TysWiredIn
module TysPrim(
mkPrimTyConName, -- For implicit parameters in TysWiredIn only
-- They are all, therefore, wired-in TyCons. C.f module GHC.Builtin.Types
module GHC.Builtin.Types.Prim(
mkPrimTyConName, -- For implicit parameters in GHC.Builtin.Types only
mkTemplateKindVars, mkTemplateTyVars, mkTemplateTyVarsFrom,
mkTemplateKiTyVars, mkTemplateKiTyVar,
......@@ -92,7 +92,7 @@ module TysPrim(
import GhcPrelude
import {-# SOURCE #-} TysWiredIn
import {-# SOURCE #-} GHC.Builtin.Types
( runtimeRepTy, unboxedTupleKind, liftedTypeKind
, vecRepDataConTyCon, tupleRepDataConTyCon
, liftedRepDataConTy, unliftedRepDataConTy
......@@ -115,7 +115,7 @@ import GHC.Types.Name
import GHC.Core.TyCon
import GHC.Types.SrcLoc
import GHC.Types.Unique
import PrelNames
import GHC.Builtin.Names
import FastString
import Outputable
import GHC.Core.TyCo.Rep -- Doesn't need special access, but this is easier to avoid
......@@ -467,7 +467,7 @@ generator never has to manipulate a value of type 'a :: TYPE rr'.
(a :: TYPE r1) (b :: TYPE r2).
a -> b
* Unboxed tuples, and unboxed sums, defined in TysWiredIn
* Unboxed tuples, and unboxed sums, defined in GHC.Builtin.Types
Always inlined, and hence specialised to the call site
(#,#) :: forall (r1 :: RuntimeRep) (r2 :: RuntimeRep)
(a :: TYPE r1) (b :: TYPE r2).
......@@ -532,7 +532,7 @@ tYPE rr = TyConApp tYPETyCon [rr]
{-
************************************************************************
* *
\subsection[TysPrim-basic]{Basic primitive types (@Char#@, @Int#@, etc.)}
Basic primitive types (@Char#@, @Int#@, etc.)
* *
************************************************************************
-}
......@@ -665,7 +665,7 @@ doublePrimTyCon = pcPrimTyCon0 doublePrimTyConName DoubleRep
{-
************************************************************************
* *
\subsection[TysPrim-state]{The @State#@ type (and @_RealWorld@ types)}
The @State#@ type (and @_RealWorld@ types)
* *
************************************************************************
......@@ -711,7 +711,7 @@ All wanted constraints of this type are built with coercion holes.
Note [Deferred errors for coercion holes] in GHC.Tc.Errors to see how
equality constraints are deferred.
Within GHC, ~# is called eqPrimTyCon, and it is defined in TysPrim.
Within GHC, ~# is called eqPrimTyCon, and it is defined in GHC.Builtin.Types.Prim.
--------------------------
......@@ -745,7 +745,7 @@ equalities. There is some special-casing in GHC.Tc.Solver.Interact.matchClassIns
pretend that there is an instance of this class, as we can't write the instance
in Haskell.
Within GHC, ~~ is called heqTyCon, and it is defined in TysWiredIn.
Within GHC, ~~ is called heqTyCon, and it is defined in GHC.Builtin.Types.
--------------------------
......@@ -761,7 +761,7 @@ It is an almost-ordinary class defined as if by
* In addition (~) is magical syntax, as ~ is a reserved symbol.
It cannot be exported or imported.
Within GHC, ~ is called eqTyCon, and it is defined in TysWiredIn.
Within GHC, ~ is called eqTyCon, and it is defined in GHC.Builtin.Types.
Historical note: prior to July 18 (~) was defined as a
more-ordinary class with (~~) as a superclass. But that made it
......@@ -785,7 +785,7 @@ The is the representational analogue of ~#. This is the type of representational
equalities that the solver works on. All wanted constraints of this type are
built with coercion holes.
Within GHC, ~R# is called eqReprPrimTyCon, and it is defined in TysPrim.
Within GHC, ~R# is called eqReprPrimTyCon, and it is defined in GHC.Builtin.Types.Prim.
--------------------------
......@@ -803,7 +803,7 @@ split required that both types be fully wired-in. Instead of doing this,
I just got rid of HCoercible, as I'm not sure who would use it, anyway.
Within GHC, Coercible is called coercibleTyCon, and it is defined in
TysWiredIn.
GHC.Builtin.Types.
--------------------------
......@@ -865,7 +865,7 @@ realWorldStatePrimTy :: Type
realWorldStatePrimTy = mkStatePrimTy realWorldTy -- State# RealWorld
-- Note: the ``state-pairing'' types are not truly primitive,
-- so they are defined in \tr{TysWiredIn.hs}, not here.