Commit 28139aea authored by simonm's avatar simonm

[project @ 1998-02-02 17:27:26 by simonm]

Library re-organisation:

All libraries now live under ghc/lib, which has the following structure:

	ghc/lib/std    		--  all prelude files 		(libHS.a)
	ghc/lib/std/cbits

	ghc/lib/exts		-- standard Hugs/GHC extensions (libHSexts.a)
				-- available with '-fglasgow-exts'

	ghc/lib/posix		-- POSIX library                (libHSposix.a)
	ghc/lib/posix/cbits     -- available with '-syslib posix'

	ghc/lib/misc		-- used to be hslibs/ghc	(libHSmisc.a)
	ghc/lib/misc/cbits	-- available with '-syslib misc'

	ghc/lib/concurrent	-- Concurrent libraries		(libHSconc.a)
				-- available with '-concurrent'

Also, several non-standard prelude modules had their names changed to begin
with 'Prel' to reduce namespace pollution.

	Addr      ==> PrelAddr     (Addr interface available in 'exts')
	ArrBase   ==> PrelArr
	CCall     ==> PrelCCall    (CCall interface available in 'exts')
	ConcBase  ==> PrelConc
	GHCerr    ==> PrelErr
	Foreign   ==> PrelForeign  (Foreign interface available in 'exts')
	GHC       ==> PrelGHC
	IOHandle  ==> PrelHandle
	IOBase    ==> PrelIOBase
	GHCmain   ==> PrelMain
	STBase    ==> PrelST
	Unsafe    ==> PrelUnsafe
	UnsafeST  ==> PrelUnsafeST
parent 98a1ebec
......@@ -16,7 +16,7 @@ import StdIdInfo
import Name ( mkWiredInIdName, Name )
import PrimOp ( primOpInfo, tagOf_PrimOp, primOp_str,
PrimOpInfo(..), PrimOpResultInfo(..), PrimOp )
import PrelMods ( gHC__ )
import PrelMods ( pREL_GHC )
import Type ( mkForAllTys, mkFunTy, mkFunTys, mkTyVarTy, mkTyConApp )
import TysWiredIn ( boolTy )
import Unique ( mkPrimOpIdUnique )
......@@ -57,7 +57,7 @@ primOpName op
= name
where
key = mkPrimOpIdUnique (IBOX(tagOf_PrimOp prim_op))
name = mkWiredInIdName key gHC__ occ_name the_id
name = mkWiredInIdName key pREL_GHC occ_name the_id
the_id = mkPrimitiveId name ty prim_op
\end{code}
......
......@@ -61,7 +61,6 @@ import CStrings ( identToC, modnameToC, cSEP )
import CmdLineOpts ( opt_PprStyle_All, opt_OmitInterfacePragmas, opt_EnsureSplittableC )
import BasicTypes ( Module, IfaceFlavour(..), moduleString, pprModule )
import PrelMods ( gHC__ )
import Lex ( isLexSym, isLexConId )
import SrcLoc ( noSrcLoc, mkBuiltinSrcLoc, SrcLoc )
import Unique ( pprUnique, showUnique, Unique, Uniquable(..) )
......
......@@ -338,18 +338,18 @@ to write them all down in one place.
prelude_primop op = qual (modAndOcc (primOpName op))
intTyCon_RDR = qual (modAndOcc intTyCon)
ioTyCon_RDR = tcQual (iO_BASE, SLIT("IO"))
ioDataCon_RDR = varQual (iO_BASE, SLIT("IO"))
ioOkDataCon_RDR = varQual (iO_BASE, SLIT("IOok"))
ioTyCon_RDR = tcQual (pREL_IO_BASE, SLIT("IO"))
ioDataCon_RDR = varQual (pREL_IO_BASE, SLIT("IO"))
ioOkDataCon_RDR = varQual (pREL_IO_BASE, SLIT("IOok"))
orderingTyCon_RDR = tcQual (pREL_BASE, SLIT("Ordering"))
rationalTyCon_RDR = tcQual (pREL_NUM, SLIT("Rational"))
ratioTyCon_RDR = tcQual (pREL_NUM, SLIT("Ratio"))
ratioDataCon_RDR = varQual (pREL_NUM, SLIT(":%"))
byteArrayTyCon_RDR = tcQual (aRR_BASE, SLIT("ByteArray"))
mutableByteArrayTyCon_RDR = tcQual (aRR_BASE, SLIT("MutableByteArray"))
byteArrayTyCon_RDR = tcQual (pREL_ARR, SLIT("ByteArray"))
mutableByteArrayTyCon_RDR = tcQual (pREL_ARR, SLIT("MutableByteArray"))
allClass_RDR = tcQual (gHC__, SLIT("All"))
allClass_RDR = tcQual (pREL_GHC, SLIT("All"))
eqClass_RDR = tcQual (pREL_BASE, SLIT("Eq"))
ordClass_RDR = tcQual (pREL_BASE, SLIT("Ord"))
evalClass_RDR = tcQual (pREL_BASE, SLIT("Eval"))
......@@ -369,8 +369,8 @@ realFracClass_RDR = tcQual (pREL_NUM, SLIT("RealFrac"))
realFloatClass_RDR = tcQual (pREL_NUM, SLIT("RealFloat"))
readClass_RDR = tcQual (pREL_READ, SLIT("Read"))
ixClass_RDR = tcQual (iX, SLIT("Ix"))
ccallableClass_RDR = tcQual (gHC__, SLIT("CCallable"))
creturnableClass_RDR = tcQual (gHC__, SLIT("CReturnable"))
ccallableClass_RDR = tcQual (pREL_GHC, SLIT("CCallable"))
creturnableClass_RDR = tcQual (pREL_GHC, SLIT("CReturnable"))
fromInt_RDR = varQual (pREL_BASE, SLIT("fromInt"))
fromInteger_RDR = varQual (pREL_BASE, SLIT("fromInteger"))
......@@ -431,8 +431,8 @@ plus_RDR = varQual (pREL_BASE, SLIT("+"))
times_RDR = varQual (pREL_BASE, SLIT("*"))
mkInt_RDR = varQual (pREL_BASE, SLIT("I#"))
error_RDR = varQual (gHC_ERR, SLIT("error"))
assert_RDR = varQual (gHC_ERR, SLIT("assert__"))
error_RDR = varQual (pREL_ERR, SLIT("error"))
assert_RDR = varQual (pREL_ERR, SLIT("assert__"))
eqH_Char_RDR = prelude_primop CharEqOp
ltH_Char_RDR = prelude_primop CharLtOp
......
......@@ -12,13 +12,9 @@ defined here so as to avod
\begin{code}
module PrelMods
(
gHC__, pRELUDE, pREL_BASE,
pREL_READ , pREL_NUM, pREL_LIST,
pREL_TUP , pACKED_STRING, cONC_BASE,
iO_BASE , mONAD, rATIO, iX,
sT_BASE , aRR_BASE, fOREIGN, mAIN,
gHC_MAIN , gHC_ERR,
cCALL , aDDR
pREL_GHC, pRELUDE, mONAD, rATIO, iX, mAIN, pREL_MAIN, pREL_ERR,
pREL_BASE, pREL_NUM, pREL_LIST, pREL_TUP, pREL_ADDR, pREL_READ,
pREL_PACK, pREL_CONC, pREL_IO_BASE, pREL_ST, pREL_ARR, pREL_FOREIGN
) where
#include "HsVersions.h"
......@@ -27,32 +23,33 @@ import BasicTypes( Module )
\end{code}
\begin{code}
gHC__, pRELUDE, pREL_BASE, pREL_NUM, pREL_LIST, pREL_TUP :: Module
pACKED_STRING, cONC_BASE, iO_BASE, mONAD, rATIO, iX :: Module
sT_BASE, aRR_BASE, fOREIGN, mAIN, gHC_MAIN, gHC_ERR :: Module
pREL_GHC, pRELUDE, mONAD, rATIO, iX, mAIN, pREL_MAIN, pREL_ERR :: Module
pREL_BASE, pREL_NUM, pREL_LIST, pREL_TUP, pREL_ADDR, pREL_READ :: Module
pREL_PACK, pREL_CONC, pREL_IO_BASE, pREL_ST, pREL_ARR, pREL_FOREIGN :: Module
gHC__ = SLIT("GHC") -- Primitive types and values
pRELUDE = SLIT("Prelude")
pREL_GHC = SLIT("PrelGHC") -- Primitive types and values
pREL_BASE = SLIT("PrelBase")
pREL_READ = SLIT("PrelRead")
pREL_NUM = SLIT("PrelNum")
pREL_LIST = SLIT("PrelList")
pREL_TUP = SLIT("PrelTup")
pACKED_STRING= SLIT("PackBase")
cONC_BASE = SLIT("ConcBase")
iO_BASE = SLIT("IOBase")
pREL_PACK = SLIT("PrelPack")
pREL_CONC = SLIT("PrelConc")
pREL_IO_BASE = SLIT("PrelIOBase")
pREL_ST = SLIT("PrelST")
pREL_ARR = SLIT("PrelArr")
pREL_FOREIGN = SLIT("PrelForeign")
pREL_CCALL = SLIT("PrelCCall")
pREL_ADDR = SLIT("PrelAddr")
pREL_ERR = SLIT("PrelErr")
mONAD = SLIT("Monad")
rATIO = SLIT("Ratio")
iX = SLIT("Ix")
sT_BASE = SLIT("STBase")
aRR_BASE = SLIT("ArrBase")
fOREIGN = SLIT("Foreign")
cCALL = SLIT("CCall")
aDDR = SLIT("Addr")
pREL_MAIN = SLIT("PrelMain")
mAIN = SLIT("Main")
gHC_MAIN = SLIT("GHCmain")
gHC_ERR = SLIT("GHCerr")
\end{code}
......@@ -80,10 +80,10 @@ pc_bottoming_Id key mod name ty
-- these "bottom" out, no matter what their arguments
eRROR_ID
= pc_bottoming_Id errorIdKey gHC_ERR SLIT("error") errorTy
= pc_bottoming_Id errorIdKey pREL_ERR SLIT("error") errorTy
generic_ERROR_ID u n
= pc_bottoming_Id u gHC_ERR n errorTy
= pc_bottoming_Id u pREL_ERR n errorTy
pAT_ERROR_ID
= generic_ERROR_ID patErrorIdKey SLIT("patError")
......@@ -99,11 +99,11 @@ nO_METHOD_BINDING_ERROR_ID
= generic_ERROR_ID noMethodBindingErrorIdKey SLIT("noMethodBindingError")
aBSENT_ERROR_ID
= pc_bottoming_Id absentErrorIdKey gHC_ERR SLIT("absentErr")
= pc_bottoming_Id absentErrorIdKey pREL_ERR SLIT("absentErr")
(mkSigmaTy [openAlphaTyVar] [] openAlphaTy)
pAR_ERROR_ID
= pcMiscPrelId parErrorIdKey gHC_ERR SLIT("parError")
= pcMiscPrelId parErrorIdKey pREL_ERR SLIT("parError")
(mkSigmaTy [openAlphaTyVar] [] openAlphaTy) noIdInfo
openAlphaTy = mkTyVarTy openAlphaTyVar
......@@ -121,7 +121,7 @@ decide that the second argument is strict, evaluate that first (!!),
and make a jolly old mess.
\begin{code}
tRACE_ID
= pcMiscPrelId traceIdKey iO_BASE SLIT("trace") traceTy
= pcMiscPrelId traceIdKey pREL_IO_BASE SLIT("trace") traceTy
(noIdInfo `addSpecInfo` pcGenerateSpecs traceIdKey tRACE_ID noIdInfo traceTy)
where
traceTy = mkSigmaTy [alphaTyVar] [] (mkFunTys [mkListTy charTy, alphaTy] alphaTy)
......@@ -135,33 +135,33 @@ tRACE_ID
\begin{code}
packStringForCId
= pcMiscPrelId packCStringIdKey{-ToDo:rename-} pACKED_STRING SLIT("packCString#")
= pcMiscPrelId packCStringIdKey{-ToDo:rename-} pREL_PACK SLIT("packCString#")
(mkFunTys [stringTy] byteArrayPrimTy) noIdInfo
--------------------------------------------------------------------
unpackCStringId
= pcMiscPrelId unpackCStringIdKey pACKED_STRING SLIT("unpackCString#")
= pcMiscPrelId unpackCStringIdKey pREL_PACK SLIT("unpackCString#")
(mkFunTys [addrPrimTy{-a char *-}] stringTy) noIdInfo
-- Andy says:
-- (FunTy addrPrimTy{-a char *-} stringTy) (noIdInfo `addInfo` exactArity 1)
-- but I don't like wired-in IdInfos (WDP)
unpackCString2Id -- for cases when a string has a NUL in it
= pcMiscPrelId unpackCString2IdKey pACKED_STRING SLIT("unpackNBytes#")
= pcMiscPrelId unpackCString2IdKey pREL_PACK SLIT("unpackNBytes#")
(mkFunTys [addrPrimTy{-a char *-}, intPrimTy{-length-}] stringTy)
noIdInfo
--------------------------------------------------------------------
unpackCStringAppendId
= pcMiscPrelId unpackCStringAppendIdKey pACKED_STRING SLIT("unpackAppendCString#")
= pcMiscPrelId unpackCStringAppendIdKey pREL_PACK SLIT("unpackAppendCString#")
(mkFunTys [addrPrimTy{-a "char *" pointer-},stringTy] stringTy)
((noIdInfo
{-LATER:`addUnfoldInfo` mkMagicUnfolding unpackCStringAppendIdKey-})
`addArityInfo` exactArity 2)
unpackCStringFoldrId
= pcMiscPrelId unpackCStringFoldrIdKey pACKED_STRING SLIT("unpackFoldrCString#")
= pcMiscPrelId unpackCStringFoldrIdKey pREL_PACK SLIT("unpackFoldrCString#")
(mkSigmaTy [alphaTyVar] []
(mkFunTys [addrPrimTy{-a "char *" pointer-},
mkFunTys [charTy, alphaTy] alphaTy,
......@@ -481,7 +481,7 @@ noFollowId = pcMiscPrelId noFollowIdKey cONC_BASE SLIT("noFollow")
nasty as-is, change it back to a literal (@Literal@).
\begin{code}
realWorldPrimId
= pcMiscPrelId realWorldPrimIdKey gHC__ SLIT("realWorld#")
= pcMiscPrelId realWorldPrimIdKey pREL_GHC SLIT("realWorld#")
realWorldStatePrimTy
noIdInfo
\end{code}
......@@ -498,7 +498,7 @@ voidId = pc_bottoming_Id voidIdKey pREL_BASE SLIT("void") voidTy
\begin{code}
buildId
= pcMiscPrelId buildIdKey gHC_ERR SLIT("build") buildTy
= pcMiscPrelId buildIdKey pREL_ERR SLIT("build") buildTy
((((noIdInfo
{-LATER:`addUnfoldInfo` mkMagicUnfolding buildIdKey-})
`addStrictnessInfo` mkStrictnessInfo [WwStrict] False)
......@@ -543,7 +543,7 @@ mkBuild ty tv c n g expr
\begin{code}
augmentId
= pcMiscPrelId augmentIdKey gHC_ERR SLIT("augment") augmentTy
= pcMiscPrelId augmentIdKey pREL_ERR SLIT("augment") augmentTy
(((noIdInfo
{-LATER:`addUnfoldInfo` mkMagicUnfolding augmentIdKey-})
`addStrictnessInfo` mkStrictnessInfo [WwStrict,WwLazy False] False)
......
......@@ -1822,8 +1822,8 @@ pprPrimOp other_op
= getPprStyle $ \ sty ->
if codeStyle sty then -- For C just print the primop itself
identToC str
else if ifaceStyle sty then -- For interfaces Print it qualified with GHC.
ptext SLIT("GHC.") <> ptext str
else if ifaceStyle sty then -- For interfaces Print it qualified with PrelGHC.
ptext SLIT("PrelGHC.") <> ptext str
else -- Unqualified is good enough
ptext str
where
......
......@@ -18,7 +18,7 @@ import TyCon ( mkPrimTyCon, mkDataTyCon, TyCon )
import BasicTypes ( NewOrData(..), RecFlag(..) )
import Type ( mkTyConApp, mkTyConTy, mkTyVarTys, Type )
import TyVar ( GenTyVar(..), alphaTyVars )
import PrelMods ( gHC__ )
import PrelMods ( pREL_GHC )
import Unique
\end{code}
......@@ -40,7 +40,7 @@ pcPrimTyCon :: Unique{-TyConKey-} -> FAST_STRING -> Int -> PrimRep -> TyCon
pcPrimTyCon key str arity primrep
= the_tycon
where
name = mkWiredInTyConName key gHC__ str the_tycon
name = mkWiredInTyConName key pREL_GHC str the_tycon
the_tycon = mkPrimTyCon name arity primrep
......@@ -132,7 +132,7 @@ voidTyCon = mk_no_constr_tycon voidTyConKey SLIT("Void")
mk_no_constr_tycon key str
= the_tycon
where
name = mkWiredInTyConName key gHC__ str the_tycon
name = mkWiredInTyConName key pREL_GHC str the_tycon
the_tycon = mkDataTyCon name mkBoxedTypeKind
[] -- No tyvars
[] -- No context
......
......@@ -235,15 +235,15 @@ min_int = toInteger minInt
\begin{code}
wordTy = mkTyConTy wordTyCon
wordTyCon = pcNonRecDataTyCon wordTyConKey fOREIGN SLIT("Word") [] [wordDataCon]
wordDataCon = pcDataCon wordDataConKey fOREIGN SLIT("W#") [] [] [wordPrimTy] wordTyCon
wordTyCon = pcNonRecDataTyCon wordTyConKey pREL_FOREIGN SLIT("Word") [] [wordDataCon]
wordDataCon = pcDataCon wordDataConKey pREL_FOREIGN SLIT("W#") [] [] [wordPrimTy] wordTyCon
\end{code}
\begin{code}
addrTy = mkTyConTy addrTyCon
addrTyCon = pcNonRecDataTyCon addrTyConKey aDDR SLIT("Addr") [] [addrDataCon]
addrDataCon = pcDataCon addrDataConKey aDDR SLIT("A#") [] [] [addrPrimTy] addrTyCon
addrTyCon = pcNonRecDataTyCon addrTyConKey pREL_ADDR SLIT("Addr") [] [addrDataCon]
addrDataCon = pcDataCon addrDataConKey pREL_ADDR SLIT("A#") [] [] [addrPrimTy] addrTyCon
\end{code}
\begin{code}
......@@ -264,29 +264,29 @@ doubleDataCon = pcDataCon doubleDataConKey pREL_BASE SLIT("D#") [] [] [doublePri
mkStateTy ty = mkTyConApp stateTyCon [ty]
realWorldStateTy = mkStateTy realWorldTy -- a common use
stateTyCon = pcNonRecDataTyCon stateTyConKey sT_BASE SLIT("State") alpha_tyvar [stateDataCon]
stateTyCon = pcNonRecDataTyCon stateTyConKey pREL_ST SLIT("State") alpha_tyvar [stateDataCon]
stateDataCon
= pcDataCon stateDataConKey sT_BASE SLIT("S#")
= pcDataCon stateDataConKey pREL_ST SLIT("S#")
alpha_tyvar [] [mkStatePrimTy alphaTy] stateTyCon
\end{code}
\begin{code}
stablePtrTyCon
= pcNonRecDataTyCon stablePtrTyConKey fOREIGN SLIT("StablePtr")
= pcNonRecDataTyCon stablePtrTyConKey pREL_FOREIGN SLIT("StablePtr")
alpha_tyvar [stablePtrDataCon]
where
stablePtrDataCon
= pcDataCon stablePtrDataConKey fOREIGN SLIT("StablePtr")
= pcDataCon stablePtrDataConKey pREL_FOREIGN SLIT("StablePtr")
alpha_tyvar [] [mkStablePtrPrimTy alphaTy] stablePtrTyCon
\end{code}
\begin{code}
foreignObjTyCon
= pcNonRecDataTyCon foreignObjTyConKey fOREIGN SLIT("ForeignObj")
= pcNonRecDataTyCon foreignObjTyConKey pREL_FOREIGN SLIT("ForeignObj")
[] [foreignObjDataCon]
where
foreignObjDataCon
= pcDataCon foreignObjDataConKey fOREIGN SLIT("ForeignObj")
= pcDataCon foreignObjDataConKey pREL_FOREIGN SLIT("ForeignObj")
[] [] [foreignObjPrimTy] foreignObjTyCon
\end{code}
......@@ -346,118 +346,118 @@ We fish one of these \tr{StateAnd<blah>#} things with
\begin{code}
stateAndPtrPrimTyCon
= pcNonRecDataTyCon stateAndPtrPrimTyConKey sT_BASE SLIT("StateAndPtr#")
= pcNonRecDataTyCon stateAndPtrPrimTyConKey pREL_ST SLIT("StateAndPtr#")
alpha_beta_tyvars [stateAndPtrPrimDataCon]
stateAndPtrPrimDataCon
= pcDataCon stateAndPtrPrimDataConKey sT_BASE SLIT("StateAndPtr#")
= pcDataCon stateAndPtrPrimDataConKey pREL_ST SLIT("StateAndPtr#")
alpha_beta_tyvars [] [mkStatePrimTy alphaTy, betaTy]
stateAndPtrPrimTyCon
stateAndCharPrimTyCon
= pcNonRecDataTyCon stateAndCharPrimTyConKey sT_BASE SLIT("StateAndChar#")
= pcNonRecDataTyCon stateAndCharPrimTyConKey pREL_ST SLIT("StateAndChar#")
alpha_tyvar [stateAndCharPrimDataCon]
stateAndCharPrimDataCon
= pcDataCon stateAndCharPrimDataConKey sT_BASE SLIT("StateAndChar#")
= pcDataCon stateAndCharPrimDataConKey pREL_ST SLIT("StateAndChar#")
alpha_tyvar [] [mkStatePrimTy alphaTy, charPrimTy]
stateAndCharPrimTyCon
stateAndIntPrimTyCon
= pcNonRecDataTyCon stateAndIntPrimTyConKey sT_BASE SLIT("StateAndInt#")
= pcNonRecDataTyCon stateAndIntPrimTyConKey pREL_ST SLIT("StateAndInt#")
alpha_tyvar [stateAndIntPrimDataCon]
stateAndIntPrimDataCon
= pcDataCon stateAndIntPrimDataConKey sT_BASE SLIT("StateAndInt#")
= pcDataCon stateAndIntPrimDataConKey pREL_ST SLIT("StateAndInt#")
alpha_tyvar [] [mkStatePrimTy alphaTy, intPrimTy]
stateAndIntPrimTyCon
stateAndWordPrimTyCon
= pcNonRecDataTyCon stateAndWordPrimTyConKey sT_BASE SLIT("StateAndWord#")
= pcNonRecDataTyCon stateAndWordPrimTyConKey pREL_ST SLIT("StateAndWord#")
alpha_tyvar [stateAndWordPrimDataCon]
stateAndWordPrimDataCon
= pcDataCon stateAndWordPrimDataConKey sT_BASE SLIT("StateAndWord#")
= pcDataCon stateAndWordPrimDataConKey pREL_ST SLIT("StateAndWord#")
alpha_tyvar [] [mkStatePrimTy alphaTy, wordPrimTy]
stateAndWordPrimTyCon
stateAndAddrPrimTyCon
= pcNonRecDataTyCon stateAndAddrPrimTyConKey sT_BASE SLIT("StateAndAddr#")
= pcNonRecDataTyCon stateAndAddrPrimTyConKey pREL_ST SLIT("StateAndAddr#")
alpha_tyvar [stateAndAddrPrimDataCon]
stateAndAddrPrimDataCon
= pcDataCon stateAndAddrPrimDataConKey sT_BASE SLIT("StateAndAddr#")
= pcDataCon stateAndAddrPrimDataConKey pREL_ST SLIT("StateAndAddr#")
alpha_tyvar [] [mkStatePrimTy alphaTy, addrPrimTy]
stateAndAddrPrimTyCon
stateAndStablePtrPrimTyCon
= pcNonRecDataTyCon stateAndStablePtrPrimTyConKey fOREIGN SLIT("StateAndStablePtr#")
= pcNonRecDataTyCon stateAndStablePtrPrimTyConKey pREL_FOREIGN SLIT("StateAndStablePtr#")
alpha_beta_tyvars [stateAndStablePtrPrimDataCon]
stateAndStablePtrPrimDataCon
= pcDataCon stateAndStablePtrPrimDataConKey fOREIGN SLIT("StateAndStablePtr#")
= pcDataCon stateAndStablePtrPrimDataConKey pREL_FOREIGN SLIT("StateAndStablePtr#")
alpha_beta_tyvars []
[mkStatePrimTy alphaTy, mkTyConApp stablePtrPrimTyCon [betaTy]]
stateAndStablePtrPrimTyCon
stateAndForeignObjPrimTyCon
= pcNonRecDataTyCon stateAndForeignObjPrimTyConKey fOREIGN SLIT("StateAndForeignObj#")
= pcNonRecDataTyCon stateAndForeignObjPrimTyConKey pREL_FOREIGN SLIT("StateAndForeignObj#")
alpha_tyvar [stateAndForeignObjPrimDataCon]
stateAndForeignObjPrimDataCon
= pcDataCon stateAndForeignObjPrimDataConKey fOREIGN SLIT("StateAndForeignObj#")
= pcDataCon stateAndForeignObjPrimDataConKey pREL_FOREIGN SLIT("StateAndForeignObj#")
alpha_tyvar []
[mkStatePrimTy alphaTy, mkTyConTy foreignObjPrimTyCon]
stateAndForeignObjPrimTyCon
stateAndFloatPrimTyCon
= pcNonRecDataTyCon stateAndFloatPrimTyConKey sT_BASE SLIT("StateAndFloat#")
= pcNonRecDataTyCon stateAndFloatPrimTyConKey pREL_ST SLIT("StateAndFloat#")
alpha_tyvar [stateAndFloatPrimDataCon]
stateAndFloatPrimDataCon
= pcDataCon stateAndFloatPrimDataConKey sT_BASE SLIT("StateAndFloat#")
= pcDataCon stateAndFloatPrimDataConKey pREL_ST SLIT("StateAndFloat#")
alpha_tyvar [] [mkStatePrimTy alphaTy, floatPrimTy]
stateAndFloatPrimTyCon
stateAndDoublePrimTyCon
= pcNonRecDataTyCon stateAndDoublePrimTyConKey sT_BASE SLIT("StateAndDouble#")
= pcNonRecDataTyCon stateAndDoublePrimTyConKey pREL_ST SLIT("StateAndDouble#")
alpha_tyvar [stateAndDoublePrimDataCon]
stateAndDoublePrimDataCon
= pcDataCon stateAndDoublePrimDataConKey sT_BASE SLIT("StateAndDouble#")
= pcDataCon stateAndDoublePrimDataConKey pREL_ST SLIT("StateAndDouble#")
alpha_tyvar [] [mkStatePrimTy alphaTy, doublePrimTy]
stateAndDoublePrimTyCon
\end{code}
\begin{code}
stateAndArrayPrimTyCon
= pcNonRecDataTyCon stateAndArrayPrimTyConKey aRR_BASE SLIT("StateAndArray#")
= pcNonRecDataTyCon stateAndArrayPrimTyConKey pREL_ARR SLIT("StateAndArray#")
alpha_beta_tyvars [stateAndArrayPrimDataCon]
stateAndArrayPrimDataCon
= pcDataCon stateAndArrayPrimDataConKey aRR_BASE SLIT("StateAndArray#")
= pcDataCon stateAndArrayPrimDataConKey pREL_ARR SLIT("StateAndArray#")
alpha_beta_tyvars [] [mkStatePrimTy alphaTy, mkArrayPrimTy betaTy]
stateAndArrayPrimTyCon
stateAndMutableArrayPrimTyCon
= pcNonRecDataTyCon stateAndMutableArrayPrimTyConKey aRR_BASE SLIT("StateAndMutableArray#")
= pcNonRecDataTyCon stateAndMutableArrayPrimTyConKey pREL_ARR SLIT("StateAndMutableArray#")
alpha_beta_tyvars [stateAndMutableArrayPrimDataCon]
stateAndMutableArrayPrimDataCon
= pcDataCon stateAndMutableArrayPrimDataConKey aRR_BASE SLIT("StateAndMutableArray#")
= pcDataCon stateAndMutableArrayPrimDataConKey pREL_ARR SLIT("StateAndMutableArray#")
alpha_beta_tyvars [] [mkStatePrimTy alphaTy, mkMutableArrayPrimTy alphaTy betaTy]
stateAndMutableArrayPrimTyCon
stateAndByteArrayPrimTyCon
= pcNonRecDataTyCon stateAndByteArrayPrimTyConKey aRR_BASE SLIT("StateAndByteArray#")
= pcNonRecDataTyCon stateAndByteArrayPrimTyConKey pREL_ARR SLIT("StateAndByteArray#")
alpha_tyvar [stateAndByteArrayPrimDataCon]
stateAndByteArrayPrimDataCon
= pcDataCon stateAndByteArrayPrimDataConKey aRR_BASE SLIT("StateAndByteArray#")
= pcDataCon stateAndByteArrayPrimDataConKey pREL_ARR SLIT("StateAndByteArray#")
alpha_tyvar [] [mkStatePrimTy alphaTy, byteArrayPrimTy]
stateAndByteArrayPrimTyCon
stateAndMutableByteArrayPrimTyCon
= pcNonRecDataTyCon stateAndMutableByteArrayPrimTyConKey aRR_BASE SLIT("StateAndMutableByteArray#")
= pcNonRecDataTyCon stateAndMutableByteArrayPrimTyConKey pREL_ARR SLIT("StateAndMutableByteArray#")
alpha_tyvar [stateAndMutableByteArrayPrimDataCon]
stateAndMutableByteArrayPrimDataCon
= pcDataCon stateAndMutableByteArrayPrimDataConKey aRR_BASE SLIT("StateAndMutableByteArray#")
= pcDataCon stateAndMutableByteArrayPrimDataConKey pREL_ARR SLIT("StateAndMutableByteArray#")
alpha_tyvar [] [mkStatePrimTy alphaTy, mkTyConApp mutableByteArrayPrimTyCon alpha_ty]
stateAndMutableByteArrayPrimTyCon
stateAndSynchVarPrimTyCon
= pcNonRecDataTyCon stateAndSynchVarPrimTyConKey cONC_BASE SLIT("StateAndSynchVar#")
= pcNonRecDataTyCon stateAndSynchVarPrimTyConKey pREL_CONC SLIT("StateAndSynchVar#")
alpha_beta_tyvars [stateAndSynchVarPrimDataCon]
stateAndSynchVarPrimDataCon
= pcDataCon stateAndSynchVarPrimDataConKey cONC_BASE SLIT("StateAndSynchVar#")
= pcDataCon stateAndSynchVarPrimDataConKey pREL_CONC SLIT("StateAndSynchVar#")
alpha_beta_tyvars [] [mkStatePrimTy alphaTy, mkSynchVarPrimTy alphaTy betaTy]
stateAndSynchVarPrimTyCon
\end{code}
......@@ -512,9 +512,9 @@ type of runST.
\begin{code}
mkStateTransformerTy s a = mkTyConApp stTyCon [s, a]
stTyCon = pcNonRecNewTyCon stTyConKey sT_BASE SLIT("ST") alpha_beta_tyvars [stDataCon]
stTyCon = pcNonRecNewTyCon stTyConKey pREL_ST SLIT("ST") alpha_beta_tyvars [stDataCon]
stDataCon = pcDataCon stDataConKey sT_BASE SLIT("ST")
stDataCon = pcDataCon stDataConKey pREL_ST SLIT("ST")
alpha_beta_tyvars [] [ty] stTyCon
where
ty = mkFunTy (mkStatePrimTy alphaTy) (mkSTretTy alphaTy betaTy)
......@@ -522,10 +522,10 @@ stDataCon = pcDataCon stDataConKey sT_BASE SLIT("ST")
mkSTretTy alpha beta = mkTyConApp stRetTyCon [alpha,beta]
stRetTyCon
= pcNonRecDataTyCon stRetTyConKey sT_BASE SLIT("STret")
= pcNonRecDataTyCon stRetTyConKey pREL_ST SLIT("STret")
alpha_beta_tyvars [stRetDataCon]
stRetDataCon
= pcDataCon stRetDataConKey sT_BASE SLIT("STret")
= pcDataCon stRetDataConKey pREL_ST SLIT("STret")
alpha_beta_tyvars [] [mkStatePrimTy alphaTy, betaTy]
stRetTyCon
\end{code}
......
......@@ -780,7 +780,7 @@ nonBoxedPrimCCallErr clas inst_ty
ppr inst_ty])
omittedMethodWarn sel_id clas
= sep [ptext SLIT("Warning: no explicit method nor default method for") <+> quotes (ppr sel_id),
= sep [ptext SLIT("No explicit method nor default method for") <+> quotes (ppr sel_id),
ptext SLIT("in an instance declaration for") <+> quotes (ppr clas)]
{-
......
......@@ -52,7 +52,7 @@ import Class ( Class, classSelIds, classTyCon )
import Type ( mkTyConApp, mkSynTy, Type )
import TyVar ( emptyTyVarEnv )
import TysWiredIn ( unitTy )
import PrelMods ( gHC_MAIN, mAIN )
import PrelMods ( pREL_MAIN, mAIN )
import PrelInfo ( main_NAME, ioTyCon_NAME )
import Unify ( unifyTauTy )
import UniqFM ( lookupUFM_Directly, lookupWithDefaultUFM_Directly,
......
......@@ -53,7 +53,7 @@ import Maybes
import Name ( Name, nameUnique, mkWiredInTyConName, NamedThing(getName) )
import Unique ( Unique, funTyConKey, Uniquable(..) )
import PrimRep ( PrimRep(..), isFollowableRep )
import PrelMods ( gHC__, pREL_TUP, pREL_BASE )
import PrelMods ( pREL_GHC, pREL_TUP, pREL_BASE )
import Lex ( mkTupNameStr )
import SrcLoc ( SrcLoc, mkBuiltinSrcLoc )
import Util ( nOfThem, isIn )
......@@ -122,7 +122,7 @@ data TyCon
\begin{code}
mkFunTyCon = FunTyCon
mkFunTyConName = mkWiredInTyConName funTyConKey gHC__ SLIT("->") FunTyCon
mkFunTyConName = mkWiredInTyConName funTyConKey pREL_GHC SLIT("->") FunTyCon
mkSpecTyCon = SpecTyCon
mkTupleTyCon = TupleTyCon
......
......@@ -2786,7 +2786,7 @@ arg: while($_ = $Args[0]) {
/^-syslib(.*)/ && do { local($syslib) = &grab_arg_arg(*Args,'-syslib',$1);
print STDERR "$Pgm: no such system library (-syslib): $syslib\n",
$Status++ unless $syslib =~ /^(hbc|ghc|posix|contrib)$/;
$Status++ unless $syslib =~ /^(exts|misc|posix)$/;
#
# The posix library is a `special' in that it relies on
......
......@@ -10,106 +10,8 @@
TOP = ..
include $(TOP)/mk/boilerplate.mk
WAYS=$(GhcLibWays)
# posix must be before misc.
ifeq "$(way)" ""
SUBDIRS = cbits
else
SUBDIRS=
endif
#-----------------------------------------------------------------------------
# Setting the standard variables
#
LIB_DIRS = ghc required glaExts concurrent
LIBRARY = libHS$(_way).a