{-# LANGUAGE CPP #-}
module TysPrim(
mkPrimTyConName,
mkTemplateKindVars, mkTemplateTyVars, mkTemplateTyVarsFrom,
mkTemplateKiTyVars,
mkTemplateTyConBinders, mkTemplateKindTyConBinders,
mkTemplateAnonTyConBinders,
alphaTyVars, alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar,
alphaTys, alphaTy, betaTy, gammaTy, deltaTy,
alphaTyVarsUnliftedRep, alphaTyVarUnliftedRep,
alphaTysUnliftedRep, alphaTyUnliftedRep,
runtimeRep1TyVar, runtimeRep2TyVar, runtimeRep1Ty, runtimeRep2Ty,
openAlphaTy, openBetaTy, openAlphaTyVar, openBetaTyVar,
tYPETyCon, tYPETyConName,
tYPE, primRepToRuntimeRep,
funTyCon, funTyConName,
unexposedPrimTyCons, exposedPrimTyCons, primTyCons,
charPrimTyCon, charPrimTy, charPrimTyConName,
intPrimTyCon, intPrimTy, intPrimTyConName,
wordPrimTyCon, wordPrimTy, wordPrimTyConName,
addrPrimTyCon, addrPrimTy, addrPrimTyConName,
floatPrimTyCon, floatPrimTy, floatPrimTyConName,
doublePrimTyCon, doublePrimTy, doublePrimTyConName,
voidPrimTyCon, voidPrimTy,
statePrimTyCon, mkStatePrimTy,
realWorldTyCon, realWorldTy, realWorldStatePrimTy,
proxyPrimTyCon, mkProxyPrimTy,
arrayPrimTyCon, mkArrayPrimTy,
byteArrayPrimTyCon, byteArrayPrimTy,
arrayArrayPrimTyCon, mkArrayArrayPrimTy,
smallArrayPrimTyCon, mkSmallArrayPrimTy,
mutableArrayPrimTyCon, mkMutableArrayPrimTy,
mutableByteArrayPrimTyCon, mkMutableByteArrayPrimTy,
mutableArrayArrayPrimTyCon, mkMutableArrayArrayPrimTy,
smallMutableArrayPrimTyCon, mkSmallMutableArrayPrimTy,
mutVarPrimTyCon, mkMutVarPrimTy,
mVarPrimTyCon, mkMVarPrimTy,
tVarPrimTyCon, mkTVarPrimTy,
stablePtrPrimTyCon, mkStablePtrPrimTy,
stableNamePrimTyCon, mkStableNamePrimTy,
compactPrimTyCon, compactPrimTy,
bcoPrimTyCon, bcoPrimTy,
weakPrimTyCon, mkWeakPrimTy,
threadIdPrimTyCon, threadIdPrimTy,
int8PrimTyCon, int8PrimTy, int8PrimTyConName,
word8PrimTyCon, word8PrimTy, word8PrimTyConName,
int16PrimTyCon, int16PrimTy, int16PrimTyConName,
word16PrimTyCon, word16PrimTy, word16PrimTyConName,
int32PrimTyCon, int32PrimTy, int32PrimTyConName,
word32PrimTyCon, word32PrimTy, word32PrimTyConName,
int64PrimTyCon, int64PrimTy, int64PrimTyConName,
word64PrimTyCon, word64PrimTy, word64PrimTyConName,
eqPrimTyCon,
eqReprPrimTyCon,
eqPhantPrimTyCon,
#include "primop-vector-tys-exports.hs-incl"
) where
#include "HsVersions.h"
import GhcPrelude
import {-# SOURCE #-} TysWiredIn
( runtimeRepTy, unboxedTupleKind, liftedTypeKind
, vecRepDataConTyCon, tupleRepDataConTyCon
, liftedRepDataConTy, unliftedRepDataConTy, intRepDataConTy, int8RepDataConTy
, int16RepDataConTy, word16RepDataConTy
, wordRepDataConTy, int64RepDataConTy, word8RepDataConTy, word64RepDataConTy
, addrRepDataConTy
, floatRepDataConTy, doubleRepDataConTy
, vec2DataConTy, vec4DataConTy, vec8DataConTy, vec16DataConTy, vec32DataConTy
, vec64DataConTy
, int8ElemRepDataConTy, int16ElemRepDataConTy, int32ElemRepDataConTy
, int64ElemRepDataConTy, word8ElemRepDataConTy, word16ElemRepDataConTy
, word32ElemRepDataConTy, word64ElemRepDataConTy, floatElemRepDataConTy
, doubleElemRepDataConTy
, mkPromotedListTy )
import Var ( TyVar, VarBndr(Bndr), mkTyVar )
import Name
import TyCon
import SrcLoc
import Unique
import PrelNames
import FastString
import Outputable
import TyCoRep
import Data.Char
primTyCons :: [TyCon]
primTyCons :: [TyCon]
primTyCons = [TyCon]
unexposedPrimTyCons [TyCon] -> [TyCon] -> [TyCon]
forall a. [a] -> [a] -> [a]
++ [TyCon]
exposedPrimTyCons
unexposedPrimTyCons :: [TyCon]
unexposedPrimTyCons :: [TyCon]
unexposedPrimTyCons
= [ TyCon
eqPrimTyCon
, TyCon
eqReprPrimTyCon
, TyCon
eqPhantPrimTyCon
]
exposedPrimTyCons :: [TyCon]
exposedPrimTyCons :: [TyCon]
exposedPrimTyCons
= [ TyCon
addrPrimTyCon
, TyCon
arrayPrimTyCon
, TyCon
byteArrayPrimTyCon
, TyCon
arrayArrayPrimTyCon
, TyCon
smallArrayPrimTyCon
, TyCon
charPrimTyCon
, TyCon
doublePrimTyCon
, TyCon
floatPrimTyCon
, TyCon
intPrimTyCon
, TyCon
int8PrimTyCon
, TyCon
int16PrimTyCon
, TyCon
int32PrimTyCon
, TyCon
int64PrimTyCon
, TyCon
bcoPrimTyCon
, TyCon
weakPrimTyCon
, TyCon
mutableArrayPrimTyCon
, TyCon
mutableByteArrayPrimTyCon
, TyCon
mutableArrayArrayPrimTyCon
, TyCon
smallMutableArrayPrimTyCon
, TyCon
mVarPrimTyCon
, TyCon
tVarPrimTyCon
, TyCon
mutVarPrimTyCon
, TyCon
realWorldTyCon
, TyCon
stablePtrPrimTyCon
, TyCon
stableNamePrimTyCon
, TyCon
compactPrimTyCon
, TyCon
statePrimTyCon
, TyCon
voidPrimTyCon
, TyCon
proxyPrimTyCon
, TyCon
threadIdPrimTyCon
, TyCon
wordPrimTyCon
, TyCon
word8PrimTyCon
, TyCon
word16PrimTyCon
, TyCon
word32PrimTyCon
, TyCon
word64PrimTyCon
, TyCon
tYPETyCon
#include "primop-vector-tycons.hs-incl"
]
mkPrimTc :: FastString -> Unique -> TyCon -> Name
mkPrimTc :: FastString -> Unique -> TyCon -> Name
mkPrimTc fs :: FastString
fs unique :: Unique
unique tycon :: TyCon
tycon
= Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name
mkWiredInName Module
gHC_PRIM (FastString -> OccName
mkTcOccFS FastString
fs)
Unique
unique
(TyCon -> TyThing
ATyCon TyCon
tycon)
BuiltInSyntax
UserSyntax
mkBuiltInPrimTc :: FastString -> Unique -> TyCon -> Name
mkBuiltInPrimTc :: FastString -> Unique -> TyCon -> Name
mkBuiltInPrimTc fs :: FastString
fs unique :: Unique
unique tycon :: TyCon
tycon
= Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name
mkWiredInName Module
gHC_PRIM (FastString -> OccName
mkTcOccFS FastString
fs)
Unique
unique
(TyCon -> TyThing
ATyCon TyCon
tycon)
BuiltInSyntax
BuiltInSyntax
charPrimTyConName, intPrimTyConName, int8PrimTyConName, int16PrimTyConName, int32PrimTyConName, int64PrimTyConName, wordPrimTyConName, word32PrimTyConName, word8PrimTyConName, word16PrimTyConName, word64PrimTyConName, addrPrimTyConName, floatPrimTyConName, doublePrimTyConName, statePrimTyConName, proxyPrimTyConName, realWorldTyConName, arrayPrimTyConName, arrayArrayPrimTyConName, smallArrayPrimTyConName, byteArrayPrimTyConName, mutableArrayPrimTyConName, mutableByteArrayPrimTyConName, mutableArrayArrayPrimTyConName, smallMutableArrayPrimTyConName, mutVarPrimTyConName, mVarPrimTyConName, tVarPrimTyConName, stablePtrPrimTyConName, stableNamePrimTyConName, compactPrimTyConName, bcoPrimTyConName, weakPrimTyConName, threadIdPrimTyConName, eqPrimTyConName, eqReprPrimTyConName, eqPhantPrimTyConName, voidPrimTyConName :: Name
charPrimTyConName :: Name
charPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Char#") Unique
charPrimTyConKey TyCon
charPrimTyCon
intPrimTyConName :: Name
intPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Int#") Unique
intPrimTyConKey TyCon
intPrimTyCon
int8PrimTyConName :: Name
int8PrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Int8#") Unique
int8PrimTyConKey TyCon
int8PrimTyCon
int16PrimTyConName :: Name
int16PrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Int16#") Unique
int16PrimTyConKey TyCon
int16PrimTyCon
int32PrimTyConName :: Name
int32PrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Int32#") Unique
int32PrimTyConKey TyCon
int32PrimTyCon
int64PrimTyConName :: Name
int64PrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Int64#") Unique
int64PrimTyConKey TyCon
int64PrimTyCon
wordPrimTyConName :: Name
wordPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Word#") Unique
wordPrimTyConKey TyCon
wordPrimTyCon
word8PrimTyConName :: Name
word8PrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Word8#") Unique
word8PrimTyConKey TyCon
word8PrimTyCon
word16PrimTyConName :: Name
word16PrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Word16#") Unique
word16PrimTyConKey TyCon
word16PrimTyCon
word32PrimTyConName :: Name
word32PrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Word32#") Unique
word32PrimTyConKey TyCon
word32PrimTyCon
word64PrimTyConName :: Name
word64PrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Word64#") Unique
word64PrimTyConKey TyCon
word64PrimTyCon
addrPrimTyConName :: Name
addrPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Addr#") Unique
addrPrimTyConKey TyCon
addrPrimTyCon
floatPrimTyConName :: Name
floatPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Float#") Unique
floatPrimTyConKey TyCon
floatPrimTyCon
doublePrimTyConName :: Name
doublePrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Double#") Unique
doublePrimTyConKey TyCon
doublePrimTyCon
statePrimTyConName :: Name
statePrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "State#") Unique
statePrimTyConKey TyCon
statePrimTyCon
voidPrimTyConName :: Name
voidPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Void#") Unique
voidPrimTyConKey TyCon
voidPrimTyCon
proxyPrimTyConName :: Name
proxyPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Proxy#") Unique
proxyPrimTyConKey TyCon
proxyPrimTyCon
eqPrimTyConName :: Name
eqPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "~#") Unique
eqPrimTyConKey TyCon
eqPrimTyCon
eqReprPrimTyConName :: Name
eqReprPrimTyConName = FastString -> Unique -> TyCon -> Name
mkBuiltInPrimTc (String -> FastString
fsLit "~R#") Unique
eqReprPrimTyConKey TyCon
eqReprPrimTyCon
eqPhantPrimTyConName :: Name
eqPhantPrimTyConName = FastString -> Unique -> TyCon -> Name
mkBuiltInPrimTc (String -> FastString
fsLit "~P#") Unique
eqPhantPrimTyConKey TyCon
eqPhantPrimTyCon
realWorldTyConName :: Name
realWorldTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "RealWorld") Unique
realWorldTyConKey TyCon
realWorldTyCon
arrayPrimTyConName :: Name
arrayPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Array#") Unique
arrayPrimTyConKey TyCon
arrayPrimTyCon
byteArrayPrimTyConName :: Name
byteArrayPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "ByteArray#") Unique
byteArrayPrimTyConKey TyCon
byteArrayPrimTyCon
arrayArrayPrimTyConName :: Name
arrayArrayPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "ArrayArray#") Unique
arrayArrayPrimTyConKey TyCon
arrayArrayPrimTyCon
smallArrayPrimTyConName :: Name
smallArrayPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "SmallArray#") Unique
smallArrayPrimTyConKey TyCon
smallArrayPrimTyCon
mutableArrayPrimTyConName :: Name
mutableArrayPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "MutableArray#") Unique
mutableArrayPrimTyConKey TyCon
mutableArrayPrimTyCon
mutableByteArrayPrimTyConName :: Name
mutableByteArrayPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "MutableByteArray#") Unique
mutableByteArrayPrimTyConKey TyCon
mutableByteArrayPrimTyCon
mutableArrayArrayPrimTyConName :: Name
mutableArrayArrayPrimTyConName= FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "MutableArrayArray#") Unique
mutableArrayArrayPrimTyConKey TyCon
mutableArrayArrayPrimTyCon
smallMutableArrayPrimTyConName :: Name
smallMutableArrayPrimTyConName= FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "SmallMutableArray#") Unique
smallMutableArrayPrimTyConKey TyCon
smallMutableArrayPrimTyCon
mutVarPrimTyConName :: Name
mutVarPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "MutVar#") Unique
mutVarPrimTyConKey TyCon
mutVarPrimTyCon
mVarPrimTyConName :: Name
mVarPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "MVar#") Unique
mVarPrimTyConKey TyCon
mVarPrimTyCon
tVarPrimTyConName :: Name
tVarPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "TVar#") Unique
tVarPrimTyConKey TyCon
tVarPrimTyCon
stablePtrPrimTyConName :: Name
stablePtrPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "StablePtr#") Unique
stablePtrPrimTyConKey TyCon
stablePtrPrimTyCon
stableNamePrimTyConName :: Name
stableNamePrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "StableName#") Unique
stableNamePrimTyConKey TyCon
stableNamePrimTyCon
compactPrimTyConName :: Name
compactPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Compact#") Unique
compactPrimTyConKey TyCon
compactPrimTyCon
bcoPrimTyConName :: Name
bcoPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "BCO#") Unique
bcoPrimTyConKey TyCon
bcoPrimTyCon
weakPrimTyConName :: Name
weakPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "Weak#") Unique
weakPrimTyConKey TyCon
weakPrimTyCon
threadIdPrimTyConName :: Name
threadIdPrimTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTc (String -> FastString
fsLit "ThreadId#") Unique
threadIdPrimTyConKey TyCon
threadIdPrimTyCon
mkTemplateKindVars :: [Kind] -> [TyVar]
mkTemplateKindVars :: [Type] -> [TyVar]
mkTemplateKindVars [kind :: Type
kind]
= [Name -> Type -> TyVar
mkTyVar (Int -> String -> Name
mk_tv_name 0 "k") Type
kind]
mkTemplateKindVars kinds :: [Type]
kinds
= [ Name -> Type -> TyVar
mkTyVar (Int -> String -> Name
mk_tv_name Int
u ('k' Char -> String -> String
forall a. a -> [a] -> [a]
: Int -> String
forall a. Show a => a -> String
show Int
u)) Type
kind
| (kind :: Type
kind, u :: Int
u) <- [Type]
kinds [Type] -> [Int] -> [(Type, Int)]
forall a b. [a] -> [b] -> [(a, b)]
`zip` [0..] ]
mk_tv_name :: Int -> String -> Name
mk_tv_name :: Int -> String -> Name
mk_tv_name u :: Int
u s :: String
s = Unique -> OccName -> SrcSpan -> Name
mkInternalName (Int -> Unique
mkAlphaTyVarUnique Int
u)
(FastString -> OccName
mkTyVarOccFS (String -> FastString
mkFastString String
s))
SrcSpan
noSrcSpan
mkTemplateTyVarsFrom :: Int -> [Kind] -> [TyVar]
mkTemplateTyVarsFrom :: Int -> [Type] -> [TyVar]
mkTemplateTyVarsFrom n :: Int
n kinds :: [Type]
kinds
= [ Name -> Type -> TyVar
mkTyVar Name
name Type
kind
| (kind :: Type
kind, index :: Int
index) <- [Type] -> [Int] -> [(Type, Int)]
forall a b. [a] -> [b] -> [(a, b)]
zip [Type]
kinds [0..],
let ch_ord :: Int
ch_ord = Int
index Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Char -> Int
ord 'a'
name_str :: String
name_str | Int
ch_ord Int -> Int -> Bool
forall a. Ord a => a -> a -> Bool
<= Char -> Int
ord 'z' = [Int -> Char
chr Int
ch_ord]
| Bool
otherwise = 't'Char -> String -> String
forall a. a -> [a] -> [a]
:Int -> String
forall a. Show a => a -> String
show Int
index
name :: Name
name = Int -> String -> Name
mk_tv_name (Int
index Int -> Int -> Int
forall a. Num a => a -> a -> a
+ Int
n) String
name_str
]
mkTemplateTyVars :: [Kind] -> [TyVar]
mkTemplateTyVars :: [Type] -> [TyVar]
mkTemplateTyVars = Int -> [Type] -> [TyVar]
mkTemplateTyVarsFrom 1
mkTemplateTyConBinders
:: [Kind]
-> ([Kind] -> [Kind])
-> [TyConBinder]
mkTemplateTyConBinders :: [Type] -> ([Type] -> [Type]) -> [TyConBinder]
mkTemplateTyConBinders kind_var_kinds :: [Type]
kind_var_kinds mk_anon_arg_kinds :: [Type] -> [Type]
mk_anon_arg_kinds
= [TyConBinder]
kv_bndrs [TyConBinder] -> [TyConBinder] -> [TyConBinder]
forall a. [a] -> [a] -> [a]
++ [TyConBinder]
tv_bndrs
where
kv_bndrs :: [TyConBinder]
kv_bndrs = [Type] -> [TyConBinder]
mkTemplateKindTyConBinders [Type]
kind_var_kinds
anon_kinds :: [Type]
anon_kinds = [Type] -> [Type]
mk_anon_arg_kinds ([TyVar] -> [Type]
mkTyVarTys ([TyConBinder] -> [TyVar]
forall tv argf. [VarBndr tv argf] -> [tv]
binderVars [TyConBinder]
kv_bndrs))
tv_bndrs :: [TyConBinder]
tv_bndrs = Int -> [Type] -> [TyConBinder]
mkTemplateAnonTyConBindersFrom ([TyConBinder] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length [TyConBinder]
kv_bndrs) [Type]
anon_kinds
mkTemplateKiTyVars
:: [Kind]
-> ([Kind] -> [Kind])
-> [TyVar]
mkTemplateKiTyVars :: [Type] -> ([Type] -> [Type]) -> [TyVar]
mkTemplateKiTyVars kind_var_kinds :: [Type]
kind_var_kinds mk_arg_kinds :: [Type] -> [Type]
mk_arg_kinds
= [TyVar]
kv_bndrs [TyVar] -> [TyVar] -> [TyVar]
forall a. [a] -> [a] -> [a]
++ [TyVar]
tv_bndrs
where
kv_bndrs :: [TyVar]
kv_bndrs = [Type] -> [TyVar]
mkTemplateKindVars [Type]
kind_var_kinds
anon_kinds :: [Type]
anon_kinds = [Type] -> [Type]
mk_arg_kinds ([TyVar] -> [Type]
mkTyVarTys [TyVar]
kv_bndrs)
tv_bndrs :: [TyVar]
tv_bndrs = Int -> [Type] -> [TyVar]
mkTemplateTyVarsFrom ([TyVar] -> Int
forall (t :: * -> *) a. Foldable t => t a -> Int
length [TyVar]
kv_bndrs) [Type]
anon_kinds
mkTemplateKindTyConBinders :: [Kind] -> [TyConBinder]
mkTemplateKindTyConBinders :: [Type] -> [TyConBinder]
mkTemplateKindTyConBinders kinds :: [Type]
kinds = [ArgFlag -> TyVar -> TyConBinder
mkNamedTyConBinder ArgFlag
Specified TyVar
tv | TyVar
tv <- [Type] -> [TyVar]
mkTemplateKindVars [Type]
kinds]
mkTemplateAnonTyConBinders :: [Kind] -> [TyConBinder]
mkTemplateAnonTyConBinders :: [Type] -> [TyConBinder]
mkTemplateAnonTyConBinders kinds :: [Type]
kinds = (TyVar -> TyConBinder) -> [TyVar] -> [TyConBinder]
forall a b. (a -> b) -> [a] -> [b]
map TyVar -> TyConBinder
mkAnonTyConBinder ([Type] -> [TyVar]
mkTemplateTyVars [Type]
kinds)
mkTemplateAnonTyConBindersFrom :: Int -> [Kind] -> [TyConBinder]
mkTemplateAnonTyConBindersFrom :: Int -> [Type] -> [TyConBinder]
mkTemplateAnonTyConBindersFrom n :: Int
n kinds :: [Type]
kinds = (TyVar -> TyConBinder) -> [TyVar] -> [TyConBinder]
forall a b. (a -> b) -> [a] -> [b]
map TyVar -> TyConBinder
mkAnonTyConBinder (Int -> [Type] -> [TyVar]
mkTemplateTyVarsFrom Int
n [Type]
kinds)
alphaTyVars :: [TyVar]
alphaTyVars :: [TyVar]
alphaTyVars = [Type] -> [TyVar]
mkTemplateTyVars ([Type] -> [TyVar]) -> [Type] -> [TyVar]
forall a b. (a -> b) -> a -> b
$ Type -> [Type]
forall a. a -> [a]
repeat Type
liftedTypeKind
alphaTyVar, betaTyVar, gammaTyVar, deltaTyVar :: TyVar
(alphaTyVar :: TyVar
alphaTyVar:betaTyVar :: TyVar
betaTyVar:gammaTyVar :: TyVar
gammaTyVar:deltaTyVar :: TyVar
deltaTyVar:_) = [TyVar]
alphaTyVars
alphaTys :: [Type]
alphaTys :: [Type]
alphaTys = [TyVar] -> [Type]
mkTyVarTys [TyVar]
alphaTyVars
alphaTy, betaTy, gammaTy, deltaTy :: Type
(alphaTy :: Type
alphaTy:betaTy :: Type
betaTy:gammaTy :: Type
gammaTy:deltaTy :: Type
deltaTy:_) = [Type]
alphaTys
alphaTyVarsUnliftedRep :: [TyVar]
alphaTyVarsUnliftedRep :: [TyVar]
alphaTyVarsUnliftedRep = [Type] -> [TyVar]
mkTemplateTyVars ([Type] -> [TyVar]) -> [Type] -> [TyVar]
forall a b. (a -> b) -> a -> b
$ Type -> [Type]
forall a. a -> [a]
repeat (Type -> Type
tYPE Type
unliftedRepDataConTy)
alphaTyVarUnliftedRep :: TyVar
(alphaTyVarUnliftedRep :: TyVar
alphaTyVarUnliftedRep:_) = [TyVar]
alphaTyVarsUnliftedRep
alphaTysUnliftedRep :: [Type]
alphaTysUnliftedRep :: [Type]
alphaTysUnliftedRep = [TyVar] -> [Type]
mkTyVarTys [TyVar]
alphaTyVarsUnliftedRep
alphaTyUnliftedRep :: Type
(alphaTyUnliftedRep :: Type
alphaTyUnliftedRep:_) = [Type]
alphaTysUnliftedRep
runtimeRep1TyVar, runtimeRep2TyVar :: TyVar
(runtimeRep1TyVar :: TyVar
runtimeRep1TyVar : runtimeRep2TyVar :: TyVar
runtimeRep2TyVar : _)
= Int -> [TyVar] -> [TyVar]
forall a. Int -> [a] -> [a]
drop 16 ([Type] -> [TyVar]
mkTemplateTyVars (Type -> [Type]
forall a. a -> [a]
repeat Type
runtimeRepTy))
runtimeRep1Ty, runtimeRep2Ty :: Type
runtimeRep1Ty :: Type
runtimeRep1Ty = TyVar -> Type
mkTyVarTy TyVar
runtimeRep1TyVar
runtimeRep2Ty :: Type
runtimeRep2Ty = TyVar -> Type
mkTyVarTy TyVar
runtimeRep2TyVar
openAlphaTyVar, openBetaTyVar :: TyVar
[openAlphaTyVar :: TyVar
openAlphaTyVar,openBetaTyVar :: TyVar
openBetaTyVar]
= [Type] -> [TyVar]
mkTemplateTyVars [Type -> Type
tYPE Type
runtimeRep1Ty, Type -> Type
tYPE Type
runtimeRep2Ty]
openAlphaTy, openBetaTy :: Type
openAlphaTy :: Type
openAlphaTy = TyVar -> Type
mkTyVarTy TyVar
openAlphaTyVar
openBetaTy :: Type
openBetaTy = TyVar -> Type
mkTyVarTy TyVar
openBetaTyVar
funTyConName :: Name
funTyConName :: Name
funTyConName = FastString -> Unique -> TyCon -> Name
mkPrimTyConName (String -> FastString
fsLit "->") Unique
funTyConKey TyCon
funTyCon
funTyCon :: TyCon
funTyCon :: TyCon
funTyCon = Name -> [TyConBinder] -> Name -> TyCon
mkFunTyCon Name
funTyConName [TyConBinder]
tc_bndrs Name
tc_rep_nm
where
tc_bndrs :: [TyConBinder]
tc_bndrs = [ TyVar -> TyConBndrVis -> TyConBinder
forall var argf. var -> argf -> VarBndr var argf
Bndr TyVar
runtimeRep1TyVar (ArgFlag -> TyConBndrVis
NamedTCB ArgFlag
Inferred)
, TyVar -> TyConBndrVis -> TyConBinder
forall var argf. var -> argf -> VarBndr var argf
Bndr TyVar
runtimeRep2TyVar (ArgFlag -> TyConBndrVis
NamedTCB ArgFlag
Inferred)
]
[TyConBinder] -> [TyConBinder] -> [TyConBinder]
forall a. [a] -> [a] -> [a]
++ [Type] -> [TyConBinder]
mkTemplateAnonTyConBinders [ Type -> Type
tYPE Type
runtimeRep1Ty
, Type -> Type
tYPE Type
runtimeRep2Ty
]
tc_rep_nm :: Name
tc_rep_nm = Name -> Name
mkPrelTyConRepName Name
funTyConName
tYPETyCon :: TyCon
tYPETyConName :: Name
tYPETyCon :: TyCon
tYPETyCon = Name -> [TyConBinder] -> Type -> [Role] -> Name -> TyCon
mkKindTyCon Name
tYPETyConName
([Type] -> [TyConBinder]
mkTemplateAnonTyConBinders [Type
runtimeRepTy])
Type
liftedTypeKind
[Role
Nominal]
(Name -> Name
mkPrelTyConRepName Name
tYPETyConName)
tYPETyConName :: Name
tYPETyConName = FastString -> Unique -> TyCon -> Name
mkPrimTyConName (String -> FastString
fsLit "TYPE") Unique
tYPETyConKey TyCon
tYPETyCon
mkPrimTyConName :: FastString -> Unique -> TyCon -> Name
mkPrimTyConName :: FastString -> Unique -> TyCon -> Name
mkPrimTyConName = BuiltInSyntax -> FastString -> Unique -> TyCon -> Name
mkPrimTcName BuiltInSyntax
BuiltInSyntax
mkPrimTcName :: BuiltInSyntax -> FastString -> Unique -> TyCon -> Name
mkPrimTcName :: BuiltInSyntax -> FastString -> Unique -> TyCon -> Name
mkPrimTcName built_in_syntax :: BuiltInSyntax
built_in_syntax occ :: FastString
occ key :: Unique
key tycon :: TyCon
tycon
= Module -> OccName -> Unique -> TyThing -> BuiltInSyntax -> Name
mkWiredInName Module
gHC_PRIM (FastString -> OccName
mkTcOccFS FastString
occ) Unique
key (TyCon -> TyThing
ATyCon TyCon
tycon) BuiltInSyntax
built_in_syntax
tYPE :: Type -> Type
tYPE :: Type -> Type
tYPE rr :: Type
rr = TyCon -> [Type] -> Type
TyConApp TyCon
tYPETyCon [Type
rr]
pcPrimTyCon :: Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon :: Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon name :: Name
name roles :: [Role]
roles rep :: PrimRep
rep
= Name -> [TyConBinder] -> Type -> [Role] -> TyCon
mkPrimTyCon Name
name [TyConBinder]
binders Type
result_kind [Role]
roles
where
binders :: [TyConBinder]
binders = [Type] -> [TyConBinder]
mkTemplateAnonTyConBinders ((Role -> Type) -> [Role] -> [Type]
forall a b. (a -> b) -> [a] -> [b]
map (Type -> Role -> Type
forall a b. a -> b -> a
const Type
liftedTypeKind) [Role]
roles)
result_kind :: Type
result_kind = Type -> Type
tYPE (PrimRep -> Type
primRepToRuntimeRep PrimRep
rep)
primRepToRuntimeRep :: PrimRep -> Type
primRepToRuntimeRep :: PrimRep -> Type
primRepToRuntimeRep rep :: PrimRep
rep = case PrimRep
rep of
VoidRep -> TyCon -> [Type] -> Type
TyConApp TyCon
tupleRepDataConTyCon [Type -> [Type] -> Type
mkPromotedListTy Type
runtimeRepTy []]
LiftedRep -> Type
liftedRepDataConTy
UnliftedRep -> Type
unliftedRepDataConTy
IntRep -> Type
intRepDataConTy
Int8Rep -> Type
int8RepDataConTy
Int16Rep -> Type
int16RepDataConTy
WordRep -> Type
wordRepDataConTy
Int64Rep -> Type
int64RepDataConTy
Word8Rep -> Type
word8RepDataConTy
Word16Rep -> Type
word16RepDataConTy
Word64Rep -> Type
word64RepDataConTy
AddrRep -> Type
addrRepDataConTy
FloatRep -> Type
floatRepDataConTy
DoubleRep -> Type
doubleRepDataConTy
VecRep n :: Int
n elem :: PrimElemRep
elem -> TyCon -> [Type] -> Type
TyConApp TyCon
vecRepDataConTyCon [Type
n', Type
elem']
where
n' :: Type
n' = case Int
n of
2 -> Type
vec2DataConTy
4 -> Type
vec4DataConTy
8 -> Type
vec8DataConTy
16 -> Type
vec16DataConTy
32 -> Type
vec32DataConTy
64 -> Type
vec64DataConTy
_ -> String -> SDoc -> Type
forall a. HasCallStack => String -> SDoc -> a
pprPanic "Disallowed VecCount" (Int -> SDoc
forall a. Outputable a => a -> SDoc
ppr Int
n)
elem' :: Type
elem' = case PrimElemRep
elem of
Int8ElemRep -> Type
int8ElemRepDataConTy
Int16ElemRep -> Type
int16ElemRepDataConTy
Int32ElemRep -> Type
int32ElemRepDataConTy
Int64ElemRep -> Type
int64ElemRepDataConTy
Word8ElemRep -> Type
word8ElemRepDataConTy
Word16ElemRep -> Type
word16ElemRepDataConTy
Word32ElemRep -> Type
word32ElemRepDataConTy
Word64ElemRep -> Type
word64ElemRepDataConTy
FloatElemRep -> Type
floatElemRepDataConTy
DoubleElemRep -> Type
doubleElemRepDataConTy
pcPrimTyCon0 :: Name -> PrimRep -> TyCon
pcPrimTyCon0 :: Name -> PrimRep -> TyCon
pcPrimTyCon0 name :: Name
name rep :: PrimRep
rep
= Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
name [] PrimRep
rep
charPrimTy :: Type
charPrimTy :: Type
charPrimTy = TyCon -> Type
mkTyConTy TyCon
charPrimTyCon
charPrimTyCon :: TyCon
charPrimTyCon :: TyCon
charPrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
charPrimTyConName PrimRep
WordRep
intPrimTy :: Type
intPrimTy :: Type
intPrimTy = TyCon -> Type
mkTyConTy TyCon
intPrimTyCon
intPrimTyCon :: TyCon
intPrimTyCon :: TyCon
intPrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
intPrimTyConName PrimRep
IntRep
int8PrimTy :: Type
int8PrimTy :: Type
int8PrimTy = TyCon -> Type
mkTyConTy TyCon
int8PrimTyCon
int8PrimTyCon :: TyCon
int8PrimTyCon :: TyCon
int8PrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
int8PrimTyConName PrimRep
Int8Rep
int16PrimTy :: Type
int16PrimTy :: Type
int16PrimTy = TyCon -> Type
mkTyConTy TyCon
int16PrimTyCon
int16PrimTyCon :: TyCon
int16PrimTyCon :: TyCon
int16PrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
int16PrimTyConName PrimRep
Int16Rep
int32PrimTy :: Type
int32PrimTy :: Type
int32PrimTy = TyCon -> Type
mkTyConTy TyCon
int32PrimTyCon
int32PrimTyCon :: TyCon
int32PrimTyCon :: TyCon
int32PrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
int32PrimTyConName PrimRep
IntRep
int64PrimTy :: Type
int64PrimTy :: Type
int64PrimTy = TyCon -> Type
mkTyConTy TyCon
int64PrimTyCon
int64PrimTyCon :: TyCon
int64PrimTyCon :: TyCon
int64PrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
int64PrimTyConName PrimRep
Int64Rep
wordPrimTy :: Type
wordPrimTy :: Type
wordPrimTy = TyCon -> Type
mkTyConTy TyCon
wordPrimTyCon
wordPrimTyCon :: TyCon
wordPrimTyCon :: TyCon
wordPrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
wordPrimTyConName PrimRep
WordRep
word8PrimTy :: Type
word8PrimTy :: Type
word8PrimTy = TyCon -> Type
mkTyConTy TyCon
word8PrimTyCon
word8PrimTyCon :: TyCon
word8PrimTyCon :: TyCon
word8PrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
word8PrimTyConName PrimRep
Word8Rep
word16PrimTy :: Type
word16PrimTy :: Type
word16PrimTy = TyCon -> Type
mkTyConTy TyCon
word16PrimTyCon
word16PrimTyCon :: TyCon
word16PrimTyCon :: TyCon
word16PrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
word16PrimTyConName PrimRep
Word16Rep
word32PrimTy :: Type
word32PrimTy :: Type
word32PrimTy = TyCon -> Type
mkTyConTy TyCon
word32PrimTyCon
word32PrimTyCon :: TyCon
word32PrimTyCon :: TyCon
word32PrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
word32PrimTyConName PrimRep
WordRep
word64PrimTy :: Type
word64PrimTy :: Type
word64PrimTy = TyCon -> Type
mkTyConTy TyCon
word64PrimTyCon
word64PrimTyCon :: TyCon
word64PrimTyCon :: TyCon
word64PrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
word64PrimTyConName PrimRep
Word64Rep
addrPrimTy :: Type
addrPrimTy :: Type
addrPrimTy = TyCon -> Type
mkTyConTy TyCon
addrPrimTyCon
addrPrimTyCon :: TyCon
addrPrimTyCon :: TyCon
addrPrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
addrPrimTyConName PrimRep
AddrRep
floatPrimTy :: Type
floatPrimTy :: Type
floatPrimTy = TyCon -> Type
mkTyConTy TyCon
floatPrimTyCon
floatPrimTyCon :: TyCon
floatPrimTyCon :: TyCon
floatPrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
floatPrimTyConName PrimRep
FloatRep
doublePrimTy :: Type
doublePrimTy :: Type
doublePrimTy = TyCon -> Type
mkTyConTy TyCon
doublePrimTyCon
doublePrimTyCon :: TyCon
doublePrimTyCon :: TyCon
doublePrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
doublePrimTyConName PrimRep
DoubleRep
mkStatePrimTy :: Type -> Type
mkStatePrimTy :: Type -> Type
mkStatePrimTy ty :: Type
ty = TyCon -> [Type] -> Type
TyConApp TyCon
statePrimTyCon [Type
ty]
statePrimTyCon :: TyCon
statePrimTyCon :: TyCon
statePrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
statePrimTyConName [Role
Nominal] PrimRep
VoidRep
realWorldTyCon :: TyCon
realWorldTyCon :: TyCon
realWorldTyCon = Name -> [TyConBinder] -> Type -> [Role] -> TyCon
mkLiftedPrimTyCon Name
realWorldTyConName [] Type
liftedTypeKind []
realWorldTy :: Type
realWorldTy :: Type
realWorldTy = TyCon -> Type
mkTyConTy TyCon
realWorldTyCon
realWorldStatePrimTy :: Type
realWorldStatePrimTy :: Type
realWorldStatePrimTy = Type -> Type
mkStatePrimTy Type
realWorldTy
voidPrimTy :: Type
voidPrimTy :: Type
voidPrimTy = TyCon -> [Type] -> Type
TyConApp TyCon
voidPrimTyCon []
voidPrimTyCon :: TyCon
voidPrimTyCon :: TyCon
voidPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
voidPrimTyConName [] PrimRep
VoidRep
mkProxyPrimTy :: Type -> Type -> Type
mkProxyPrimTy :: Type -> Type -> Type
mkProxyPrimTy k :: Type
k ty :: Type
ty = TyCon -> [Type] -> Type
TyConApp TyCon
proxyPrimTyCon [Type
k, Type
ty]
proxyPrimTyCon :: TyCon
proxyPrimTyCon :: TyCon
proxyPrimTyCon = Name -> [TyConBinder] -> Type -> [Role] -> TyCon
mkPrimTyCon Name
proxyPrimTyConName [TyConBinder]
binders Type
res_kind [Role
Nominal,Role
Nominal]
where
binders :: [TyConBinder]
binders = [Type] -> ([Type] -> [Type]) -> [TyConBinder]
mkTemplateTyConBinders [Type
liftedTypeKind] [Type] -> [Type]
forall a. a -> a
id
res_kind :: Type
res_kind = [Type] -> Type
unboxedTupleKind []
eqPrimTyCon :: TyCon
eqPrimTyCon :: TyCon
eqPrimTyCon = Name -> [TyConBinder] -> Type -> [Role] -> TyCon
mkPrimTyCon Name
eqPrimTyConName [TyConBinder]
binders Type
res_kind [Role]
roles
where
binders :: [TyConBinder]
binders = [Type] -> ([Type] -> [Type]) -> [TyConBinder]
mkTemplateTyConBinders [Type
liftedTypeKind, Type
liftedTypeKind] [Type] -> [Type]
forall a. a -> a
id
res_kind :: Type
res_kind = [Type] -> Type
unboxedTupleKind []
roles :: [Role]
roles = [Role
Nominal, Role
Nominal, Role
Nominal, Role
Nominal]
eqReprPrimTyCon :: TyCon
eqReprPrimTyCon :: TyCon
eqReprPrimTyCon = Name -> [TyConBinder] -> Type -> [Role] -> TyCon
mkPrimTyCon Name
eqReprPrimTyConName [TyConBinder]
binders Type
res_kind [Role]
roles
where
binders :: [TyConBinder]
binders = [Type] -> ([Type] -> [Type]) -> [TyConBinder]
mkTemplateTyConBinders [Type
liftedTypeKind, Type
liftedTypeKind] [Type] -> [Type]
forall a. a -> a
id
res_kind :: Type
res_kind = [Type] -> Type
unboxedTupleKind []
roles :: [Role]
roles = [Role
Nominal, Role
Nominal, Role
Representational, Role
Representational]
eqPhantPrimTyCon :: TyCon
eqPhantPrimTyCon :: TyCon
eqPhantPrimTyCon = Name -> [TyConBinder] -> Type -> [Role] -> TyCon
mkPrimTyCon Name
eqPhantPrimTyConName [TyConBinder]
binders Type
res_kind [Role]
roles
where
binders :: [TyConBinder]
binders = [Type] -> ([Type] -> [Type]) -> [TyConBinder]
mkTemplateTyConBinders [Type
liftedTypeKind, Type
liftedTypeKind] [Type] -> [Type]
forall a. a -> a
id
res_kind :: Type
res_kind = [Type] -> Type
unboxedTupleKind []
roles :: [Role]
roles = [Role
Nominal, Role
Nominal, Role
Phantom, Role
Phantom]
arrayPrimTyCon, mutableArrayPrimTyCon, mutableByteArrayPrimTyCon,
byteArrayPrimTyCon, arrayArrayPrimTyCon, mutableArrayArrayPrimTyCon,
smallArrayPrimTyCon, smallMutableArrayPrimTyCon :: TyCon
arrayPrimTyCon :: TyCon
arrayPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
arrayPrimTyConName [Role
Representational] PrimRep
UnliftedRep
mutableArrayPrimTyCon :: TyCon
mutableArrayPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
mutableArrayPrimTyConName [Role
Nominal, Role
Representational] PrimRep
UnliftedRep
mutableByteArrayPrimTyCon :: TyCon
mutableByteArrayPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
mutableByteArrayPrimTyConName [Role
Nominal] PrimRep
UnliftedRep
byteArrayPrimTyCon :: TyCon
byteArrayPrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
byteArrayPrimTyConName PrimRep
UnliftedRep
arrayArrayPrimTyCon :: TyCon
arrayArrayPrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
arrayArrayPrimTyConName PrimRep
UnliftedRep
mutableArrayArrayPrimTyCon :: TyCon
mutableArrayArrayPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
mutableArrayArrayPrimTyConName [Role
Nominal] PrimRep
UnliftedRep
smallArrayPrimTyCon :: TyCon
smallArrayPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
smallArrayPrimTyConName [Role
Representational] PrimRep
UnliftedRep
smallMutableArrayPrimTyCon :: TyCon
smallMutableArrayPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
smallMutableArrayPrimTyConName [Role
Nominal, Role
Representational] PrimRep
UnliftedRep
mkArrayPrimTy :: Type -> Type
mkArrayPrimTy :: Type -> Type
mkArrayPrimTy elt :: Type
elt = TyCon -> [Type] -> Type
TyConApp TyCon
arrayPrimTyCon [Type
elt]
byteArrayPrimTy :: Type
byteArrayPrimTy :: Type
byteArrayPrimTy = TyCon -> Type
mkTyConTy TyCon
byteArrayPrimTyCon
mkArrayArrayPrimTy :: Type
mkArrayArrayPrimTy :: Type
mkArrayArrayPrimTy = TyCon -> Type
mkTyConTy TyCon
arrayArrayPrimTyCon
mkSmallArrayPrimTy :: Type -> Type
mkSmallArrayPrimTy :: Type -> Type
mkSmallArrayPrimTy elt :: Type
elt = TyCon -> [Type] -> Type
TyConApp TyCon
smallArrayPrimTyCon [Type
elt]
mkMutableArrayPrimTy :: Type -> Type -> Type
mkMutableArrayPrimTy :: Type -> Type -> Type
mkMutableArrayPrimTy s :: Type
s elt :: Type
elt = TyCon -> [Type] -> Type
TyConApp TyCon
mutableArrayPrimTyCon [Type
s, Type
elt]
mkMutableByteArrayPrimTy :: Type -> Type
mkMutableByteArrayPrimTy :: Type -> Type
mkMutableByteArrayPrimTy s :: Type
s = TyCon -> [Type] -> Type
TyConApp TyCon
mutableByteArrayPrimTyCon [Type
s]
mkMutableArrayArrayPrimTy :: Type -> Type
mkMutableArrayArrayPrimTy :: Type -> Type
mkMutableArrayArrayPrimTy s :: Type
s = TyCon -> [Type] -> Type
TyConApp TyCon
mutableArrayArrayPrimTyCon [Type
s]
mkSmallMutableArrayPrimTy :: Type -> Type -> Type
mkSmallMutableArrayPrimTy :: Type -> Type -> Type
mkSmallMutableArrayPrimTy s :: Type
s elt :: Type
elt = TyCon -> [Type] -> Type
TyConApp TyCon
smallMutableArrayPrimTyCon [Type
s, Type
elt]
mutVarPrimTyCon :: TyCon
mutVarPrimTyCon :: TyCon
mutVarPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
mutVarPrimTyConName [Role
Nominal, Role
Representational] PrimRep
UnliftedRep
mkMutVarPrimTy :: Type -> Type -> Type
mkMutVarPrimTy :: Type -> Type -> Type
mkMutVarPrimTy s :: Type
s elt :: Type
elt = TyCon -> [Type] -> Type
TyConApp TyCon
mutVarPrimTyCon [Type
s, Type
elt]
mVarPrimTyCon :: TyCon
mVarPrimTyCon :: TyCon
mVarPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
mVarPrimTyConName [Role
Nominal, Role
Representational] PrimRep
UnliftedRep
mkMVarPrimTy :: Type -> Type -> Type
mkMVarPrimTy :: Type -> Type -> Type
mkMVarPrimTy s :: Type
s elt :: Type
elt = TyCon -> [Type] -> Type
TyConApp TyCon
mVarPrimTyCon [Type
s, Type
elt]
tVarPrimTyCon :: TyCon
tVarPrimTyCon :: TyCon
tVarPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
tVarPrimTyConName [Role
Nominal, Role
Representational] PrimRep
UnliftedRep
mkTVarPrimTy :: Type -> Type -> Type
mkTVarPrimTy :: Type -> Type -> Type
mkTVarPrimTy s :: Type
s elt :: Type
elt = TyCon -> [Type] -> Type
TyConApp TyCon
tVarPrimTyCon [Type
s, Type
elt]
stablePtrPrimTyCon :: TyCon
stablePtrPrimTyCon :: TyCon
stablePtrPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
stablePtrPrimTyConName [Role
Representational] PrimRep
AddrRep
mkStablePtrPrimTy :: Type -> Type
mkStablePtrPrimTy :: Type -> Type
mkStablePtrPrimTy ty :: Type
ty = TyCon -> [Type] -> Type
TyConApp TyCon
stablePtrPrimTyCon [Type
ty]
stableNamePrimTyCon :: TyCon
stableNamePrimTyCon :: TyCon
stableNamePrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
stableNamePrimTyConName [Role
Phantom] PrimRep
UnliftedRep
mkStableNamePrimTy :: Type -> Type
mkStableNamePrimTy :: Type -> Type
mkStableNamePrimTy ty :: Type
ty = TyCon -> [Type] -> Type
TyConApp TyCon
stableNamePrimTyCon [Type
ty]
compactPrimTyCon :: TyCon
compactPrimTyCon :: TyCon
compactPrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
compactPrimTyConName PrimRep
UnliftedRep
compactPrimTy :: Type
compactPrimTy :: Type
compactPrimTy = TyCon -> Type
mkTyConTy TyCon
compactPrimTyCon
bcoPrimTy :: Type
bcoPrimTy :: Type
bcoPrimTy = TyCon -> Type
mkTyConTy TyCon
bcoPrimTyCon
bcoPrimTyCon :: TyCon
bcoPrimTyCon :: TyCon
bcoPrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
bcoPrimTyConName PrimRep
UnliftedRep
weakPrimTyCon :: TyCon
weakPrimTyCon :: TyCon
weakPrimTyCon = Name -> [Role] -> PrimRep -> TyCon
pcPrimTyCon Name
weakPrimTyConName [Role
Representational] PrimRep
UnliftedRep
mkWeakPrimTy :: Type -> Type
mkWeakPrimTy :: Type -> Type
mkWeakPrimTy v :: Type
v = TyCon -> [Type] -> Type
TyConApp TyCon
weakPrimTyCon [Type
v]
threadIdPrimTy :: Type
threadIdPrimTy :: Type
threadIdPrimTy = TyCon -> Type
mkTyConTy TyCon
threadIdPrimTyCon
threadIdPrimTyCon :: TyCon
threadIdPrimTyCon :: TyCon
threadIdPrimTyCon = Name -> PrimRep -> TyCon
pcPrimTyCon0 Name
threadIdPrimTyConName PrimRep
UnliftedRep
#include "primop-vector-tys.hs-incl"