Wolfgang Jeltsch pushed to branch wip/jeltsch/known-key-removals/lists at Glasgow Haskell Compiler / GHC
Commits:
-
224446a2
by Cheng Shao at 2025-12-20T07:49:54-05:00
-
251ec087
by Cheng Shao at 2025-12-20T07:49:54-05:00
-
fb586c67
by Cheng Shao at 2025-12-20T07:50:36-05:00
-
8149c987
by Cheng Shao at 2025-12-20T17:06:51-05:00
-
746b18cd
by Cheng Shao at 2025-12-20T17:06:51-05:00
-
4dd7e3b9
by Cheng Shao at 2025-12-20T17:07:33-05:00
-
bc36268a
by Wolfgang Jeltsch at 2025-12-21T16:23:24-05:00
-
ff5050e9
by Wolfgang Jeltsch at 2025-12-21T16:24:04-05:00
-
424388c2
by Wolfgang Jeltsch at 2025-12-21T16:24:45-05:00
-
a1ed86fe
by Wolfgang Jeltsch at 2025-12-21T16:25:26-05:00
-
b8220daf
by Wolfgang Jeltsch at 2025-12-21T16:26:07-05:00
-
eb0628b1
by Wolfgang Jeltsch at 2025-12-21T16:26:47-05:00
-
50804ce7
by Wolfgang Jeltsch at 2025-12-22T15:26:18+02:00
12 changed files:
- .gitlab/ci.sh
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Parser/String.hs
- compiler/GHC/StgToCmm/InfoTableProv.hs
- hadrian/doc/flavours.md
- hadrian/src/Flavour.hs
- hadrian/src/Settings/Packages.hs
- libraries/ghc-internal/src/GHC/Internal/IO/Handle.hs
- rts/linker/InitFini.c
- rts/sm/Sanity.c
- testsuite/tests/typecheck/should_compile/holes.stderr
- testsuite/tests/typecheck/should_compile/holes3.stderr
Changes:
| ... | ... | @@ -265,6 +265,15 @@ function setup() { |
| 265 | 265 | # testsuite driver!
|
| 266 | 266 | git config gc.auto 0
|
| 267 | 267 | |
| 268 | + # Some runners still choke at the perf note fetch step, which has to
|
|
| 269 | + # do with slow internet connection, see
|
|
| 270 | + # https://docs.gitlab.com/topics/git/troubleshooting_git/#error-stream-0-was-not-closed-cleanly
|
|
| 271 | + # for the http.postBuffer mitigation. It might seem
|
|
| 272 | + # counter-intuitive that "post buffer" helps with fetching, but git
|
|
| 273 | + # indeed issues post requests when fetching over https, it's a
|
|
| 274 | + # bidirectional negotiation with the remote.
|
|
| 275 | + git config http.postBuffer 52428800
|
|
| 276 | + |
|
| 268 | 277 | info "====================================================="
|
| 269 | 278 | info "Toolchain versions"
|
| 270 | 279 | info "====================================================="
|
| ... | ... | @@ -222,12 +222,11 @@ basicKnownKeyNames |
| 222 | 222 | |
| 223 | 223 | -- Type representation types
|
| 224 | 224 | trModuleTyConName, trModuleDataConName,
|
| 225 | - trNameTyConName, trNameSDataConName, trNameDDataConName,
|
|
| 225 | + trNameSDataConName,
|
|
| 226 | 226 | trTyConTyConName, trTyConDataConName,
|
| 227 | 227 | |
| 228 | 228 | -- Typeable
|
| 229 | 229 | typeableClassName,
|
| 230 | - typeRepTyConName,
|
|
| 231 | 230 | someTypeRepTyConName,
|
| 232 | 231 | someTypeRepDataConName,
|
| 233 | 232 | kindRepTyConName,
|
| ... | ... | @@ -237,13 +236,10 @@ basicKnownKeyNames |
| 237 | 236 | kindRepFunDataConName,
|
| 238 | 237 | kindRepTYPEDataConName,
|
| 239 | 238 | kindRepTypeLitSDataConName,
|
| 240 | - kindRepTypeLitDDataConName,
|
|
| 241 | - typeLitSortTyConName,
|
|
| 242 | 239 | typeLitSymbolDataConName,
|
| 243 | 240 | typeLitNatDataConName,
|
| 244 | 241 | typeLitCharDataConName,
|
| 245 | 242 | typeRepIdName,
|
| 246 | - mkTrTypeName,
|
|
| 247 | 243 | mkTrConName,
|
| 248 | 244 | mkTrAppCheckedName,
|
| 249 | 245 | mkTrFunName,
|
| ... | ... | @@ -296,7 +292,7 @@ basicKnownKeyNames |
| 296 | 292 | fmapName,
|
| 297 | 293 | |
| 298 | 294 | -- Monad stuff
|
| 299 | - thenIOName, bindIOName, returnIOName, failIOName, bindMName, thenMName,
|
|
| 295 | + thenIOName, bindIOName, returnIOName, bindMName, thenMName,
|
|
| 300 | 296 | returnMName, joinMName,
|
| 301 | 297 | |
| 302 | 298 | -- MonadFail
|
| ... | ... | @@ -343,8 +339,7 @@ basicKnownKeyNames |
| 343 | 339 | getFieldName, setFieldName,
|
| 344 | 340 | |
| 345 | 341 | -- List operations
|
| 346 | - concatName, filterName, mapName,
|
|
| 347 | - zipName, foldrName, buildName, augmentName, appendName,
|
|
| 342 | + mapName, foldrName, buildName, augmentName,
|
|
| 348 | 343 | |
| 349 | 344 | -- FFI primitive types that are not wired-in.
|
| 350 | 345 | stablePtrTyConName, ptrTyConName, funPtrTyConName, constPtrConName,
|
| ... | ... | @@ -409,26 +404,18 @@ basicKnownKeyNames |
| 409 | 404 | naturalQuotName,
|
| 410 | 405 | naturalRemName,
|
| 411 | 406 | naturalAndName,
|
| 412 | - naturalAndNotName,
|
|
| 413 | 407 | naturalOrName,
|
| 414 | 408 | naturalXorName,
|
| 415 | 409 | naturalTestBitName,
|
| 416 | 410 | naturalBitName,
|
| 417 | 411 | naturalGcdName,
|
| 418 | 412 | naturalLcmName,
|
| 419 | - naturalLog2Name,
|
|
| 420 | - naturalLogBaseWordName,
|
|
| 421 | - naturalLogBaseName,
|
|
| 422 | - naturalPowModName,
|
|
| 423 | - naturalSizeInBaseName,
|
|
| 424 | 413 | |
| 425 | 414 | bignatEqName,
|
| 426 | 415 | |
| 427 | 416 | -- Float/Double
|
| 428 | 417 | integerToFloatName,
|
| 429 | 418 | integerToDoubleName,
|
| 430 | - naturalToFloatName,
|
|
| 431 | - naturalToDoubleName,
|
|
| 432 | 419 | rationalToFloatName,
|
| 433 | 420 | rationalToDoubleName,
|
| 434 | 421 | |
| ... | ... | @@ -479,7 +466,6 @@ basicKnownKeyNames |
| 479 | 466 | |
| 480 | 467 | -- Monad comprehensions
|
| 481 | 468 | , guardMName
|
| 482 | - , liftMName
|
|
| 483 | 469 | , mzipName
|
| 484 | 470 | |
| 485 | 471 | -- GHCi Sandbox
|
| ... | ... | @@ -491,9 +477,6 @@ basicKnownKeyNames |
| 491 | 477 | , staticPtrDataConName, staticPtrInfoDataConName
|
| 492 | 478 | , fromStaticPtrName
|
| 493 | 479 | |
| 494 | - -- Fingerprint
|
|
| 495 | - , fingerprintDataConName
|
|
| 496 | - |
|
| 497 | 480 | -- Custom type errors
|
| 498 | 481 | , errorMessageTypeErrorFamName
|
| 499 | 482 | , typeErrorTextDataConName
|
| ... | ... | @@ -710,9 +693,8 @@ ltTag_RDR = nameRdrName ordLTDataConName |
| 710 | 693 | eqTag_RDR = nameRdrName ordEQDataConName
|
| 711 | 694 | gtTag_RDR = nameRdrName ordGTDataConName
|
| 712 | 695 | |
| 713 | -map_RDR, append_RDR :: RdrName
|
|
| 696 | +map_RDR :: RdrName
|
|
| 714 | 697 | map_RDR = nameRdrName mapName
|
| 715 | -append_RDR = nameRdrName appendName
|
|
| 716 | 698 | |
| 717 | 699 | foldr_RDR, build_RDR, returnM_RDR, bindM_RDR, failM_RDR
|
| 718 | 700 | :: RdrName
|
| ... | ... | @@ -1084,7 +1066,7 @@ considerAccessibleName = varQual gHC_INTERNAL_EXTS (fsLit "considerAccessible") |
| 1084 | 1066 | |
| 1085 | 1067 | -- Random GHC.Internal.Base functions
|
| 1086 | 1068 | fromStringName, otherwiseIdName, foldrName, buildName, augmentName,
|
| 1087 | - mapName, appendName, assertName,
|
|
| 1069 | + mapName, assertName,
|
|
| 1088 | 1070 | dollarName :: Name
|
| 1089 | 1071 | dollarName = varQual gHC_INTERNAL_BASE (fsLit "$") dollarIdKey
|
| 1090 | 1072 | otherwiseIdName = varQual gHC_INTERNAL_BASE (fsLit "otherwise") otherwiseIdKey
|
| ... | ... | @@ -1092,7 +1074,6 @@ foldrName = varQual gHC_INTERNAL_BASE (fsLit "foldr") foldrIdKey |
| 1092 | 1074 | buildName = varQual gHC_INTERNAL_BASE (fsLit "build") buildIdKey
|
| 1093 | 1075 | augmentName = varQual gHC_INTERNAL_BASE (fsLit "augment") augmentIdKey
|
| 1094 | 1076 | mapName = varQual gHC_INTERNAL_BASE (fsLit "map") mapIdKey
|
| 1095 | -appendName = varQual gHC_INTERNAL_BASE (fsLit "++") appendIdKey
|
|
| 1096 | 1077 | assertName = varQual gHC_INTERNAL_BASE (fsLit "assert") assertIdKey
|
| 1097 | 1078 | fromStringName = varQual gHC_INTERNAL_DATA_STRING (fsLit "fromString") fromStringClassOpKey
|
| 1098 | 1079 | |
| ... | ... | @@ -1154,18 +1135,12 @@ integerFromNaturalName |
| 1154 | 1135 | , naturalQuotName
|
| 1155 | 1136 | , naturalRemName
|
| 1156 | 1137 | , naturalAndName
|
| 1157 | - , naturalAndNotName
|
|
| 1158 | 1138 | , naturalOrName
|
| 1159 | 1139 | , naturalXorName
|
| 1160 | 1140 | , naturalTestBitName
|
| 1161 | 1141 | , naturalBitName
|
| 1162 | 1142 | , naturalGcdName
|
| 1163 | 1143 | , naturalLcmName
|
| 1164 | - , naturalLog2Name
|
|
| 1165 | - , naturalLogBaseWordName
|
|
| 1166 | - , naturalLogBaseName
|
|
| 1167 | - , naturalPowModName
|
|
| 1168 | - , naturalSizeInBaseName
|
|
| 1169 | 1144 | , bignatEqName
|
| 1170 | 1145 | , bignatCompareName
|
| 1171 | 1146 | , bignatCompareWordName
|
| ... | ... | @@ -1194,18 +1169,12 @@ naturalQuotRemName = bnnVarQual "naturalQuotRem#" naturalQuotRe |
| 1194 | 1169 | naturalQuotName = bnnVarQual "naturalQuot" naturalQuotIdKey
|
| 1195 | 1170 | naturalRemName = bnnVarQual "naturalRem" naturalRemIdKey
|
| 1196 | 1171 | naturalAndName = bnnVarQual "naturalAnd" naturalAndIdKey
|
| 1197 | -naturalAndNotName = bnnVarQual "naturalAndNot" naturalAndNotIdKey
|
|
| 1198 | 1172 | naturalOrName = bnnVarQual "naturalOr" naturalOrIdKey
|
| 1199 | 1173 | naturalXorName = bnnVarQual "naturalXor" naturalXorIdKey
|
| 1200 | 1174 | naturalTestBitName = bnnVarQual "naturalTestBit#" naturalTestBitIdKey
|
| 1201 | 1175 | naturalBitName = bnnVarQual "naturalBit#" naturalBitIdKey
|
| 1202 | 1176 | naturalGcdName = bnnVarQual "naturalGcd" naturalGcdIdKey
|
| 1203 | 1177 | naturalLcmName = bnnVarQual "naturalLcm" naturalLcmIdKey
|
| 1204 | -naturalLog2Name = bnnVarQual "naturalLog2#" naturalLog2IdKey
|
|
| 1205 | -naturalLogBaseWordName = bnnVarQual "naturalLogBaseWord#" naturalLogBaseWordIdKey
|
|
| 1206 | -naturalLogBaseName = bnnVarQual "naturalLogBase#" naturalLogBaseIdKey
|
|
| 1207 | -naturalPowModName = bnnVarQual "naturalPowMod" naturalPowModIdKey
|
|
| 1208 | -naturalSizeInBaseName = bnnVarQual "naturalSizeInBase#" naturalSizeInBaseIdKey
|
|
| 1209 | 1178 | |
| 1210 | 1179 | integerFromNaturalName = bniVarQual "integerFromNatural" integerFromNaturalIdKey
|
| 1211 | 1180 | integerToNaturalClampName = bniVarQual "integerToNaturalClamp" integerToNaturalClampIdKey
|
| ... | ... | @@ -1276,12 +1245,9 @@ realFloatClassName = clsQual gHC_INTERNAL_FLOAT (fsLit "RealFloat") realFloatCla |
| 1276 | 1245 | |
| 1277 | 1246 | -- other GHC.Internal.Float functions
|
| 1278 | 1247 | integerToFloatName, integerToDoubleName,
|
| 1279 | - naturalToFloatName, naturalToDoubleName,
|
|
| 1280 | 1248 | rationalToFloatName, rationalToDoubleName :: Name
|
| 1281 | 1249 | integerToFloatName = varQual gHC_INTERNAL_FLOAT (fsLit "integerToFloat#") integerToFloatIdKey
|
| 1282 | 1250 | integerToDoubleName = varQual gHC_INTERNAL_FLOAT (fsLit "integerToDouble#") integerToDoubleIdKey
|
| 1283 | -naturalToFloatName = varQual gHC_INTERNAL_FLOAT (fsLit "naturalToFloat#") naturalToFloatIdKey
|
|
| 1284 | -naturalToDoubleName = varQual gHC_INTERNAL_FLOAT (fsLit "naturalToDouble#") naturalToDoubleIdKey
|
|
| 1285 | 1251 | rationalToFloatName = varQual gHC_INTERNAL_FLOAT (fsLit "rationalToFloat") rationalToFloatIdKey
|
| 1286 | 1252 | rationalToDoubleName = varQual gHC_INTERNAL_FLOAT (fsLit "rationalToDouble") rationalToDoubleIdKey
|
| 1287 | 1253 | |
| ... | ... | @@ -1292,17 +1258,13 @@ ixClassName = clsQual gHC_INTERNAL_IX (fsLit "Ix") ixClassKey |
| 1292 | 1258 | -- Typeable representation types
|
| 1293 | 1259 | trModuleTyConName
|
| 1294 | 1260 | , trModuleDataConName
|
| 1295 | - , trNameTyConName
|
|
| 1296 | 1261 | , trNameSDataConName
|
| 1297 | - , trNameDDataConName
|
|
| 1298 | 1262 | , trTyConTyConName
|
| 1299 | 1263 | , trTyConDataConName
|
| 1300 | 1264 | :: Name
|
| 1301 | 1265 | trModuleTyConName = tcQual gHC_TYPES (fsLit "Module") trModuleTyConKey
|
| 1302 | 1266 | trModuleDataConName = dcQual gHC_TYPES (fsLit "Module") trModuleDataConKey
|
| 1303 | -trNameTyConName = tcQual gHC_TYPES (fsLit "TrName") trNameTyConKey
|
|
| 1304 | 1267 | trNameSDataConName = dcQual gHC_TYPES (fsLit "TrNameS") trNameSDataConKey
|
| 1305 | -trNameDDataConName = dcQual gHC_TYPES (fsLit "TrNameD") trNameDDataConKey
|
|
| 1306 | 1268 | trTyConTyConName = tcQual gHC_TYPES (fsLit "TyCon") trTyConTyConKey
|
| 1307 | 1269 | trTyConDataConName = dcQual gHC_TYPES (fsLit "TyCon") trTyConDataConKey
|
| 1308 | 1270 | |
| ... | ... | @@ -1313,7 +1275,6 @@ kindRepTyConName |
| 1313 | 1275 | , kindRepFunDataConName
|
| 1314 | 1276 | , kindRepTYPEDataConName
|
| 1315 | 1277 | , kindRepTypeLitSDataConName
|
| 1316 | - , kindRepTypeLitDDataConName
|
|
| 1317 | 1278 | :: Name
|
| 1318 | 1279 | kindRepTyConName = tcQual gHC_TYPES (fsLit "KindRep") kindRepTyConKey
|
| 1319 | 1280 | kindRepTyConAppDataConName = dcQual gHC_TYPES (fsLit "KindRepTyConApp") kindRepTyConAppDataConKey
|
| ... | ... | @@ -1322,24 +1283,19 @@ kindRepAppDataConName = dcQual gHC_TYPES (fsLit "KindRepApp") kindR |
| 1322 | 1283 | kindRepFunDataConName = dcQual gHC_TYPES (fsLit "KindRepFun") kindRepFunDataConKey
|
| 1323 | 1284 | kindRepTYPEDataConName = dcQual gHC_TYPES (fsLit "KindRepTYPE") kindRepTYPEDataConKey
|
| 1324 | 1285 | kindRepTypeLitSDataConName = dcQual gHC_TYPES (fsLit "KindRepTypeLitS") kindRepTypeLitSDataConKey
|
| 1325 | -kindRepTypeLitDDataConName = dcQual gHC_TYPES (fsLit "KindRepTypeLitD") kindRepTypeLitDDataConKey
|
|
| 1326 | 1286 | |
| 1327 | -typeLitSortTyConName
|
|
| 1328 | - , typeLitSymbolDataConName
|
|
| 1287 | +typeLitSymbolDataConName
|
|
| 1329 | 1288 | , typeLitNatDataConName
|
| 1330 | 1289 | , typeLitCharDataConName
|
| 1331 | 1290 | :: Name
|
| 1332 | -typeLitSortTyConName = tcQual gHC_TYPES (fsLit "TypeLitSort") typeLitSortTyConKey
|
|
| 1333 | 1291 | typeLitSymbolDataConName = dcQual gHC_TYPES (fsLit "TypeLitSymbol") typeLitSymbolDataConKey
|
| 1334 | 1292 | typeLitNatDataConName = dcQual gHC_TYPES (fsLit "TypeLitNat") typeLitNatDataConKey
|
| 1335 | 1293 | typeLitCharDataConName = dcQual gHC_TYPES (fsLit "TypeLitChar") typeLitCharDataConKey
|
| 1336 | 1294 | |
| 1337 | 1295 | -- Class Typeable, and functions for constructing `Typeable` dictionaries
|
| 1338 | 1296 | typeableClassName
|
| 1339 | - , typeRepTyConName
|
|
| 1340 | 1297 | , someTypeRepTyConName
|
| 1341 | 1298 | , someTypeRepDataConName
|
| 1342 | - , mkTrTypeName
|
|
| 1343 | 1299 | , mkTrConName
|
| 1344 | 1300 | , mkTrAppCheckedName
|
| 1345 | 1301 | , mkTrFunName
|
| ... | ... | @@ -1350,11 +1306,9 @@ typeableClassName |
| 1350 | 1306 | , trGhcPrimModuleName
|
| 1351 | 1307 | :: Name
|
| 1352 | 1308 | typeableClassName = clsQual gHC_INTERNAL_TYPEABLE_INTERNAL (fsLit "Typeable") typeableClassKey
|
| 1353 | -typeRepTyConName = tcQual gHC_INTERNAL_TYPEABLE_INTERNAL (fsLit "TypeRep") typeRepTyConKey
|
|
| 1354 | 1309 | someTypeRepTyConName = tcQual gHC_INTERNAL_TYPEABLE_INTERNAL (fsLit "SomeTypeRep") someTypeRepTyConKey
|
| 1355 | 1310 | someTypeRepDataConName = dcQual gHC_INTERNAL_TYPEABLE_INTERNAL (fsLit "SomeTypeRep") someTypeRepDataConKey
|
| 1356 | 1311 | typeRepIdName = varQual gHC_INTERNAL_TYPEABLE_INTERNAL (fsLit "typeRep#") typeRepIdKey
|
| 1357 | -mkTrTypeName = varQual gHC_INTERNAL_TYPEABLE_INTERNAL (fsLit "mkTrType") mkTrTypeKey
|
|
| 1358 | 1312 | mkTrConName = varQual gHC_INTERNAL_TYPEABLE_INTERNAL (fsLit "mkTrCon") mkTrConKey
|
| 1359 | 1313 | mkTrAppCheckedName = varQual gHC_INTERNAL_TYPEABLE_INTERNAL (fsLit "mkTrAppChecked") mkTrAppCheckedKey
|
| 1360 | 1314 | mkTrFunName = varQual gHC_INTERNAL_TYPEABLE_INTERNAL (fsLit "mkTrFun") mkTrFunKey
|
| ... | ... | @@ -1452,12 +1406,6 @@ enumFromThenName = varQual gHC_INTERNAL_ENUM (fsLit "enumFromThen") enumFrom |
| 1452 | 1406 | enumFromThenToName = varQual gHC_INTERNAL_ENUM (fsLit "enumFromThenTo") enumFromThenToClassOpKey
|
| 1453 | 1407 | boundedClassName = clsQual gHC_INTERNAL_ENUM (fsLit "Bounded") boundedClassKey
|
| 1454 | 1408 | |
| 1455 | --- List functions
|
|
| 1456 | -concatName, filterName, zipName :: Name
|
|
| 1457 | -concatName = varQual gHC_INTERNAL_LIST (fsLit "concat") concatIdKey
|
|
| 1458 | -filterName = varQual gHC_INTERNAL_LIST (fsLit "filter") filterIdKey
|
|
| 1459 | -zipName = varQual gHC_INTERNAL_LIST (fsLit "zip") zipIdKey
|
|
| 1460 | - |
|
| 1461 | 1409 | -- Overloaded lists
|
| 1462 | 1410 | isListClassName, fromListName, fromListNName, toListName :: Name
|
| 1463 | 1411 | isListClassName = clsQual gHC_INTERNAL_IS_LIST (fsLit "IsList") isListClassKey
|
| ... | ... | @@ -1493,13 +1441,12 @@ ghciStepIoMName = varQual gHC_INTERNAL_GHCI (fsLit "ghciStepIO") ghciStepIoMClas |
| 1493 | 1441 | |
| 1494 | 1442 | -- IO things
|
| 1495 | 1443 | ioTyConName, ioDataConName,
|
| 1496 | - thenIOName, bindIOName, returnIOName, failIOName :: Name
|
|
| 1444 | + thenIOName, bindIOName, returnIOName :: Name
|
|
| 1497 | 1445 | ioTyConName = tcQual gHC_TYPES (fsLit "IO") ioTyConKey
|
| 1498 | 1446 | ioDataConName = dcQual gHC_TYPES (fsLit "IO") ioDataConKey
|
| 1499 | 1447 | thenIOName = varQual gHC_INTERNAL_BASE (fsLit "thenIO") thenIOIdKey
|
| 1500 | 1448 | bindIOName = varQual gHC_INTERNAL_BASE (fsLit "bindIO") bindIOIdKey
|
| 1501 | 1449 | returnIOName = varQual gHC_INTERNAL_BASE (fsLit "returnIO") returnIOIdKey
|
| 1502 | -failIOName = varQual gHC_INTERNAL_IO (fsLit "failIO") failIOIdKey
|
|
| 1503 | 1450 | |
| 1504 | 1451 | -- IO things
|
| 1505 | 1452 | printName :: Name
|
| ... | ... | @@ -1544,9 +1491,8 @@ choiceAName = varQual gHC_INTERNAL_ARROW (fsLit "|||") choiceAIdKey |
| 1544 | 1491 | loopAName = varQual gHC_INTERNAL_ARROW (fsLit "loop") loopAIdKey
|
| 1545 | 1492 | |
| 1546 | 1493 | -- Monad comprehensions
|
| 1547 | -guardMName, liftMName, mzipName :: Name
|
|
| 1494 | +guardMName, mzipName :: Name
|
|
| 1548 | 1495 | guardMName = varQual gHC_INTERNAL_MONAD (fsLit "guard") guardMIdKey
|
| 1549 | -liftMName = varQual gHC_INTERNAL_MONAD (fsLit "liftM") liftMIdKey
|
|
| 1550 | 1496 | mzipName = varQual gHC_INTERNAL_CONTROL_MONAD_ZIP (fsLit "mzip") mzipIdKey
|
| 1551 | 1497 | |
| 1552 | 1498 | |
| ... | ... | @@ -1634,10 +1580,6 @@ fromStaticPtrName :: Name |
| 1634 | 1580 | fromStaticPtrName =
|
| 1635 | 1581 | varQual gHC_INTERNAL_STATICPTR (fsLit "fromStaticPtr") fromStaticPtrClassOpKey
|
| 1636 | 1582 | |
| 1637 | -fingerprintDataConName :: Name
|
|
| 1638 | -fingerprintDataConName =
|
|
| 1639 | - dcQual gHC_INTERNAL_FINGERPRINT_TYPE (fsLit "Fingerprint") fingerprintDataConKey
|
|
| 1640 | - |
|
| 1641 | 1583 | constPtrConName :: Name
|
| 1642 | 1584 | constPtrConName =
|
| 1643 | 1585 | tcQual gHC_INTERNAL_FOREIGN_C_CONSTPTR (fsLit "ConstPtr") constPtrTyConKey
|
| ... | ... | @@ -1915,13 +1857,11 @@ pluginTyConKey, frontendPluginTyConKey :: Unique |
| 1915 | 1857 | pluginTyConKey = mkPreludeTyConUnique 102
|
| 1916 | 1858 | frontendPluginTyConKey = mkPreludeTyConUnique 103
|
| 1917 | 1859 | |
| 1918 | -trTyConTyConKey, trModuleTyConKey, trNameTyConKey,
|
|
| 1919 | - kindRepTyConKey, typeLitSortTyConKey :: Unique
|
|
| 1860 | +trTyConTyConKey, trModuleTyConKey,
|
|
| 1861 | + kindRepTyConKey :: Unique
|
|
| 1920 | 1862 | trTyConTyConKey = mkPreludeTyConUnique 104
|
| 1921 | 1863 | trModuleTyConKey = mkPreludeTyConUnique 105
|
| 1922 | -trNameTyConKey = mkPreludeTyConUnique 106
|
|
| 1923 | 1864 | kindRepTyConKey = mkPreludeTyConUnique 107
|
| 1924 | -typeLitSortTyConKey = mkPreludeTyConUnique 108
|
|
| 1925 | 1865 | |
| 1926 | 1866 | -- Generics (Unique keys)
|
| 1927 | 1867 | v1TyConKey, u1TyConKey, par1TyConKey, rec1TyConKey,
|
| ... | ... | @@ -1990,8 +1930,7 @@ callStackTyConKey :: Unique |
| 1990 | 1930 | callStackTyConKey = mkPreludeTyConUnique 191
|
| 1991 | 1931 | |
| 1992 | 1932 | -- Typeables
|
| 1993 | -typeRepTyConKey, someTypeRepTyConKey, someTypeRepDataConKey :: Unique
|
|
| 1994 | -typeRepTyConKey = mkPreludeTyConUnique 192
|
|
| 1933 | +someTypeRepTyConKey, someTypeRepDataConKey :: Unique
|
|
| 1995 | 1934 | someTypeRepTyConKey = mkPreludeTyConUnique 193
|
| 1996 | 1935 | someTypeRepDataConKey = mkPreludeTyConUnique 194
|
| 1997 | 1936 | |
| ... | ... | @@ -2123,19 +2062,15 @@ staticPtrDataConKey = mkPreludeDataConUnique 33 |
| 2123 | 2062 | staticPtrInfoDataConKey :: Unique
|
| 2124 | 2063 | staticPtrInfoDataConKey = mkPreludeDataConUnique 34
|
| 2125 | 2064 | |
| 2126 | -fingerprintDataConKey :: Unique
|
|
| 2127 | -fingerprintDataConKey = mkPreludeDataConUnique 35
|
|
| 2128 | - |
|
| 2129 | 2065 | srcLocDataConKey :: Unique
|
| 2130 | 2066 | srcLocDataConKey = mkPreludeDataConUnique 37
|
| 2131 | 2067 | |
| 2132 | 2068 | trTyConDataConKey, trModuleDataConKey,
|
| 2133 | - trNameSDataConKey, trNameDDataConKey,
|
|
| 2069 | + trNameSDataConKey,
|
|
| 2134 | 2070 | trGhcPrimModuleKey :: Unique
|
| 2135 | 2071 | trTyConDataConKey = mkPreludeDataConUnique 41
|
| 2136 | 2072 | trModuleDataConKey = mkPreludeDataConUnique 43
|
| 2137 | 2073 | trNameSDataConKey = mkPreludeDataConUnique 45
|
| 2138 | -trNameDDataConKey = mkPreludeDataConUnique 46
|
|
| 2139 | 2074 | trGhcPrimModuleKey = mkPreludeDataConUnique 47
|
| 2140 | 2075 | |
| 2141 | 2076 | typeErrorTextDataConKey,
|
| ... | ... | @@ -2210,7 +2145,7 @@ vecElemDataConKeys = map mkPreludeDataConUnique [96..105] |
| 2210 | 2145 | -- Typeable things
|
| 2211 | 2146 | kindRepTyConAppDataConKey, kindRepVarDataConKey, kindRepAppDataConKey,
|
| 2212 | 2147 | kindRepFunDataConKey, kindRepTYPEDataConKey,
|
| 2213 | - kindRepTypeLitSDataConKey, kindRepTypeLitDDataConKey
|
|
| 2148 | + kindRepTypeLitSDataConKey
|
|
| 2214 | 2149 | :: Unique
|
| 2215 | 2150 | kindRepTyConAppDataConKey = mkPreludeDataConUnique 106
|
| 2216 | 2151 | kindRepVarDataConKey = mkPreludeDataConUnique 107
|
| ... | ... | @@ -2218,7 +2153,6 @@ kindRepAppDataConKey = mkPreludeDataConUnique 108 |
| 2218 | 2153 | kindRepFunDataConKey = mkPreludeDataConUnique 109
|
| 2219 | 2154 | kindRepTYPEDataConKey = mkPreludeDataConUnique 110
|
| 2220 | 2155 | kindRepTypeLitSDataConKey = mkPreludeDataConUnique 111
|
| 2221 | -kindRepTypeLitDDataConKey = mkPreludeDataConUnique 112
|
|
| 2222 | 2156 | |
| 2223 | 2157 | typeLitSymbolDataConKey, typeLitNatDataConKey, typeLitCharDataConKey :: Unique
|
| 2224 | 2158 | typeLitSymbolDataConKey = mkPreludeDataConUnique 113
|
| ... | ... | @@ -2258,7 +2192,7 @@ naturalNBDataConKey = mkPreludeDataConUnique 124 |
| 2258 | 2192 | ************************************************************************
|
| 2259 | 2193 | -}
|
| 2260 | 2194 | |
| 2261 | -wildCardKey, absentErrorIdKey, absentConstraintErrorIdKey, augmentIdKey, appendIdKey,
|
|
| 2195 | +wildCardKey, absentErrorIdKey, absentConstraintErrorIdKey, augmentIdKey,
|
|
| 2262 | 2196 | buildIdKey, foldrIdKey, recSelErrorIdKey,
|
| 2263 | 2197 | seqIdKey, eqStringIdKey,
|
| 2264 | 2198 | noMethodBindingErrorIdKey, nonExhaustiveGuardsErrorIdKey,
|
| ... | ... | @@ -2275,7 +2209,6 @@ wildCardKey = mkPreludeMiscIdUnique 0 -- See Note [WildCard |
| 2275 | 2209 | absentErrorIdKey = mkPreludeMiscIdUnique 1
|
| 2276 | 2210 | absentConstraintErrorIdKey = mkPreludeMiscIdUnique 2
|
| 2277 | 2211 | augmentIdKey = mkPreludeMiscIdUnique 3
|
| 2278 | -appendIdKey = mkPreludeMiscIdUnique 4
|
|
| 2279 | 2212 | buildIdKey = mkPreludeMiscIdUnique 5
|
| 2280 | 2213 | foldrIdKey = mkPreludeMiscIdUnique 6
|
| 2281 | 2214 | recSelErrorIdKey = mkPreludeMiscIdUnique 7
|
| ... | ... | @@ -2304,18 +2237,13 @@ divIntIdKey = mkPreludeMiscIdUnique 26 |
| 2304 | 2237 | modIntIdKey = mkPreludeMiscIdUnique 27
|
| 2305 | 2238 | cstringLengthIdKey = mkPreludeMiscIdUnique 28
|
| 2306 | 2239 | |
| 2307 | -concatIdKey, filterIdKey, zipIdKey,
|
|
| 2308 | - bindIOIdKey, returnIOIdKey, newStablePtrIdKey,
|
|
| 2309 | - printIdKey, failIOIdKey, nullAddrIdKey, voidArgIdKey,
|
|
| 2240 | +bindIOIdKey, returnIOIdKey, newStablePtrIdKey,
|
|
| 2241 | + printIdKey, nullAddrIdKey, voidArgIdKey,
|
|
| 2310 | 2242 | otherwiseIdKey, assertIdKey :: Unique
|
| 2311 | -concatIdKey = mkPreludeMiscIdUnique 31
|
|
| 2312 | -filterIdKey = mkPreludeMiscIdUnique 32
|
|
| 2313 | -zipIdKey = mkPreludeMiscIdUnique 33
|
|
| 2314 | 2243 | bindIOIdKey = mkPreludeMiscIdUnique 34
|
| 2315 | 2244 | returnIOIdKey = mkPreludeMiscIdUnique 35
|
| 2316 | 2245 | newStablePtrIdKey = mkPreludeMiscIdUnique 36
|
| 2317 | 2246 | printIdKey = mkPreludeMiscIdUnique 37
|
| 2318 | -failIOIdKey = mkPreludeMiscIdUnique 38
|
|
| 2319 | 2247 | nullAddrIdKey = mkPreludeMiscIdUnique 39
|
| 2320 | 2248 | voidArgIdKey = mkPreludeMiscIdUnique 40
|
| 2321 | 2249 | otherwiseIdKey = mkPreludeMiscIdUnique 43
|
| ... | ... | @@ -2354,11 +2282,9 @@ considerAccessibleIdKey = mkPreludeMiscIdUnique 125 |
| 2354 | 2282 | noinlineIdKey = mkPreludeMiscIdUnique 126
|
| 2355 | 2283 | noinlineConstraintIdKey = mkPreludeMiscIdUnique 127
|
| 2356 | 2284 | |
| 2357 | -integerToFloatIdKey, integerToDoubleIdKey, naturalToFloatIdKey, naturalToDoubleIdKey :: Unique
|
|
| 2285 | +integerToFloatIdKey, integerToDoubleIdKey :: Unique
|
|
| 2358 | 2286 | integerToFloatIdKey = mkPreludeMiscIdUnique 128
|
| 2359 | 2287 | integerToDoubleIdKey = mkPreludeMiscIdUnique 129
|
| 2360 | -naturalToFloatIdKey = mkPreludeMiscIdUnique 130
|
|
| 2361 | -naturalToDoubleIdKey = mkPreludeMiscIdUnique 131
|
|
| 2362 | 2288 | |
| 2363 | 2289 | rationalToFloatIdKey, rationalToDoubleIdKey :: Unique
|
| 2364 | 2290 | rationalToFloatIdKey = mkPreludeMiscIdUnique 132
|
| ... | ... | @@ -2436,9 +2362,8 @@ toIntegerClassOpKey = mkPreludeMiscIdUnique 192 |
| 2436 | 2362 | toRationalClassOpKey = mkPreludeMiscIdUnique 193
|
| 2437 | 2363 | |
| 2438 | 2364 | -- Monad comprehensions
|
| 2439 | -guardMIdKey, liftMIdKey, mzipIdKey :: Unique
|
|
| 2365 | +guardMIdKey, mzipIdKey :: Unique
|
|
| 2440 | 2366 | guardMIdKey = mkPreludeMiscIdUnique 194
|
| 2441 | -liftMIdKey = mkPreludeMiscIdUnique 195
|
|
| 2442 | 2367 | mzipIdKey = mkPreludeMiscIdUnique 196
|
| 2443 | 2368 | |
| 2444 | 2369 | -- GHCi
|
| ... | ... | @@ -2461,7 +2386,6 @@ proxyHashKey = mkPreludeMiscIdUnique 502 |
| 2461 | 2386 | |
| 2462 | 2387 | -- Used to make `Typeable` dictionaries
|
| 2463 | 2388 | mkTyConKey
|
| 2464 | - , mkTrTypeKey
|
|
| 2465 | 2389 | , mkTrConKey
|
| 2466 | 2390 | , mkTrAppCheckedKey
|
| 2467 | 2391 | , mkTrFunKey
|
| ... | ... | @@ -2471,7 +2395,6 @@ mkTyConKey |
| 2471 | 2395 | , typeRepIdKey
|
| 2472 | 2396 | :: Unique
|
| 2473 | 2397 | mkTyConKey = mkPreludeMiscIdUnique 503
|
| 2474 | -mkTrTypeKey = mkPreludeMiscIdUnique 504
|
|
| 2475 | 2398 | mkTrConKey = mkPreludeMiscIdUnique 505
|
| 2476 | 2399 | mkTrAppCheckedKey = mkPreludeMiscIdUnique 506
|
| 2477 | 2400 | typeNatTypeRepKey = mkPreludeMiscIdUnique 507
|
| ... | ... | @@ -2584,18 +2507,12 @@ integerFromNaturalIdKey |
| 2584 | 2507 | , naturalQuotIdKey
|
| 2585 | 2508 | , naturalRemIdKey
|
| 2586 | 2509 | , naturalAndIdKey
|
| 2587 | - , naturalAndNotIdKey
|
|
| 2588 | 2510 | , naturalOrIdKey
|
| 2589 | 2511 | , naturalXorIdKey
|
| 2590 | 2512 | , naturalTestBitIdKey
|
| 2591 | 2513 | , naturalBitIdKey
|
| 2592 | 2514 | , naturalGcdIdKey
|
| 2593 | 2515 | , naturalLcmIdKey
|
| 2594 | - , naturalLog2IdKey
|
|
| 2595 | - , naturalLogBaseWordIdKey
|
|
| 2596 | - , naturalLogBaseIdKey
|
|
| 2597 | - , naturalPowModIdKey
|
|
| 2598 | - , naturalSizeInBaseIdKey
|
|
| 2599 | 2516 | , bignatEqIdKey
|
| 2600 | 2517 | , bignatCompareIdKey
|
| 2601 | 2518 | , bignatCompareWordIdKey
|
| ... | ... | @@ -2650,18 +2567,12 @@ naturalQuotRemIdKey = mkPreludeMiscIdUnique 669 |
| 2650 | 2567 | naturalQuotIdKey = mkPreludeMiscIdUnique 670
|
| 2651 | 2568 | naturalRemIdKey = mkPreludeMiscIdUnique 671
|
| 2652 | 2569 | naturalAndIdKey = mkPreludeMiscIdUnique 672
|
| 2653 | -naturalAndNotIdKey = mkPreludeMiscIdUnique 673
|
|
| 2654 | 2570 | naturalOrIdKey = mkPreludeMiscIdUnique 674
|
| 2655 | 2571 | naturalXorIdKey = mkPreludeMiscIdUnique 675
|
| 2656 | 2572 | naturalTestBitIdKey = mkPreludeMiscIdUnique 676
|
| 2657 | 2573 | naturalBitIdKey = mkPreludeMiscIdUnique 677
|
| 2658 | 2574 | naturalGcdIdKey = mkPreludeMiscIdUnique 678
|
| 2659 | 2575 | naturalLcmIdKey = mkPreludeMiscIdUnique 679
|
| 2660 | -naturalLog2IdKey = mkPreludeMiscIdUnique 680
|
|
| 2661 | -naturalLogBaseWordIdKey = mkPreludeMiscIdUnique 681
|
|
| 2662 | -naturalLogBaseIdKey = mkPreludeMiscIdUnique 682
|
|
| 2663 | -naturalPowModIdKey = mkPreludeMiscIdUnique 683
|
|
| 2664 | -naturalSizeInBaseIdKey = mkPreludeMiscIdUnique 684
|
|
| 2665 | 2576 | |
| 2666 | 2577 | bignatEqIdKey = mkPreludeMiscIdUnique 691
|
| 2667 | 2578 | bignatCompareIdKey = mkPreludeMiscIdUnique 692
|
| ... | ... | @@ -19,6 +19,7 @@ import Data.Char (chr, ord) |
| 19 | 19 | import qualified Data.Foldable1 as Foldable1
|
| 20 | 20 | import qualified Data.List.NonEmpty as NonEmpty
|
| 21 | 21 | import Data.Maybe (listToMaybe, mapMaybe)
|
| 22 | +import GHC.Data.OrdList (fromOL, nilOL, snocOL)
|
|
| 22 | 23 | import GHC.Data.StringBuffer (StringBuffer)
|
| 23 | 24 | import qualified GHC.Data.StringBuffer as StringBuffer
|
| 24 | 25 | import GHC.Parser.CharClass (
|
| ... | ... | @@ -167,16 +168,16 @@ collapseGaps = go |
| 167 | 168 | [] -> panic "gap unexpectedly ended"
|
| 168 | 169 | |
| 169 | 170 | resolveEscapes :: HasChar c => [c] -> Either (c, LexErr) [c]
|
| 170 | -resolveEscapes = go dlistEmpty
|
|
| 171 | +resolveEscapes = go nilOL
|
|
| 171 | 172 | where
|
| 172 | 173 | go !acc = \case
|
| 173 | - [] -> pure $ dlistToList acc
|
|
| 174 | + [] -> pure $ fromOL acc
|
|
| 174 | 175 | Char '\\' : Char '&' : cs -> go acc cs
|
| 175 | 176 | backslash@(Char '\\') : cs ->
|
| 176 | 177 | case resolveEscapeChar cs of
|
| 177 | - Right (esc, cs') -> go (acc `dlistSnoc` setChar esc backslash) cs'
|
|
| 178 | + Right (esc, cs') -> go (acc `snocOL` setChar esc backslash) cs'
|
|
| 178 | 179 | Left (c, e) -> Left (c, e)
|
| 179 | - c : cs -> go (acc `dlistSnoc` c) cs
|
|
| 180 | + c : cs -> go (acc `snocOL` c) cs
|
|
| 180 | 181 | |
| 181 | 182 | -- -----------------------------------------------------------------------------
|
| 182 | 183 | -- Escape characters
|
| ... | ... | @@ -420,17 +421,3 @@ It's more precisely defined with the following algorithm: |
| 420 | 421 | * Lines with only whitespace characters
|
| 421 | 422 | 3. Calculate the longest prefix of whitespace shared by all lines in the remaining list
|
| 422 | 423 | -} |
| 423 | - |
|
| 424 | --- -----------------------------------------------------------------------------
|
|
| 425 | --- DList
|
|
| 426 | - |
|
| 427 | -newtype DList a = DList ([a] -> [a])
|
|
| 428 | - |
|
| 429 | -dlistEmpty :: DList a
|
|
| 430 | -dlistEmpty = DList id
|
|
| 431 | - |
|
| 432 | -dlistToList :: DList a -> [a]
|
|
| 433 | -dlistToList (DList f) = f []
|
|
| 434 | - |
|
| 435 | -dlistSnoc :: DList a -> a -> DList a
|
|
| 436 | -dlistSnoc (DList f) x = DList (f . (x :)) |
| ... | ... | @@ -11,6 +11,7 @@ import GHC.IO (unsafePerformIO) |
| 11 | 11 | #endif
|
| 12 | 12 | |
| 13 | 13 | import Data.Char
|
| 14 | +import Data.Foldable
|
|
| 14 | 15 | import GHC.Prelude
|
| 15 | 16 | import GHC.Platform
|
| 16 | 17 | import GHC.Types.SrcLoc (pprUserRealSpan, srcSpanFile)
|
| ... | ... | @@ -18,6 +19,7 @@ import GHC.Types.Unique.DSM |
| 18 | 19 | import GHC.Unit.Module
|
| 19 | 20 | import GHC.Utils.Outputable
|
| 20 | 21 | import GHC.Data.FastString (fastStringToShortText, unpackFS, LexicalFastString(..))
|
| 22 | +import GHC.Data.OrdList (OrdList, nilOL, snocOL)
|
|
| 21 | 23 | |
| 22 | 24 | import GHC.Cmm
|
| 23 | 25 | import GHC.Cmm.CLabel
|
| ... | ... | @@ -286,7 +288,7 @@ data CgInfoProvEnt = CgInfoProvEnt |
| 286 | 288 | , ipeSrcSpan :: !StrTabOffset
|
| 287 | 289 | }
|
| 288 | 290 | |
| 289 | -data StringTable = StringTable { stStrings :: DList ShortText
|
|
| 291 | +data StringTable = StringTable { stStrings :: !(OrdList ShortText)
|
|
| 290 | 292 | , stLength :: !Int
|
| 291 | 293 | , stLookup :: !(M.Map ShortText StrTabOffset)
|
| 292 | 294 | }
|
| ... | ... | @@ -295,7 +297,7 @@ type StrTabOffset = Word32 |
| 295 | 297 | |
| 296 | 298 | emptyStringTable :: StringTable
|
| 297 | 299 | emptyStringTable =
|
| 298 | - StringTable { stStrings = emptyDList
|
|
| 300 | + StringTable { stStrings = nilOL
|
|
| 299 | 301 | , stLength = 0
|
| 300 | 302 | , stLookup = M.empty
|
| 301 | 303 | }
|
| ... | ... | @@ -303,7 +305,7 @@ emptyStringTable = |
| 303 | 305 | getStringTableStrings :: StringTable -> BS.ByteString
|
| 304 | 306 | getStringTableStrings st =
|
| 305 | 307 | BSL.toStrict $ BSB.toLazyByteString
|
| 306 | - $ foldMap f $ dlistToList (stStrings st)
|
|
| 308 | + $ foldMap' f $ stStrings st
|
|
| 307 | 309 | where
|
| 308 | 310 | f x = BSB.shortByteString (ST.contents x) `mappend` BSB.word8 0
|
| 309 | 311 | |
| ... | ... | @@ -312,7 +314,7 @@ lookupStringTable str = state $ \st -> |
| 312 | 314 | case M.lookup str (stLookup st) of
|
| 313 | 315 | Just off -> (off, st)
|
| 314 | 316 | Nothing ->
|
| 315 | - let !st' = st { stStrings = stStrings st `snoc` str
|
|
| 317 | + let !st' = st { stStrings = stStrings st `snocOL` str
|
|
| 316 | 318 | , stLength = stLength st + ST.byteLength str + 1
|
| 317 | 319 | , stLookup = M.insert str res (stLookup st)
|
| 318 | 320 | }
|
| ... | ... | @@ -359,14 +361,3 @@ foreign import ccall unsafe "ZSTD_compressBound" |
| 359 | 361 | |
| 360 | 362 | defaultCompressionLevel :: Int
|
| 361 | 363 | defaultCompressionLevel = 3 |
| 362 | - |
|
| 363 | -newtype DList a = DList ([a] -> [a])
|
|
| 364 | - |
|
| 365 | -emptyDList :: DList a
|
|
| 366 | -emptyDList = DList id
|
|
| 367 | - |
|
| 368 | -snoc :: DList a -> a -> DList a
|
|
| 369 | -snoc (DList f) x = DList (f . (x:))
|
|
| 370 | - |
|
| 371 | -dlistToList :: DList a -> [a]
|
|
| 372 | -dlistToList (DList f) = f [] |
| ... | ... | @@ -249,10 +249,6 @@ The supported transformers are listed below: |
| 249 | 249 | <tr>
|
| 250 | 250 | <td><code>profiled_ghc</code></td>
|
| 251 | 251 | <td>Build the GHC executable with cost-centre profiling support.
|
| 252 | - It is recommended that you use this in conjunction with `no_dynamic_ghc` since
|
|
| 253 | - GHC does not support loading of profiled libraries with the
|
|
| 254 | - dynamic linker. You should use a flavour that builds profiling libs and rts,
|
|
| 255 | - i.e. not <code>quick</code>. <br>
|
|
| 256 | 252 | This flag adds cost centres with the -fprof-late flag.</td>
|
| 257 | 253 | </tr>
|
| 258 | 254 | <tr>
|
| ... | ... | @@ -274,6 +270,10 @@ The supported transformers are listed below: |
| 274 | 270 | <td><code>text_simdutf</code></td>
|
| 275 | 271 | <td>Enable building the <code>text</code> package with <code>simdutf</code> support.</td>
|
| 276 | 272 | </tr>
|
| 273 | + <tr>
|
|
| 274 | + <td><code>with_profiled_libs</code></td>
|
|
| 275 | + <td>Enables building of stage1+ libraries and the RTS in profiled build ways (the opposite of <code>no_profiled_libs</code>).</td>
|
|
| 276 | + </tr>
|
|
| 277 | 277 | <tr>
|
| 278 | 278 | <td><code>no_profiled_libs</code></td>
|
| 279 | 279 | <td>Disables building of libraries in profiled build ways.</td>
|
| ... | ... | @@ -15,6 +15,7 @@ module Flavour |
| 15 | 15 | , enableProfiledGhc
|
| 16 | 16 | , disableDynamicGhcPrograms
|
| 17 | 17 | , disableDynamicLibs
|
| 18 | + , enableProfiledLibs
|
|
| 18 | 19 | , disableProfiledLibs
|
| 19 | 20 | , enableLinting
|
| 20 | 21 | , enableHaddock
|
| ... | ... | @@ -62,6 +63,7 @@ flavourTransformers = M.fromList |
| 62 | 63 | , "no_dynamic_libs" =: disableDynamicLibs
|
| 63 | 64 | , "native_bignum" =: useNativeBignum
|
| 64 | 65 | , "text_simdutf" =: enableTextWithSIMDUTF
|
| 66 | + , "with_profiled_libs" =: enableProfiledLibs
|
|
| 65 | 67 | , "no_profiled_libs" =: disableProfiledLibs
|
| 66 | 68 | , "omit_pragmas" =: omitPragmas
|
| 67 | 69 | , "ipe" =: enableIPE
|
| ... | ... | @@ -169,6 +171,7 @@ enableDebugInfo :: Flavour -> Flavour |
| 169 | 171 | enableDebugInfo = addArgs $ notStage0 ? mconcat
|
| 170 | 172 | [ builder (Ghc CompileHs) ? pure ["-g3"]
|
| 171 | 173 | , builder (Ghc CompileCWithGhc) ? pure ["-optc-g3"]
|
| 174 | + , builder (Ghc CompileCppWithGhc) ? pure ["-optcxx-g3"]
|
|
| 172 | 175 | , builder (Cc CompileC) ? arg "-g3"
|
| 173 | 176 | , builder (Cabal Setup) ? arg "--disable-library-stripping"
|
| 174 | 177 | , builder (Cabal Setup) ? arg "--disable-executable-stripping"
|
| ... | ... | @@ -307,29 +310,11 @@ enableUBSan = |
| 307 | 310 | viaLlvmBackend :: Flavour -> Flavour
|
| 308 | 311 | viaLlvmBackend = addArgs $ notStage0 ? builder Ghc ? arg "-fllvm"
|
| 309 | 312 | |
| 310 | --- | Build the GHC executable with profiling enabled in stages 2 and later. It
|
|
| 311 | --- is also recommended that you use this with @'dynamicGhcPrograms' = False@
|
|
| 312 | --- since GHC does not support loading of profiled libraries with the
|
|
| 313 | --- dynamically-linker.
|
|
| 313 | +-- | Build the GHC executable with profiling enabled in stages 2 and
|
|
| 314 | +-- later.
|
|
| 314 | 315 | enableProfiledGhc :: Flavour -> Flavour
|
| 315 | 316 | enableProfiledGhc flavour =
|
| 316 | - enableLateCCS flavour
|
|
| 317 | - { rtsWays = do
|
|
| 318 | - ws <- rtsWays flavour
|
|
| 319 | - mconcat
|
|
| 320 | - [ pure ws
|
|
| 321 | - , buildingCompilerStage' (>= Stage2) ? pure (foldMap profiled_ways ws)
|
|
| 322 | - ]
|
|
| 323 | - , libraryWays = mconcat
|
|
| 324 | - [ libraryWays flavour
|
|
| 325 | - , buildingCompilerStage' (>= Stage2) ? pure (Set.singleton profiling)
|
|
| 326 | - ]
|
|
| 327 | - , ghcProfiled = (>= Stage2)
|
|
| 328 | - }
|
|
| 329 | - where
|
|
| 330 | - profiled_ways w
|
|
| 331 | - | wayUnit Dynamic w = Set.empty
|
|
| 332 | - | otherwise = Set.singleton (w <> profiling)
|
|
| 317 | + enableLateCCS $ enableProfiledLibs flavour { ghcProfiled = (>= Stage2) }
|
|
| 333 | 318 | |
| 334 | 319 | -- | Disable 'dynamicGhcPrograms'.
|
| 335 | 320 | disableDynamicGhcPrograms :: Flavour -> Flavour
|
| ... | ... | @@ -346,6 +331,20 @@ disableDynamicLibs flavour = |
| 346 | 331 | prune :: Ways -> Ways
|
| 347 | 332 | prune = fmap $ Set.filter (not . wayUnit Dynamic)
|
| 348 | 333 | |
| 334 | +-- | Build libraries and the RTS in profiled ways (opposite of
|
|
| 335 | +-- 'disableProfiledLibs').
|
|
| 336 | +enableProfiledLibs :: Flavour -> Flavour
|
|
| 337 | +enableProfiledLibs flavour =
|
|
| 338 | + flavour
|
|
| 339 | + { libraryWays = addProfilingWays $ libraryWays flavour,
|
|
| 340 | + rtsWays = addProfilingWays $ rtsWays flavour
|
|
| 341 | + }
|
|
| 342 | + where
|
|
| 343 | + addProfilingWays :: Ways -> Ways
|
|
| 344 | + addProfilingWays ways = do
|
|
| 345 | + ws <- ways
|
|
| 346 | + buildProfiled <- notStage0
|
|
| 347 | + pure $ if buildProfiled then ws <> Set.map (<> profiling) ws else ws
|
|
| 349 | 348 | |
| 350 | 349 | -- | Don't build libraries in profiled 'Way's.
|
| 351 | 350 | disableProfiledLibs :: Flavour -> Flavour
|
| ... | ... | @@ -351,7 +351,7 @@ rtsPackageArgs = package rts ? do |
| 351 | 351 | , Debug `wayUnit` way ? pure [ "-DDEBUG"
|
| 352 | 352 | , "-fno-omit-frame-pointer"
|
| 353 | 353 | , "-g3"
|
| 354 | - , "-O0" ]
|
|
| 354 | + , "-Og" ]
|
|
| 355 | 355 | -- Set the namespace for the rts fs functions
|
| 356 | 356 | , arg $ "-DFS_NAMESPACE=rts"
|
| 357 | 357 |
| ... | ... | @@ -480,7 +480,7 @@ hIsOpen handle = |
| 480 | 480 | SemiClosedHandle -> return False
|
| 481 | 481 | _ -> return True
|
| 482 | 482 | |
| 483 | --- | @'hIsOpen' hdl@ returns whether the handle is closed.
|
|
| 483 | +-- | @'hIsClosed' hdl@ returns whether the handle is closed.
|
|
| 484 | 484 | -- If the 'haType' of @hdl@ is 'ClosedHandle' this returns 'True'
|
| 485 | 485 | -- and 'False' otherwise.
|
| 486 | 486 | hIsClosed :: Handle -> IO Bool
|
| ... | ... | @@ -75,7 +75,7 @@ static void sortInitFiniList(struct InitFiniList **slist, enum SortOrder order) |
| 75 | 75 | while (*last != NULL && (*last)->next != NULL) {
|
| 76 | 76 | struct InitFiniList *s0 = *last;
|
| 77 | 77 | struct InitFiniList *s1 = s0->next;
|
| 78 | - bool flip;
|
|
| 78 | + bool flip = false;
|
|
| 79 | 79 | switch (order) {
|
| 80 | 80 | case INCREASING: flip = s0->priority > s1->priority; break;
|
| 81 | 81 | case DECREASING: flip = s0->priority < s1->priority; break;
|
| ... | ... | @@ -692,7 +692,7 @@ checkCompactObjects(bdescr *bd) |
| 692 | 692 | ASSERT((W_)str == (W_)block + sizeof(StgCompactNFDataBlock));
|
| 693 | 693 | |
| 694 | 694 | StgWord totalW = 0;
|
| 695 | - StgCompactNFDataBlock *last;
|
|
| 695 | + StgCompactNFDataBlock *last = block;
|
|
| 696 | 696 | for ( ; block ; block = block->next) {
|
| 697 | 697 | last = block;
|
| 698 | 698 | ASSERT(block->owner == str);
|
| ... | ... | @@ -74,8 +74,6 @@ holes.hs:11:15: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)] |
| 74 | 74 | putStrLn :: String -> IO ()
|
| 75 | 75 | readFile :: FilePath -> IO String
|
| 76 | 76 | writeFile :: FilePath -> String -> IO ()
|
| 77 | - (++) :: forall a. [a] -> [a] -> [a]
|
|
| 78 | - filter :: forall a. (a -> Bool) -> [a] -> [a]
|
|
| 79 | 77 | fromInteger :: forall a. Num a => Integer -> a
|
| 80 | 78 | (-) :: forall a. Num a => a -> a -> a
|
| 81 | 79 | fromRational :: forall a. Fractional a => Rational -> a
|
| ... | ... | @@ -87,6 +85,7 @@ holes.hs:11:15: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)] |
| 87 | 85 | Nothing :: forall a. Maybe a
|
| 88 | 86 | Just :: forall a. a -> Maybe a
|
| 89 | 87 | [] :: forall a. [a]
|
| 88 | + (++) :: forall a. [a] -> [a] -> [a]
|
|
| 90 | 89 | asTypeOf :: forall a. a -> a -> a
|
| 91 | 90 | id :: forall a. a -> a
|
| 92 | 91 | until :: forall a. (a -> Bool) -> (a -> a) -> a -> a
|
| ... | ... | @@ -102,6 +101,7 @@ holes.hs:11:15: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)] |
| 102 | 101 | [a] -> [a]
|
| 103 | 102 | drop :: forall a. Int -> [a] -> [a]
|
| 104 | 103 | dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
|
| 104 | + filter :: forall a. (a -> Bool) -> [a] -> [a]
|
|
| 105 | 105 | head :: forall a. GHC.Internal.Stack.Types.HasCallStack => [a] -> a
|
| 106 | 106 | init :: forall a.
|
| 107 | 107 | GHC.Internal.Stack.Types.HasCallStack =>
|
| ... | ... | @@ -171,7 +171,6 @@ holes.hs:11:15: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)] |
| 171 | 171 | quot :: forall a. Integral a => a -> a -> a
|
| 172 | 172 | quotRem :: forall a. Integral a => a -> a -> (a, a)
|
| 173 | 173 | rem :: forall a. Integral a => a -> a -> a
|
| 174 | - zip :: forall a b. [a] -> [b] -> [(a, b)]
|
|
| 175 | 174 | map :: forall a b. (a -> b) -> [a] -> [b]
|
| 176 | 175 | realToFrac :: forall a b. (Real a, Fractional b) => a -> b
|
| 177 | 176 | Left :: forall a b. a -> Either a b
|
| ... | ... | @@ -184,6 +183,7 @@ holes.hs:11:15: warning: [GHC-88464] [-Wtyped-holes (in -Wdefault)] |
| 184 | 183 | scanl :: forall b a. (b -> a -> b) -> b -> [a] -> [b]
|
| 185 | 184 | scanr :: forall a b. (a -> b -> b) -> b -> [a] -> [b]
|
| 186 | 185 | unzip :: forall a b. [(a, b)] -> ([a], [b])
|
| 186 | + zip :: forall a b. [a] -> [b] -> [(a, b)]
|
|
| 187 | 187 | (^^) :: forall a b. (Fractional a, Integral b) => a -> b -> a
|
| 188 | 188 | ceiling :: forall a b. (RealFrac a, Integral b) => a -> b
|
| 189 | 189 | floor :: forall a b. (RealFrac a, Integral b) => a -> b
|
| ... | ... | @@ -77,8 +77,6 @@ holes3.hs:11:15: error: [GHC-88464] |
| 77 | 77 | putStrLn :: String -> IO ()
|
| 78 | 78 | readFile :: FilePath -> IO String
|
| 79 | 79 | writeFile :: FilePath -> String -> IO ()
|
| 80 | - (++) :: forall a. [a] -> [a] -> [a]
|
|
| 81 | - filter :: forall a. (a -> Bool) -> [a] -> [a]
|
|
| 82 | 80 | fromInteger :: forall a. Num a => Integer -> a
|
| 83 | 81 | (-) :: forall a. Num a => a -> a -> a
|
| 84 | 82 | fromRational :: forall a. Fractional a => Rational -> a
|
| ... | ... | @@ -90,6 +88,7 @@ holes3.hs:11:15: error: [GHC-88464] |
| 90 | 88 | Nothing :: forall a. Maybe a
|
| 91 | 89 | Just :: forall a. a -> Maybe a
|
| 92 | 90 | [] :: forall a. [a]
|
| 91 | + (++) :: forall a. [a] -> [a] -> [a]
|
|
| 93 | 92 | asTypeOf :: forall a. a -> a -> a
|
| 94 | 93 | id :: forall a. a -> a
|
| 95 | 94 | until :: forall a. (a -> Bool) -> (a -> a) -> a -> a
|
| ... | ... | @@ -105,6 +104,7 @@ holes3.hs:11:15: error: [GHC-88464] |
| 105 | 104 | [a] -> [a]
|
| 106 | 105 | drop :: forall a. Int -> [a] -> [a]
|
| 107 | 106 | dropWhile :: forall a. (a -> Bool) -> [a] -> [a]
|
| 107 | + filter :: forall a. (a -> Bool) -> [a] -> [a]
|
|
| 108 | 108 | head :: forall a. GHC.Internal.Stack.Types.HasCallStack => [a] -> a
|
| 109 | 109 | init :: forall a.
|
| 110 | 110 | GHC.Internal.Stack.Types.HasCallStack =>
|
| ... | ... | @@ -174,7 +174,6 @@ holes3.hs:11:15: error: [GHC-88464] |
| 174 | 174 | quot :: forall a. Integral a => a -> a -> a
|
| 175 | 175 | quotRem :: forall a. Integral a => a -> a -> (a, a)
|
| 176 | 176 | rem :: forall a. Integral a => a -> a -> a
|
| 177 | - zip :: forall a b. [a] -> [b] -> [(a, b)]
|
|
| 178 | 177 | map :: forall a b. (a -> b) -> [a] -> [b]
|
| 179 | 178 | realToFrac :: forall a b. (Real a, Fractional b) => a -> b
|
| 180 | 179 | Left :: forall a b. a -> Either a b
|
| ... | ... | @@ -187,6 +186,7 @@ holes3.hs:11:15: error: [GHC-88464] |
| 187 | 186 | scanl :: forall b a. (b -> a -> b) -> b -> [a] -> [b]
|
| 188 | 187 | scanr :: forall a b. (a -> b -> b) -> b -> [a] -> [b]
|
| 189 | 188 | unzip :: forall a b. [(a, b)] -> ([a], [b])
|
| 189 | + zip :: forall a b. [a] -> [b] -> [(a, b)]
|
|
| 190 | 190 | (^^) :: forall a b. (Fractional a, Integral b) => a -> b -> a
|
| 191 | 191 | ceiling :: forall a b. (RealFrac a, Integral b) => a -> b
|
| 192 | 192 | floor :: forall a b. (RealFrac a, Integral b) => a -> b
|