Commit 0ed02091 authored by Simon Marlow's avatar Simon Marlow
Browse files

remove unused bits, mostly to do with the Addr type

parent a73d6d95
......@@ -177,7 +177,7 @@ basicKnownKeyNames
toPName, bpermutePName, bpermuteDftPName, indexOfPName,
-- FFI primitive types that are not wired-in.
stablePtrTyConName, ptrTyConName, funPtrTyConName, addrTyConName,
stablePtrTyConName, ptrTyConName, funPtrTyConName,
int8TyConName, int16TyConName, int32TyConName, int64TyConName,
wordTyConName, word8TyConName, word16TyConName, word32TyConName, word64TyConName,
......@@ -260,7 +260,6 @@ pREL_WORD = mkModule "GHC.Word"
mONAD = mkModule "Control.Monad"
mONAD_FIX = mkModule "Control.Monad.Fix"
aRROW = mkModule "Control.Arrow"
aDDR = mkModule "Addr"
rANDOM = mkModule "System.Random"
gLA_EXTS = mkModule "GHC.Exts"
......@@ -349,7 +348,6 @@ unpackCStringFoldr_RDR = nameRdrName unpackCStringFoldrName
unpackCStringUtf8_RDR = nameRdrName unpackCStringUtf8Name
newStablePtr_RDR = nameRdrName newStablePtrName
addrDataCon_RDR = dataQual_RDR aDDR FSLIT("A#")
wordDataCon_RDR = dataQual_RDR pREL_WORD FSLIT("W#")
bindIO_RDR = nameRdrName bindIOName
......@@ -604,9 +602,6 @@ word64TyConName = tcQual pREL_WORD FSLIT("Word64") word64TyConKey
wordTyConName = tcQual pREL_WORD FSLIT("Word") wordTyConKey
wordDataConName = conName wordTyConName FSLIT("W#") wordDataConKey
-- Addr module
addrTyConName = tcQual aDDR FSLIT("Addr") addrTyConKey
-- PrelPtr module
ptrTyConName = tcQual pREL_PTR FSLIT("Ptr") ptrTyConKey
funPtrTyConName = tcQual pREL_PTR FSLIT("FunPtr") funPtrTyConKey
......@@ -729,7 +724,6 @@ randomGenClassKey = mkPreludeClassUnique 32
\begin{code}
addrPrimTyConKey = mkPreludeTyConUnique 1
addrTyConKey = mkPreludeTyConUnique 2
arrayPrimTyConKey = mkPreludeTyConUnique 3
boolTyConKey = mkPreludeTyConUnique 4
byteArrayPrimTyConKey = mkPreludeTyConUnique 5
......@@ -989,29 +983,12 @@ loopAIdKey = mkPreludeMiscIdUnique 124
\begin{code}
numericTyKeys =
[ addrTyConKey
, wordTyConKey
[ wordTyConKey
, intTyConKey
, integerTyConKey
, doubleTyConKey
, floatTyConKey
]
-- Renamer always imports these data decls replete with constructors
-- so that desugarer can always see their constructors. Ugh!
cCallishTyKeys =
[ addrTyConKey
, wordTyConKey
, stablePtrTyConKey
, int8TyConKey
, int16TyConKey
, int32TyConKey
, int64TyConKey
, word8TyConKey
, word16TyConKey
, word32TyConKey
, word64TyConKey
]
\end{code}
......
......@@ -52,7 +52,7 @@ module TcType (
tcEqType, tcEqTypes, tcEqPred, tcCmpType, tcCmpTypes, tcCmpPred, tcEqTypeX,
isSigmaTy, isOverloadedTy, isRigidTy, isBoxyTy,
isDoubleTy, isFloatTy, isIntTy, isStringTy,
isIntegerTy, isAddrTy, isBoolTy, isUnitTy,
isIntegerTy, isBoolTy, isUnitTy,
isTauTy, isTauTyCon, tcIsTyVarTy, tcIsForAllTy,
---------------------------------
......@@ -899,7 +899,6 @@ isFloatTy = is_tc floatTyConKey
isDoubleTy = is_tc doubleTyConKey
isIntegerTy = is_tc integerTyConKey
isIntTy = is_tc intTyConKey
isAddrTy = is_tc addrTyConKey
isBoolTy = is_tc boolTyConKey
isUnitTy = is_tc unitTyConKey
......@@ -1070,17 +1069,17 @@ isFFIExportResultTy ty = checkRepTyCon legalFEResultTyCon ty
isFFIDynArgumentTy :: Type -> Bool
-- The argument type of a foreign import dynamic must be Ptr, FunPtr, Addr,
-- or a newtype of either.
isFFIDynArgumentTy = checkRepTyConKey [ptrTyConKey, funPtrTyConKey, addrTyConKey]
isFFIDynArgumentTy = checkRepTyConKey [ptrTyConKey, funPtrTyConKey]
isFFIDynResultTy :: Type -> Bool
-- The result type of a foreign export dynamic must be Ptr, FunPtr, Addr,
-- or a newtype of either.
isFFIDynResultTy = checkRepTyConKey [ptrTyConKey, funPtrTyConKey, addrTyConKey]
isFFIDynResultTy = checkRepTyConKey [ptrTyConKey, funPtrTyConKey]
isFFILabelTy :: Type -> Bool
-- The type of a foreign label must be Ptr, FunPtr, Addr,
-- or a newtype of either.
isFFILabelTy = checkRepTyConKey [ptrTyConKey, funPtrTyConKey, addrTyConKey]
isFFILabelTy = checkRepTyConKey [ptrTyConKey, funPtrTyConKey]
isFFIDotnetTy :: DynFlags -> Type -> Bool
isFFIDotnetTy dflags ty
......@@ -1131,7 +1130,6 @@ toDNType ty
, (word64TyConKey, DNWord64)
, (floatTyConKey, DNFloat)
, (doubleTyConKey, DNDouble)
, (addrTyConKey, DNPtr)
, (ptrTyConKey, DNPtr)
, (funPtrTyConKey, DNPtr)
, (charTyConKey, DNChar)
......@@ -1195,7 +1193,7 @@ boxedMarshalableTyCon tc
, wordTyConKey, word8TyConKey, word16TyConKey
, word32TyConKey, word64TyConKey
, floatTyConKey, doubleTyConKey
, addrTyConKey, ptrTyConKey, funPtrTyConKey
, ptrTyConKey, funPtrTyConKey
, charTyConKey
, stablePtrTyConKey
, boolTyConKey
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment