X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;ds=sidebyside;f=ghc%2Fcompiler%2Fprelude%2FPrelInfo.lhs;fp=ghc%2Fcompiler%2Fprelude%2FPrelInfo.lhs;h=c6afe14b79314f212f3cb2327dc90094616dad16;hb=2129fa6fc4afd7f7b0c767f8c0c14b9ab5508ec2;hp=256b03c7696e60bd944ae762b2c0651be1ce1d66;hpb=ce42f19f8c840fbe89844471a0d850d310a94556;p=ghc-hetmet.git diff --git a/ghc/compiler/prelude/PrelInfo.lhs b/ghc/compiler/prelude/PrelInfo.lhs index 256b03c..c6afe14 100644 --- a/ghc/compiler/prelude/PrelInfo.lhs +++ b/ghc/compiler/prelude/PrelInfo.lhs @@ -10,24 +10,21 @@ module PrelInfo ( wiredInThingEnv, ghcPrimExports, - cCallableClassDecl, cReturnableClassDecl, knownKeyNames, -- Random other things maybeCharLikeCon, maybeIntLikeCon, -- Class categories - isCcallishClass, isCreturnableClass, isNoDictClass, - isNumericClass, isStandardClass + isNoDictClass, isNumericClass, isStandardClass ) where #include "HsVersions.h" import PrelNames ( basicKnownKeyNames, - cCallableClassName, cReturnableClassName, hasKey, charDataConKey, intDataConKey, - numericClassKeys, standardClassKeys, cCallishClassKeys, + numericClassKeys, standardClassKeys, noDictClassKeys ) #ifdef GHCI import DsMeta ( templateHaskellNames ) @@ -40,18 +37,16 @@ import Id ( idName ) import MkId ( mkPrimOpId, wiredInIds ) import MkId -- All of it, for re-export import Name ( Name, nameOccName, NamedThing(..) ) -import RdrName ( mkRdrUnqual, getRdrName ) +import RdrName ( mkRdrUnqual ) import HsSyn ( HsTyVarBndr(..) ) import OccName ( mkVarOcc ) import TysPrim ( primTyCons ) import TysWiredIn ( wiredInTyCons ) -import RdrHsSyn ( mkClassDecl ) import HscTypes ( TyThing(..), implicitTyThings, TypeEnv, mkTypeEnv, GenAvailInfo(..), RdrAvailInfo ) import Class ( Class, classKey, className ) import Type ( funTyCon, openTypeKind, liftedTypeKind ) import TyCon ( tyConName ) -import SrcLoc ( noSrcLoc ) import Util ( isIn ) \end{code} @@ -104,36 +99,15 @@ sense of them in interface pragmas. It's cool, though they all have %************************************************************************ GHC.Prim "exports" all the primops and primitive types, some -wired-in Ids, and the CCallable & CReturnable classes. +wired-in Ids. \begin{code} ghcPrimExports :: [RdrAvailInfo] - = AvailTC cCallableOcc [ cCallableOcc ] : - AvailTC cReturnableOcc [ cReturnableOcc ] : - map (Avail . nameOccName . idName) ghcPrimIds ++ + = map (Avail . nameOccName . idName) ghcPrimIds ++ map (Avail . primOpOcc) allThePrimOps ++ [ AvailTC occ [occ] | n <- funTyCon : primTyCons, let occ = nameOccName (tyConName n) ] - where - cCallableOcc = nameOccName cCallableClassName - cReturnableOcc = nameOccName cReturnableClassName - -cCallableClassDecl - = mkClassDecl - ([], getRdrName cCallableClassName, [openAlpha]) - [] -- no fds - [] -- no sigs - Nothing -- no mbinds - noSrcLoc - -cReturnableClassDecl - = mkClassDecl - ([], getRdrName cReturnableClassName, [openAlpha]) - [] -- no fds - [] -- no sigs - Nothing -- no mbinds - noSrcLoc alpha = mkRdrUnqual (mkVarOcc FSLIT("a")) openAlpha = IfaceTyVar alpha openTypeKind @@ -163,13 +137,10 @@ maybeIntLikeCon con = con `hasKey` intDataConKey %************************************************************************ \begin{code} -isCcallishClass, isCreturnableClass, isNoDictClass, - isNumericClass, isStandardClass :: Class -> Bool +isNoDictClass, isNumericClass, isStandardClass :: Class -> Bool isNumericClass clas = classKey clas `is_elem` numericClassKeys isStandardClass clas = classKey clas `is_elem` standardClassKeys -isCcallishClass clas = classKey clas `is_elem` cCallishClassKeys -isCreturnableClass clas = className clas == cReturnableClassName isNoDictClass clas = classKey clas `is_elem` noDictClassKeys is_elem = isIn "is_X_Class" \end{code}