integerTy,
integerTyCon,
- integerDataCon,
+ smallIntegerDataCon,
+ largeIntegerDataCon,
isIntegerTy,
listTyCon,
unboxedTupleTyCon, unboxedTupleCon,
unboxedPairTyCon, unboxedPairDataCon,
- stateDataCon,
- stateTyCon,
- realWorldStateTy,
-
stablePtrTyCon,
stringTy,
trueDataCon,
-- others:
import Constants ( mAX_TUPLE_SIZE )
-import Name ( Module, varOcc, mkWiredInTyConName, mkWiredInIdName )
+import Name ( Module, mkWiredInTyConName, mkWiredInIdName, mkSrcOccFS, dataName )
import DataCon ( DataCon, mkDataCon )
import Var ( TyVar, tyVarKind )
import TyCon ( TyCon, mkAlgTyCon, mkSynTyCon, mkTupleTyCon )
[ NotMarkedStrict | a <- arg_tys ]
[ {- no labelled fields -} ]
tyvars context [] [] arg_tys tycon id
- name = mkWiredInIdName key mod (varOcc str) id
+ name = mkWiredInIdName key mod (mkSrcOccFS dataName str) id
id = mkDataConId data_con
\end{code}
\end{code}
\begin{code}
-mkStateTy ty = mkTyConApp stateTyCon [ty]
-realWorldStateTy = mkStateTy realWorldTy -- a common use
-
-stateTyCon = pcNonRecDataTyCon stateTyConKey pREL_ST SLIT("State") alpha_tyvar [stateDataCon]
-stateDataCon
- = pcDataCon stateDataConKey pREL_ST SLIT("S#")
- alpha_tyvar [] [mkStatePrimTy alphaTy] stateTyCon
-\end{code}
-
-\begin{code}
stablePtrTyCon
- = pcNonRecDataTyCon stablePtrTyConKey pREL_FOREIGN SLIT("StablePtr")
+ = pcNonRecDataTyCon stablePtrTyConKey pREL_STABLE SLIT("StablePtr")
alpha_tyvar [stablePtrDataCon]
where
stablePtrDataCon
- = pcDataCon stablePtrDataConKey pREL_FOREIGN SLIT("StablePtr")
+ = pcDataCon stablePtrDataConKey pREL_STABLE SLIT("StablePtr")
alpha_tyvar [] [mkStablePtrPrimTy alphaTy] stablePtrTyCon
\end{code}
integerTy :: Type
integerTy = mkTyConTy integerTyCon
-integerTyCon = pcNonRecDataTyCon integerTyConKey pREL_BASE SLIT("Integer") [] [integerDataCon]
+integerTyCon = pcNonRecDataTyCon integerTyConKey pREL_BASE SLIT("Integer") [] [smallIntegerDataCon, largeIntegerDataCon]
+
+smallIntegerDataCon = pcDataCon smallIntegerDataConKey pREL_BASE SLIT("S#")
+ [] [] [intPrimTy] integerTyCon
+largeIntegerDataCon = pcDataCon largeIntegerDataConKey pREL_BASE SLIT("J#")
+ [] [] [intPrimTy, byteArrayPrimTy] integerTyCon
-integerDataCon = pcDataCon integerDataConKey pREL_BASE SLIT("J#")
- [] [] [intPrimTy, intPrimTy, byteArrayPrimTy] integerTyCon
isIntegerTy :: Type -> Bool
isIntegerTy ty
, wordTyConKey, word8TyConKey, word16TyConKey, word32TyConKey, word64TyConKey
, floatTyConKey, doubleTyConKey
, addrTyConKey, charTyConKey, foreignObjTyConKey
- , stablePtrTyConKey, byteArrayTyConKey, mutableByteArrayTyConKey
+ , stablePtrTyConKey
+ , byteArrayTyConKey, mutableByteArrayTyConKey
]
-- types that can be passed from the outside world into Haskell.