builtinNames, derivingOccurrences,
BuiltinNames,
- maybeCharLikeTyCon, maybeIntLikeTyCon,
+ maybeCharLikeCon, maybeIntLikeCon,
eq_RDR, ne_RDR, le_RDR, lt_RDR, ge_RDR, gt_RDR, max_RDR, min_RDR,
compare_RDR, minBound_RDR, maxBound_RDR, enumFrom_RDR, enumFromTo_RDR,
ltH_Float_RDR, eqH_Double_RDR, ltH_Double_RDR, eqH_Int_RDR,
ltH_Int_RDR, geH_RDR, leH_RDR, minusH_RDR, false_RDR, true_RDR,
and_RDR, not_RDR, append_RDR, map_RDR, compose_RDR, mkInt_RDR,
- error_RDR, showString_RDR, showParen_RDR, readParen_RDR, lex_RDR,
+ error_RDR, assert_RDR,
+ showString_RDR, showParen_RDR, readParen_RDR, lex_RDR,
showSpace_RDR, showList___RDR, readList___RDR, negate_RDR,
numClass_RDR, fractionalClass_RDR, eqClass_RDR,
main_NAME, allClass_NAME, ioTyCon_NAME,
needsDataDeclCtxtClassKeys, cCallishClassKeys, cCallishTyKeys, isNoDictClass,
- isNumericClass, isStandardClass, isCcallishClass
+ isNumericClass, isStandardClass, isCcallishClass, isCreturnableClass
) where
#include "HsVersions.h"
, voidTyCon
, wordTyCon
]
-
-min_nonprim_tycon_list -- used w/ HideMostBuiltinNames
- = [ boolTyCon
- , charTyCon
- , intTyCon
- , floatTyCon
- , doubleTyCon
- , integerTyCon
- , liftTyCon
- , return2GMPsTyCon -- ADR asked for these last two (WDP 94/11)
- , returnIntAndGMPTyCon
- ]
\end{code}
%************************************************************************
, integerPlusTwoId
, integerZeroId
, nON_EXHAUSTIVE_GUARDS_ERROR_ID
- , nO_DEFAULT_METHOD_ERROR_ID
- , nO_EXPLICIT_METHOD_ERROR_ID
+ , nO_METHOD_BINDING_ERROR_ID
, pAR_ERROR_ID
, pAT_ERROR_ID
, packStringForCId
ToDo: make it do the ``like'' part properly (as in 0.26 and before).
\begin{code}
-maybeCharLikeTyCon tc = if (uniqueOf tc == charDataConKey) then Just charDataCon else Nothing
-maybeIntLikeTyCon tc = if (uniqueOf tc == intDataConKey) then Just intDataCon else Nothing
+maybeCharLikeCon, maybeIntLikeCon :: Id -> Bool
+maybeCharLikeCon con = uniqueOf con == charDataConKey
+maybeIntLikeCon con = uniqueOf con == intDataConKey
\end{code}
%************************************************************************
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"))
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"))
times_RDR = varQual (pREL_BASE, SLIT("*"))
mkInt_RDR = varQual (pREL_BASE, SLIT("I#"))
-error_RDR = varQual (eRROR, SLIT("error"))
+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
because the list of ambiguous dictionaries hasn't been simplified.
\begin{code}
-isCcallishClass, 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
-isNoDictClass clas = classKey clas `is_elem` noDictClassKeys
+isCcallishClass, isCreturnableClass, 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 = classKey clas == cReturnableClassKey
+isNoDictClass clas = classKey clas `is_elem` noDictClassKeys
is_elem = isIn "is_X_Class"
numericClassKeys