From 0ed02091d86a0a46b87bef2e9be74c3263000799 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 4 Jul 2006 12:49:12 +0000 Subject: [PATCH] remove unused bits, mostly to do with the Addr type --- compiler/prelude/PrelNames.lhs | 27 ++------------------------- compiler/typecheck/TcType.lhs | 12 +++++------- 2 files changed, 7 insertions(+), 32 deletions(-) diff --git a/compiler/prelude/PrelNames.lhs b/compiler/prelude/PrelNames.lhs index 9fd1419..ae544b3 100644 --- a/compiler/prelude/PrelNames.lhs +++ b/compiler/prelude/PrelNames.lhs @@ -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} diff --git a/compiler/typecheck/TcType.lhs b/compiler/typecheck/TcType.lhs index a4d43dc..b60936d 100644 --- a/compiler/typecheck/TcType.lhs +++ b/compiler/typecheck/TcType.lhs @@ -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 -- 1.7.10.4