Rodrigo Mesquita pushed to branch wip/spj-reinstallable-base2 at Glasgow Haskell Compiler / GHC

Commits:

20 changed files:

Changes:

  • compiler/GHC/Builtin/KnownKeys.hs
    ... ... @@ -253,10 +253,26 @@ knownKeyTable
    253 253
         -- Implicit Params
    
    254 254
         , (mkTcOcc "IP", ipClassKey)
    
    255 255
     
    
    256
    +    -- Callstacks
    
    257
    +    , (mkVarOcc "CallStack", callStackTyConKey)
    
    258
    +
    
    259
    +    -- Exception context
    
    260
    +    , (mkVarOcc "ExceptionContext", exceptionContextTyConKey)
    
    261
    +
    
    262
    +    -- Custom type errors
    
    263
    +    , (mkTcOcc   "TypeError", errorMessageTypeErrorFamKey)
    
    264
    +    , (mkDataOcc "Text",      typeErrorTextDataConKey)
    
    265
    +    , (mkDataOcc ":<>:",      typeErrorAppendDataConKey)
    
    266
    +    , (mkDataOcc ":$$:",      typeErrorVAppendDataConKey)
    
    267
    +    , (mkDataOcc "ShowType",  typeErrorShowTypeDataConKey)
    
    268
    +
    
    256 269
         -- Base strings Strings
    
    257 270
         , (mkVarOcc "unpackCString#",     unpackCStringIdKey)
    
    258 271
         , (mkVarOcc "unpackCStringUtf8#", unpackCStringUtf8IdKey)
    
    259 272
     
    
    273
    +    -- JS primitives
    
    274
    +    , (mkVarOcc "unsafeUnpackJSStringUtf8##", unsafeUnpackJSStringUtf8ShShKey)
    
    275
    +
    
    260 276
         -- Known-key names that have BuiltinRules in ConstantFold
    
    261 277
         , (mkVarOcc "unpackFoldrCString#",      unpackCStringFoldrIdKey)
    
    262 278
         , (mkVarOcc "unpackFoldrCStringUtf8#",  unpackCStringFoldrUtf8IdKey)
    
    ... ... @@ -343,42 +359,22 @@ knownKeyTable
    343 359
     basicKnownKeyNames :: [Name]  -- See Note [Known-key names]
    
    344 360
     basicKnownKeyNames
    
    345 361
      = [
    
    362
    +        -- KindReps for common cases
    
    363
    +        starKindRepName,
    
    364
    +        starArrStarKindRepName,
    
    365
    +        starArrStarArrStarKindRepName,
    
    366
    +        constraintKindRepName,
    
    346 367
             -- FFI primitive types that are not wired-in.
    
    347 368
             ptrTyConName, funPtrTyConName, constPtrConName,
    
    348 369
             int8TyConName, int16TyConName, int32TyConName, int64TyConName,
    
    349 370
             word8TyConName, word16TyConName, word32TyConName, word64TyConName,
    
    350
    -        jsvalTyConName,
    
    351
    -
    
    352
    -        -- Type-level naturals
    
    353
    -        knownNatClassName, knownSymbolClassName, knownCharClassName,
    
    354
    -
    
    355
    -        -- ExceptionContext
    
    356
    -        exceptionContextTyConName,
    
    357
    -        emptyExceptionContextName,
    
    358
    -
    
    359
    -        -- Call Stacks
    
    360
    -        callStackTyConName,
    
    361
    -        emptyCallStackName,
    
    362 371
     
    
    363 372
             -- Plugins
    
    364 373
             pluginTyConName
    
    365 374
             , frontendPluginTyConName
    
    366 375
     
    
    367
    -        -- StaticPtr
    
    368
    -        , staticPtrTyConName
    
    369
    -        , staticPtrDataConName, staticPtrInfoDataConName
    
    370
    -
    
    371
    -        -- Custom type errors
    
    372
    -        , errorMessageTypeErrorFamName
    
    373
    -        , typeErrorTextDataConName
    
    374
    -        , typeErrorAppendDataConName
    
    375
    -        , typeErrorVAppendDataConName
    
    376
    -        , typeErrorShowTypeDataConName
    
    377
    -
    
    378 376
             -- Unsafe coercion proofs
    
    379 377
             , unsafeCoercePrimName
    
    380
    -
    
    381
    -        , unsafeUnpackJSStringUtf8ShShName
    
    382 378
         ]
    
    383 379
     
    
    384 380
     
    
    ... ... @@ -425,33 +421,21 @@ bniVarQual str key = varQual gHC_INTERNAL_NUM_INTEGER (fsLit str) key
    425 421
     -- End of ghc-bignum
    
    426 422
     ---------------------------------
    
    427 423
     
    
    424
    +
    
    425
    +-- Class Typeable, and functions for constructing `Typeable` dictionaries
    
    426
    +starKindRepName, starArrStarKindRepName,
    
    427
    +  starArrStarArrStarKindRepName, constraintKindRepName :: Name
    
    428
    +-- This is the Typeable 'Module' for GHC.Prim (which has no code, so we place in GHC.Types)
    
    429
    +-- See Note [Grand plan for Typeable] in GHC.Tc.Instance.Typeable.
    
    430
    +starKindRepName        = varQual gHC_TYPES         (fsLit "krep$*")          starKindRepKey
    
    431
    +starArrStarKindRepName = varQual gHC_TYPES         (fsLit "krep$*Arr*")      starArrStarKindRepKey
    
    432
    +starArrStarArrStarKindRepName = varQual gHC_TYPES  (fsLit "krep$*->*->*")    starArrStarArrStarKindRepKey
    
    433
    +constraintKindRepName  = varQual gHC_TYPES         (fsLit "krep$Constraint") constraintKindRepKey
    
    434
    +
    
    428 435
     -- WithDict
    
    429 436
     withDictClassName :: Name
    
    430 437
     withDictClassName = clsQual gHC_MAGIC_DICT (fsLit "WithDict") withDictClassKey
    
    431 438
     
    
    432
    --- Custom type errors
    
    433
    -errorMessageTypeErrorFamName
    
    434
    -  , typeErrorTextDataConName
    
    435
    -  , typeErrorAppendDataConName
    
    436
    -  , typeErrorVAppendDataConName
    
    437
    -  , typeErrorShowTypeDataConName
    
    438
    -  :: Name
    
    439
    -
    
    440
    -errorMessageTypeErrorFamName =
    
    441
    -  tcQual gHC_INTERNAL_TYPEERROR (fsLit "TypeError") errorMessageTypeErrorFamKey
    
    442
    -
    
    443
    -typeErrorTextDataConName =
    
    444
    -  dcQual gHC_INTERNAL_TYPEERROR (fsLit "Text") typeErrorTextDataConKey
    
    445
    -
    
    446
    -typeErrorAppendDataConName =
    
    447
    -  dcQual gHC_INTERNAL_TYPEERROR (fsLit ":<>:") typeErrorAppendDataConKey
    
    448
    -
    
    449
    -typeErrorVAppendDataConName =
    
    450
    -  dcQual gHC_INTERNAL_TYPEERROR (fsLit ":$$:") typeErrorVAppendDataConKey
    
    451
    -
    
    452
    -typeErrorShowTypeDataConName =
    
    453
    -  dcQual gHC_INTERNAL_TYPEERROR (fsLit "ShowType") typeErrorShowTypeDataConKey
    
    454
    -
    
    455 439
     -- Unsafe coercion proofs
    
    456 440
     unsafeCoercePrimName:: Name
    
    457 441
     unsafeCoercePrimName    = varQual gHC_INTERNAL_UNSAFE_COERCE (fsLit "unsafeCoerce#") unsafeCoercePrimIdKey
    
    ... ... @@ -478,28 +462,6 @@ ptrTyConName, funPtrTyConName :: Name
    478 462
     ptrTyConName      = tcQual   gHC_INTERNAL_PTR (fsLit "Ptr")    ptrTyConKey
    
    479 463
     funPtrTyConName   = tcQual   gHC_INTERNAL_PTR (fsLit "FunPtr") funPtrTyConKey
    
    480 464
     
    
    481
    --- Type-level naturals
    
    482
    -knownNatClassName :: Name
    
    483
    -knownNatClassName     = clsQual gHC_INTERNAL_TYPENATS (fsLit "KnownNat") knownNatClassKey
    
    484
    -knownSymbolClassName :: Name
    
    485
    -knownSymbolClassName  = clsQual gHC_INTERNAL_TYPELITS (fsLit "KnownSymbol") knownSymbolClassKey
    
    486
    -knownCharClassName :: Name
    
    487
    -knownCharClassName  = clsQual gHC_INTERNAL_TYPELITS (fsLit "KnownChar") knownCharClassKey
    
    488
    -
    
    489
    --- ExceptionContext
    
    490
    -exceptionContextTyConName, emptyExceptionContextName :: Name
    
    491
    -exceptionContextTyConName =
    
    492
    -    tcQual gHC_INTERNAL_EXCEPTION_CONTEXT (fsLit "ExceptionContext") exceptionContextTyConKey
    
    493
    -emptyExceptionContextName
    
    494
    -  = varQual gHC_INTERNAL_EXCEPTION_CONTEXT (fsLit "emptyExceptionContext") emptyExceptionContextKey
    
    495
    -
    
    496
    --- Source Locations
    
    497
    -callStackTyConName, emptyCallStackName :: Name
    
    498
    -callStackTyConName
    
    499
    -  = tcQual gHC_INTERNAL_STACK_TYPES  (fsLit "CallStack") callStackTyConKey
    
    500
    -emptyCallStackName
    
    501
    -  = varQual gHC_INTERNAL_STACK_TYPES (fsLit "emptyCallStack") emptyCallStackKey
    
    502
    -
    
    503 465
     -- plugins
    
    504 466
     pLUGINS :: Module
    
    505 467
     pLUGINS = mkThisGhcModule (fsLit "GHC.Driver.Plugins")
    
    ... ... @@ -508,31 +470,10 @@ pluginTyConName = tcQual pLUGINS (fsLit "Plugin") pluginTyConKey
    508 470
     frontendPluginTyConName :: Name
    
    509 471
     frontendPluginTyConName = tcQual pLUGINS (fsLit "FrontendPlugin") frontendPluginTyConKey
    
    510 472
     
    
    511
    -staticPtrInfoTyConName :: Name
    
    512
    -staticPtrInfoTyConName =
    
    513
    -    tcQual gHC_INTERNAL_STATICPTR (fsLit "StaticPtrInfo") staticPtrInfoTyConKey
    
    514
    -
    
    515
    -staticPtrInfoDataConName :: Name
    
    516
    -staticPtrInfoDataConName =
    
    517
    -    dcQual gHC_INTERNAL_STATICPTR (fsLit "StaticPtrInfo") staticPtrInfoDataConKey
    
    518
    -
    
    519
    -staticPtrTyConName :: Name
    
    520
    -staticPtrTyConName =
    
    521
    -    tcQual gHC_INTERNAL_STATICPTR (fsLit "StaticPtr") staticPtrTyConKey
    
    522
    -
    
    523
    -staticPtrDataConName :: Name
    
    524
    -staticPtrDataConName =
    
    525
    -    dcQual gHC_INTERNAL_STATICPTR (fsLit "StaticPtr") staticPtrDataConKey
    
    526
    -
    
    527 473
     constPtrConName :: Name
    
    528 474
     constPtrConName =
    
    529 475
         tcQual gHC_INTERNAL_FOREIGN_C_CONSTPTR (fsLit "ConstPtr") constPtrTyConKey
    
    530 476
     
    
    531
    -jsvalTyConName :: Name
    
    532
    -jsvalTyConName = tcQual gHC_INTERNAL_WASM_PRIM_TYPES (fsLit "JSVal") jsvalTyConKey
    
    533
    -
    
    534
    -unsafeUnpackJSStringUtf8ShShName :: Name
    
    535
    -unsafeUnpackJSStringUtf8ShShName = varQual gHC_INTERNAL_JS_PRIM (fsLit "unsafeUnpackJSStringUtf8##") unsafeUnpackJSStringUtf8ShShKey
    
    536 477
     
    
    537 478
     {-
    
    538 479
     ************************************************************************
    
    ... ... @@ -871,12 +812,6 @@ specTyConKey = mkPreludeTyConUnique 185
    871 812
     smallArrayPrimTyConKey        = mkPreludeTyConUnique  187
    
    872 813
     smallMutableArrayPrimTyConKey = mkPreludeTyConUnique  188
    
    873 814
     
    
    874
    -staticPtrTyConKey  :: KnownKey
    
    875
    -staticPtrTyConKey  = mkPreludeTyConUnique 189
    
    876
    -
    
    877
    -staticPtrInfoTyConKey :: KnownKey
    
    878
    -staticPtrInfoTyConKey = mkPreludeTyConUnique 190
    
    879
    -
    
    880 815
     callStackTyConKey :: KnownKey
    
    881 816
     callStackTyConKey = mkPreludeTyConUnique 191
    
    882 817
     
    
    ... ... @@ -1344,6 +1279,13 @@ typeCharTypeRepKey = mkPreludeMiscIdUnique 509
    1344 1279
     typeRepIdKey          = mkPreludeMiscIdUnique 510
    
    1345 1280
     mkTrFunKey            = mkPreludeMiscIdUnique 511
    
    1346 1281
     
    
    1282
    +-- KindReps for common cases
    
    1283
    +starKindRepKey, starArrStarKindRepKey, starArrStarArrStarKindRepKey, constraintKindRepKey :: KnownKey
    
    1284
    +starKindRepKey               = mkPreludeMiscIdUnique 520
    
    1285
    +starArrStarKindRepKey        = mkPreludeMiscIdUnique 521
    
    1286
    +starArrStarArrStarKindRepKey = mkPreludeMiscIdUnique 522
    
    1287
    +constraintKindRepKey         = mkPreludeMiscIdUnique 523
    
    1288
    +
    
    1347 1289
     -- Dynamic
    
    1348 1290
     toDynIdKey :: KnownKey
    
    1349 1291
     toDynIdKey            = mkPreludeMiscIdUnique 530
    
    ... ... @@ -1362,18 +1304,12 @@ memptyClassOpKey = mkPreludeMiscIdUnique 555
    1362 1304
     mappendClassOpKey = mkPreludeMiscIdUnique 556
    
    1363 1305
     mconcatClassOpKey = mkPreludeMiscIdUnique 557
    
    1364 1306
     
    
    1365
    -emptyCallStackKey :: KnownKey
    
    1366
    -emptyCallStackKey = mkPreludeMiscIdUnique 558
    
    1367
    -
    
    1368 1307
     fromStaticPtrClassOpKey :: KnownKey
    
    1369 1308
     fromStaticPtrClassOpKey = mkPreludeMiscIdUnique 560
    
    1370 1309
     
    
    1371 1310
     makeStaticKey :: KnownKey
    
    1372 1311
     makeStaticKey = mkPreludeMiscIdUnique 561
    
    1373 1312
     
    
    1374
    -emptyExceptionContextKey :: KnownKey
    
    1375
    -emptyExceptionContextKey = mkPreludeMiscIdUnique 562
    
    1376
    -
    
    1377 1313
     -- Unsafe coercion proofs
    
    1378 1314
     unsafeEqualityProofIdKey, unsafeCoercePrimIdKey :: KnownKey
    
    1379 1315
     unsafeEqualityProofIdKey = mkPreludeMiscIdUnique 570
    

  • compiler/GHC/Builtin/KnownOccs.hs
    ... ... @@ -204,6 +204,16 @@ fromStaticPtrClassOpOcc, newStablePtrIdOcc :: KnownOcc
    204 204
     fromStaticPtrClassOpOcc = mkVarOcc "fromStaticPtr"
    
    205 205
     newStablePtrIdOcc       = mkVarOcc "newStablePtr"
    
    206 206
     
    
    207
    +staticPtrTyConOcc, staticPtrDataConOcc, staticPtrInfoDataConOcc :: KnownOcc
    
    208
    +staticPtrTyConOcc        = mkTcOcc   "StaticPtr"
    
    209
    +staticPtrDataConOcc      = mkDataOcc "StaticPtr"
    
    210
    +staticPtrInfoDataConOcc  = mkDataOcc "StaticPtrInfo"
    
    211
    +
    
    212
    +knownNatClassOcc, knownSymbolClassOcc, knownCharClassOcc :: KnownOcc
    
    213
    +knownNatClassOcc    = mkTcOcc "KnownNat"
    
    214
    +knownSymbolClassOcc = mkTcOcc "KnownSymbol"
    
    215
    +knownCharClassOcc   = mkTcOcc "KnownChar"
    
    216
    +
    
    207 217
     returnIOIdOcc, bindIOIdOcc, thenIOIdOcc,
    
    208 218
       printIdOcc, ioTyConOcc, ioDataConOcc :: KnownOcc
    
    209 219
     returnIOIdOcc = mkVarOcc "returnIO"
    
    ... ... @@ -321,15 +331,6 @@ traceIdOcc = mkVarOcc "trace"
    321 331
     assertErrorIdOcc :: KnownOcc
    
    322 332
     assertErrorIdOcc = mkVarOcc "assertError"
    
    323 333
     
    
    324
    --- KindReps for common cases
    
    325
    --- See Note [Grand plan for Typeable] (GPT6) in GHC.Tc.Instance.Typeable.
    
    326
    -starKindRepIdOcc, starArrStarKindRepIdOcc,
    
    327
    -  starArrStarArrStarKindRepIdOcc, constraintKindRepIdOcc :: KnownOcc
    
    328
    -starKindRepIdOcc               = mkVarOcc "krepStar"
    
    329
    -starArrStarKindRepIdOcc        = mkVarOcc "krepArrStar"
    
    330
    -starArrStarArrStarKindRepIdOcc = mkVarOcc "krepStarArrStarArrStarKind"
    
    331
    -constraintKindRepIdOcc         = mkVarOcc "krepConstraint"
    
    332
    -
    
    333 334
     -- ghci
    
    334 335
     ghciIoClassOcc, ghciStepIoMOcc :: KnownOcc
    
    335 336
     ghciIoClassOcc = mkTcOcc "GHCiSandboxIO"
    
    ... ... @@ -340,9 +341,14 @@ toAnnotationWrapperIdOcc :: KnownOcc
    340 341
     toAnnotationWrapperIdOcc = mkVarOcc "toAnnotationWrapper"
    
    341 342
     
    
    342 343
     -- CallStacks/Source locations
    
    343
    -pushCallStackIdOcc, srcLocDataConOcc :: KnownOcc
    
    344
    -pushCallStackIdOcc = mkVarOcc "pushCallStack"
    
    345
    -srcLocDataConOcc   = mkDataOcc "SrcLoc"
    
    344
    +emptyCallStackIdOcc, pushCallStackIdOcc, srcLocDataConOcc :: KnownOcc
    
    345
    +emptyCallStackIdOcc = mkVarOcc "emptyCallStack"
    
    346
    +pushCallStackIdOcc  = mkVarOcc "pushCallStack"
    
    347
    +srcLocDataConOcc    = mkDataOcc "SrcLoc"
    
    348
    +
    
    349
    +-- ExceptionContext
    
    350
    +emptyExceptionContextIdOcc :: KnownOcc
    
    351
    +emptyExceptionContextIdOcc = mkVarOcc "emptyExceptionContext"
    
    346 352
     
    
    347 353
     {- *********************************************************************
    
    348 354
     *                                                                      *
    

  • compiler/GHC/Core/Type.hs
    ... ... @@ -244,7 +244,7 @@ import {-# SOURCE #-} GHC.Builtin.WiredIn.Types
    244 244
        , manyDataConTy, oneDataConTy
    
    245 245
        , liftedRepTy, unliftedRepTy, zeroBitRepTy )
    
    246 246
     
    
    247
    -import GHC.Types.Name( Name )
    
    247
    +import GHC.Types.Name( Name, hasKnownKey )
    
    248 248
     import GHC.Builtin.KnownKeys
    
    249 249
     import GHC.Core.Coercion.Axiom
    
    250 250
     
    
    ... ... @@ -1226,21 +1226,21 @@ pprUserTypeErrorTy ty =
    1226 1226
     
    
    1227 1227
         -- Text "Something"
    
    1228 1228
         Just (tc,[txt])
    
    1229
    -      | tyConName tc == typeErrorTextDataConName
    
    1229
    +      | tc `hasKnownKey` typeErrorTextDataConKey
    
    1230 1230
           , Just str <- isStrLitTy txt -> ftext str
    
    1231 1231
     
    
    1232 1232
         -- ShowType t
    
    1233 1233
         Just (tc,[_k,t])
    
    1234
    -      | tyConName tc == typeErrorShowTypeDataConName -> ppr t
    
    1234
    +      | tc `hasKnownKey` typeErrorShowTypeDataConKey -> ppr t
    
    1235 1235
     
    
    1236 1236
         -- t1 :<>: t2
    
    1237 1237
         Just (tc,[t1,t2])
    
    1238
    -      | tyConName tc == typeErrorAppendDataConName ->
    
    1238
    +      | tc `hasKnownKey` typeErrorAppendDataConKey ->
    
    1239 1239
             pprUserTypeErrorTy t1 <> pprUserTypeErrorTy t2
    
    1240 1240
     
    
    1241 1241
         -- t1 :$$: t2
    
    1242 1242
         Just (tc,[t1,t2])
    
    1243
    -      | tyConName tc == typeErrorVAppendDataConName ->
    
    1243
    +      | tc `hasKnownKey` typeErrorVAppendDataConKey ->
    
    1244 1244
             pprUserTypeErrorTy t1 $$ pprUserTypeErrorTy t2
    
    1245 1245
     
    
    1246 1246
         -- An unevaluated type function
    

  • compiler/GHC/Driver/Config/Tidy.hs
    ... ... @@ -17,7 +17,7 @@ import GHC.Driver.Backend
    17 17
     
    
    18 18
     import GHC.Core.Make (getMkStringIds)
    
    19 19
     import GHC.Builtin.KnownKeys
    
    20
    -import GHC.Tc.Utils.Env (lookupGlobal, lookupKnownKeyGlobal)
    
    20
    +import GHC.Tc.Utils.Env (lookupKnownKeyGlobal)
    
    21 21
     import GHC.Types.TyThing
    
    22 22
     import GHC.Platform.Ways
    
    23 23
     
    
    ... ... @@ -48,8 +48,8 @@ initStaticPtrOpts hsc_env = do
    48 48
       let dflags = hsc_dflags hsc_env
    
    49 49
     
    
    50 50
       mk_string <- getMkStringIds (fmap tyThingId . lookupKnownKeyGlobal hsc_env)
    
    51
    -  static_ptr_info_datacon <- tyThingDataCon <$> lookupGlobal hsc_env staticPtrInfoDataConName
    
    52
    -  static_ptr_datacon      <- tyThingDataCon <$> lookupGlobal hsc_env staticPtrDataConName
    
    51
    +  static_ptr_info_datacon <- tyThingDataCon <$> lookupKnownKeyGlobal hsc_env staticPtrInfoDataConKey
    
    52
    +  static_ptr_datacon      <- tyThingDataCon <$> lookupKnownKeyGlobal hsc_env staticPtrDataConKey
    
    53 53
     
    
    54 54
       pure $ StaticPtrOpts
    
    55 55
         { opt_platform = targetPlatform dflags
    

  • compiler/GHC/Stg/BcPrep.hs
    ... ... @@ -14,7 +14,6 @@ module GHC.Stg.BcPrep ( bcPrep ) where
    14 14
     
    
    15 15
     import GHC.Prelude
    
    16 16
     
    
    17
    -import GHC.Types.Id.Make
    
    18 17
     import GHC.Types.Id
    
    19 18
     import GHC.Core.Type
    
    20 19
     
    

  • compiler/GHC/StgToJS/Apply.hs
    ... ... @@ -111,7 +111,7 @@ genApp ctx i args
    111 111
         -- We detect if the Id is unsafeUnpackJSStringUtf8## applied to a string literal,
    
    112 112
         -- if so then we convert the unsafeUnpack to a call to h$decode.
    
    113 113
         | [StgVarArg v] <- args
    
    114
    -    , idName i == unsafeUnpackJSStringUtf8ShShName
    
    114
    +    , i `hasKnownKey` unsafeUnpackJSStringUtf8ShShKey
    
    115 115
         -- See: https://gitlab.haskell.org/ghc/ghc/-/merge_requests/10588
    
    116 116
         -- Comment by Josh Meredith  <josh.meredith@iohk.io>
    
    117 117
         -- `typex_expr` can throw an error for certain bindings so it's important
    
    ... ... @@ -122,7 +122,7 @@ genApp ctx i args
    122 122
         -- Test case T23479
    
    123 123
         | [StgLitArg (LitString bs)] <- args
    
    124 124
         , Just d <- decodeModifiedUTF8 bs
    
    125
    -    , idName i == unsafeUnpackJSStringUtf8ShShName
    
    125
    +    , i `hasKnownKey` unsafeUnpackJSStringUtf8ShShKey
    
    126 126
         , [top] <- concatMap typex_expr (ctxTarget ctx)
    
    127 127
         = return . (,ExprInline) $ top |= toJExpr d
    
    128 128
     
    

  • compiler/GHC/Tc/Gen/Expr.hs
    ... ... @@ -629,7 +629,7 @@ tcExpr (HsStatic _ expr) res_ty
    629 629
             --                    StaticPtr a -> p a
    
    630 630
             ; fromStaticPtr <- newKnownOccMethod StaticOrigin
    
    631 631
                                         fromStaticPtrClassOpOcc [p_ty]
    
    632
    -        ; static_ptr_ty_con <- tcLookupTyCon staticPtrTyConName
    
    632
    +        ; static_ptr_ty_con <- tcLookupKnownOccTyCon staticPtrTyConOcc
    
    633 633
             ; let wrap = mkWpEvVarApps [typeable_ev] <.> mkWpTyApps [expr_ty]
    
    634 634
                   static_expr_ty = mkTyConApp static_ptr_ty_con [expr_ty]
    
    635 635
             ; return $ mkHsWrapCo co $
    

  • compiler/GHC/Tc/Instance/Class.hs
    ... ... @@ -27,12 +27,13 @@ import GHC.Rename.Env( addUsedGRE, addUsedDataCons, DeprecationWarnings (..) )
    27 27
     import GHC.Builtin.WiredIn.Types
    
    28 28
     import GHC.Builtin.WiredIn.Prim
    
    29 29
     import GHC.Builtin.KnownKeys
    
    30
    +import GHC.Builtin.KnownOccs
    
    30 31
     import GHC.Builtin.PrimOps ( PrimOp(..) )
    
    31 32
     import GHC.Builtin.PrimOps.Ids ( primOpId )
    
    32 33
     
    
    33 34
     import GHC.Types.FieldLabel
    
    34 35
     import GHC.Types.SafeHaskell
    
    35
    -import GHC.Types.Name   ( Name )
    
    36
    +import GHC.Types.Name   ( Name, KnownOcc )
    
    36 37
     import GHC.Types.Name.Reader
    
    37 38
     import GHC.Types.Var.Env ( VarEnv )
    
    38 39
     import GHC.Types.Id
    
    ... ... @@ -960,9 +961,9 @@ matchTypeable clas [k,t] -- clas = Typeable
    960 961
           -- see Note [No Typeable for polytypes or qualified types]
    
    961 962
     
    
    962 963
       -- Now cases that do work
    
    963
    -  | k `eqType` naturalTy      = doTyLit knownNatClassName         t
    
    964
    -  | k `eqType` typeSymbolKind = doTyLit knownSymbolClassName      t
    
    965
    -  | k `eqType` charTy         = doTyLit knownCharClassName        t
    
    964
    +  | k `eqType` naturalTy      = doTyLit knownNatClassOcc          t
    
    965
    +  | k `eqType` typeSymbolKind = doTyLit knownSymbolClassOcc       t
    
    966
    +  | k `eqType` charTy         = doTyLit knownCharClassOcc         t
    
    966 967
       | Just (tc, ks) <- splitTyConApp_maybe t -- See Note [Typeable (T a b c)]
    
    967 968
       , onlyNamedBndrsApplied tc ks            = doTyConApp clas t tc ks
    
    968 969
     
    
    ... ... @@ -1038,8 +1039,8 @@ mk_typeable_pred clas ty = mkClassPred clas [ typeKind ty, ty ]
    1038 1039
       -- Typeable is implied by KnownNat/KnownSymbol. In the case of a type literal
    
    1039 1040
       -- we generate a sub-goal for the appropriate class.
    
    1040 1041
       -- See Note [Typeable for Nat and Symbol]
    
    1041
    -doTyLit :: Name -> Type -> TcM ClsInstResult
    
    1042
    -doTyLit kc t = do { kc_clas <- tcLookupClass kc
    
    1042
    +doTyLit :: KnownOcc -> Type -> TcM ClsInstResult
    
    1043
    +doTyLit kc t = do { kc_clas <- tcLookupKnownOccClass kc
    
    1043 1044
                       ; let kc_pred    = mkClassPred kc_clas [ t ]
    
    1044 1045
                             mk_ev [ev] = evTypeable t $ EvTypeableTyLit (EvExpr ev)
    
    1045 1046
                             mk_ev _    = panic "doTyLit"
    

  • compiler/GHC/Tc/Instance/Typeable.hs
    ... ... @@ -22,6 +22,7 @@ import GHC.Tc.Utils.TcType
    22 22
     import GHC.Iface.Env( newGlobalBinder )
    
    23 23
     
    
    24 24
     import GHC.Builtin.Modules( gHC_TYPES, gHC_PRIM )
    
    25
    +import GHC.Builtin.KnownKeys
    
    25 26
     import GHC.Builtin.KnownOccs
    
    26 27
     import GHC.Builtin.WiredIn.Prim ( primTyCons )
    
    27 28
     import GHC.Builtin.WiredIn.Types
    
    ... ... @@ -136,15 +137,6 @@ There are many wrinkles:
    136 137
              KindReps once in GHC.Types. These are referred to as "built-in"
    
    137 138
              KindReps below.
    
    138 139
     
    
    139
    -         * When compiling GHC.Internal.Types, generate some extra bindings for
    
    140
    -         built-in kindreps (see `todoForExportedKindReps`):
    
    141
    -
    
    142
    -             krepStar = MkTyCon app ...
    
    143
    -
    
    144
    -         * Re-export `krepStar` from GHC.Essentials.
    
    145
    -         * In `mkTypeableBinds`, use `krepStar` directly rather than using its
    
    146
    -         long form. Must use lookupKnownOcc to find it.
    
    147
    -
    
    148 140
       (GPT7) Even though KindReps aren't inlined, this scheme still has more of an
    
    149 141
              effect on compilation time than I'd like. This is especially true in
    
    150 142
              the case of families of type constructors (e.g. tuples and unboxed
    
    ... ... @@ -471,12 +463,11 @@ todoForTyCons mod mod_id tycons = do
    471 463
         mod_fpr = fingerprintString $ moduleNameString $ moduleName mod
    
    472 464
         pkg_fpr = fingerprintString $ unitString $ moduleUnit mod
    
    473 465
     
    
    474
    -todoForExportedKindReps :: [(Kind, KnownOcc)] -> TcM TypeRepTodo
    
    466
    +todoForExportedKindReps :: [(Kind, Name)] -> TcM TypeRepTodo
    
    475 467
     todoForExportedKindReps kinds = do
    
    476 468
         trKindRepTy <- mkTyConTy <$> tcLookupKnownOccTyCon kindRepTyConOcc
    
    477
    -    names <- mapM (fmap idName . tcLookupKnownOccId . snd) kinds -- ROMES:TODO: ugh... I don't see how this would work. These bindings are defined dynamically here when compiling this module, so how would knownOcc find them? they aren't defined!
    
    478
    -    let mkId k name = (k, mkExportedVanillaId name trKindRepTy)
    
    479
    -    return $ ExportedKindRepsTodo $ zipWith mkId (map fst kinds) names
    
    469
    +    let mkId (k, name) = (k, mkExportedVanillaId name trKindRepTy)
    
    470
    +    return $ ExportedKindRepsTodo $ map mkId kinds
    
    480 471
     
    
    481 472
     -- | Generate TyCon bindings for a set of type constructors
    
    482 473
     mkTypeRepTodoBinds :: [TypeRepTodo] -> TcM TcGblEnv
    
    ... ... @@ -671,13 +662,13 @@ liftTc = KindRepM . lift
    671 662
     
    
    672 663
     -- | We generate `KindRep`s for a few common kinds, so that they
    
    673 664
     -- can be reused across modules.
    
    674
    --- These definitions are generated in `GHC.Internal.Types`.
    
    675
    -builtInKindReps :: [(Kind, KnownOcc)]
    
    665
    +-- These definitions are generated in `ghc-prim:GHC.Types`.
    
    666
    +builtInKindReps :: [(Kind, Name)]
    
    676 667
     builtInKindReps =
    
    677
    -    [ (star,                              starKindRepIdOcc)
    
    678
    -    , (constraintKind,                    constraintKindRepIdOcc)
    
    679
    -    , (mkVisFunTyMany star star,          starArrStarKindRepIdOcc)
    
    680
    -    , (mkVisFunTysMany [star, star] star, starArrStarArrStarKindRepIdOcc)
    
    668
    +    [ (star,                              starKindRepName)
    
    669
    +    , (constraintKind,                    constraintKindRepName)
    
    670
    +    , (mkVisFunTyMany star star,          starArrStarKindRepName)
    
    671
    +    , (mkVisFunTysMany [star, star] star, starArrStarArrStarKindRepName)
    
    681 672
         ]
    
    682 673
       where
    
    683 674
         star = liftedTypeKind
    
    ... ... @@ -686,7 +677,7 @@ initialKindRepEnv :: TcRn KindRepEnv
    686 677
     initialKindRepEnv = foldlM add_kind_rep emptyTypeMap builtInKindReps
    
    687 678
       where
    
    688 679
         add_kind_rep acc (k,n) = do
    
    689
    -        id <- tcLookupKnownOccId n
    
    680
    +        id <- tcLookupId n
    
    690 681
             return $! extendTypeMap acc k (id, Nothing)
    
    691 682
             -- The TypeMap looks through type synonyms
    
    692 683
     
    

  • compiler/GHC/Tc/Solver/Default.hs
    ... ... @@ -40,9 +40,10 @@ import GHC.Types.Unique.Set
    40 40
     import GHC.Types.Id
    
    41 41
     
    
    42 42
     import GHC.Builtin
    
    43
    +import GHC.Builtin.KnownOccs ( emptyExceptionContextIdOcc )
    
    43 44
     import GHC.Builtin.KnownKeys( unsatisfiableIdKey
    
    44 45
                                 , isStringClassKey
    
    45
    -                            , emptyExceptionContextName )
    
    46
    +                            )
    
    46 47
     import GHC.Builtin.Modules ( gHC_INTERNAL_TYPEERROR )
    
    47 48
     import GHC.Builtin.WiredIn.Types
    
    48 49
     import GHC.Builtin.WiredIn.Ids ( unboxedUnitExpr )
    
    ... ... @@ -449,7 +450,7 @@ defaultExceptionContext ct
    449 450
       | ClassPred cls tys <- classifyPredType (ctPred ct)
    
    450 451
       , isJust (isExceptionContextPred cls tys)
    
    451 452
       = do { warnTcS $ TcRnDefaultedExceptionContext (ctLoc ct)
    
    452
    -       ; empty_ec_id <- wrapTcS (TcM.tcLookupId emptyExceptionContextName)
    
    453
    +       ; empty_ec_id <- wrapTcS (TcM.tcLookupKnownOccId emptyExceptionContextIdOcc)
    
    453 454
            ; let ev = ctEvidence ct
    
    454 455
                  ev_tm = EvExpr (evWrapIPE (ctEvPred ev) (Var empty_ec_id))
    
    455 456
            ; setDictIfWanted ev EvCanonical ev_tm
    

  • compiler/GHC/Tc/Solver/Dict.hs
    ... ... @@ -45,8 +45,7 @@ import GHC.Types.Var.Set
    45 45
     import GHC.Types.Var.Env
    
    46 46
     import GHC.Types.SrcLoc
    
    47 47
     
    
    48
    -import GHC.Builtin.KnownOccs( pushCallStackIdOcc, srcLocDataConOcc )
    
    49
    -import GHC.Builtin.KnownKeys( emptyCallStackName )
    
    48
    +import GHC.Builtin.KnownOccs( emptyCallStackIdOcc, pushCallStackIdOcc, srcLocDataConOcc )
    
    50 49
     
    
    51 50
     import GHC.Utils.Monad ( concatMapM )
    
    52 51
     import GHC.Utils.Outputable
    
    ... ... @@ -187,7 +186,7 @@ solveCallStack ev ev_cs
    187 186
     evCallStack :: TcPredType -> EvCallStack -> TcS EvExpr
    
    188 187
     -- See Note [Overview of implicit CallStacks] in GHC.Tc.Types.Evidence
    
    189 188
     evCallStack _ EvCsEmpty
    
    190
    -  = Var <$> wrapTcS (tcLookupId emptyCallStackName)
    
    189
    +  = Var <$> wrapTcS (tcLookupKnownOccId emptyCallStackIdOcc)
    
    191 190
     evCallStack pred (EvCsPushCall fs loc tm)
    
    192 191
       = do { df <- getDynFlags
    
    193 192
            ; m  <- getModule
    

  • compiler/GHC/Tc/Solver/Monad.hs
    ... ... @@ -136,7 +136,7 @@ import qualified GHC.Tc.Utils.Monad as TcM
    136 136
     import qualified GHC.Tc.Utils.TcMType  as TcM
    
    137 137
     import qualified GHC.Tc.Instance.Class as TcM( matchGlobalInst, ClsInstResult(..) )
    
    138 138
     import qualified GHC.Tc.Utils.Env      as TcM
    
    139
    -       ( tcGetDefaultTys, tcLookupKnownKeyId, tcLookupTyCon )
    
    139
    +       ( tcGetDefaultTys, tcLookupKnownKeyId, tcLookupKnownKeyTyCon )
    
    140 140
     import GHC.Tc.Zonk.Monad ( ZonkM )
    
    141 141
     import qualified GHC.Tc.Zonk.TcType  as TcM
    
    142 142
     
    
    ... ... @@ -159,7 +159,7 @@ import GHC.Tc.Types.Origin
    159 159
     import GHC.Tc.Types.CtLoc
    
    160 160
     import GHC.Tc.Types.Constraint
    
    161 161
     
    
    162
    -import GHC.Builtin.KnownKeys ( callStackTyConName, exceptionContextTyConName )
    
    162
    +import GHC.Builtin.KnownKeys ( callStackTyConKey, exceptionContextTyConKey )
    
    163 163
     
    
    164 164
     import GHC.Core.Make
    
    165 165
     import GHC.Core.Type
    
    ... ... @@ -569,8 +569,8 @@ updSolvedDicts :: InstanceWhat -> DictCt -> TcS ()
    569 569
     updSolvedDicts what dict_ct@(DictCt { di_cls = cls, di_tys = tys, di_ev = ev })
    
    570 570
       | isWanted ev
    
    571 571
       , instanceReturnsDictCon what
    
    572
    -  = do { is_callstack    <- is_tyConTy isCallStackTy        callStackTyConName
    
    573
    -       ; is_exceptionCtx <- is_tyConTy isExceptionContextTy exceptionContextTyConName
    
    572
    +  = do { is_callstack    <- is_tyConTy isCallStackTy        callStackTyConKey
    
    573
    +       ; is_exceptionCtx <- is_tyConTy isExceptionContextTy exceptionContextTyConKey
    
    574 574
            ; let contains_callstack_or_exceptionCtx =
    
    575 575
                    mightMentionIP
    
    576 576
                      (const True)
    
    ... ... @@ -593,9 +593,9 @@ updSolvedDicts what dict_ct@(DictCt { di_cls = cls, di_tys = tys, di_ev = ev })
    593 593
         -- per Note [Using typesAreApart when calling mightMentionIP].
    
    594 594
         --
    
    595 595
         -- See Note [Using isCallStackTy in mightMentionIP].
    
    596
    -    is_tyConTy :: (Type -> Bool) -> Name -> TcS (Type -> Bool)
    
    597
    -    is_tyConTy is_eq tc_name
    
    598
    -      = do { (mb_tc, _) <- wrapTcS $ TcM.tryTc $ TcM.tcLookupTyCon tc_name
    
    596
    +    is_tyConTy :: (Type -> Bool) -> KnownKey -> TcS (Type -> Bool)
    
    597
    +    is_tyConTy is_eq tc_key
    
    598
    +      = do { (mb_tc, _) <- wrapTcS $ TcM.tryTc $ TcM.tcLookupKnownKeyTyCon tc_key
    
    599 599
                ; case mb_tc of
    
    600 600
                   Just tc ->
    
    601 601
                     return $ \ ty -> not (typesAreApart ty (mkTyConTy tc))
    

  • compiler/GHC/Tc/Types/Constraint.hs
    ... ... @@ -1426,7 +1426,7 @@ userTypeError_maybe look_everywhere = go
    1426 1426
           | Just ty' <- coreView ty
    
    1427 1427
           = go ty'
    
    1428 1428
         go (TyConApp tc tys)
    
    1429
    -      | tyConName tc == errorMessageTypeErrorFamName
    
    1429
    +      | tc `hasKnownKey` errorMessageTypeErrorFamKey
    
    1430 1430
           , _kind : msg : _ <- tys
    
    1431 1431
                   -- There may be more than 2 arguments, if the type error is
    
    1432 1432
                   -- used as a type constructor (e.g. at kind `Type -> Type`).
    

  • ghc/GHCi/UI.hs
    ... ... @@ -78,9 +78,8 @@ import GHC.Types.SourceError ( SourceError, initSourceErrorContext )
    78 78
     import GHC.Types.Name
    
    79 79
     import GHC.Types.Var ( varType )
    
    80 80
     import GHC.Iface.Syntax ( showToHeader )
    
    81
    -import GHC.Builtin.KnownKeys( ghciStepIoMName )
    
    82
    -import GHC.Builtin.KnownOccs( ioTyConOcc, stringTyCon_RDR, compose_RDR )
    
    83
    -import GHC.Types.Name.Reader as RdrName ( getGRE_NameQualifier_maybes, getRdrName, greName, globalRdrEnvElts)
    
    81
    +import GHC.Builtin.KnownOccs( ghciStepIoMOcc, ioTyConOcc, stringTyCon_RDR, compose_RDR )
    
    82
    +import GHC.Types.Name.Reader as RdrName
    
    84 83
     import GHC.Types.SrcLoc as SrcLoc
    
    85 84
     import qualified GHC.Parser.Lexer as Lexer
    
    86 85
     import GHC.Parser.Header ( toArgs )
    
    ... ... @@ -2011,7 +2010,7 @@ defineMacro overwrite s
    2011 2010
                 let stringTy :: LHsType GhcPs
    
    2012 2011
                     stringTy = nlHsTyVar NotPromoted stringTyCon_RDR
    
    2013 2012
                     ioM :: LHsType GhcPs -- AZ
    
    2014
    -                ioM = nlHsTyVar NotPromoted (ExactOcc ioTyConOcc) `nlHsAppTy` stringTy
    
    2013
    +                ioM = nlHsTyVar NotPromoted (Exact (ExactOcc ioTyConOcc)) `nlHsAppTy` stringTy
    
    2015 2014
                     body = nlHsVar compose_RDR `mkHsApp` (nlHsPar step)
    
    2016 2015
                                                `mkHsApp` (nlHsPar expr)
    
    2017 2016
                     tySig = mkHsWildCardBndrs $ noLocA $ mkHsImplicitSigType $
    
    ... ... @@ -2081,8 +2080,8 @@ getGhciStepIO = do
    2081 2080
       ghciTyConName <- GHC.getGHCiMonad
    
    2082 2081
       let stringTy = nlHsTyVar NotPromoted stringTyCon_RDR
    
    2083 2082
           ghciM = nlHsTyVar NotPromoted (Exact ghciTyConName) `nlHsAppTy` stringTy
    
    2084
    -      ioM = nlHsTyVar NotPromoted (ExactOcc ioTyConOcc) `nlHsAppTy` stringTy
    
    2085
    -      body = nlHsVar (getRdrName ghciStepIoMName)
    
    2083
    +      ioM = nlHsTyVar NotPromoted (Exact (ExactOcc ioTyConOcc)) `nlHsAppTy` stringTy
    
    2084
    +      body = nlHsVar (Exact (ExactOcc ghciStepIoMOcc))
    
    2086 2085
           tySig = mkHsWildCardBndrs $ noLocA $ mkHsImplicitSigType $
    
    2087 2086
                   nlHsFunTy ghciM ioM
    
    2088 2087
       return $ noLocA $ ExprWithTySig noAnn body tySig
    

  • libraries/base/src/GHC/Essentials.hs
    ... ... @@ -126,11 +126,19 @@ module GHC.Essentials
    126 126
         -- WithDict
    
    127 127
         , WithDict
    
    128 128
     
    
    129
    +    -- Type-level naturals/symbols/chars
    
    130
    +    , KnownNat, KnownSymbol, KnownChar
    
    131
    +
    
    132
    +    -- Custom type errors
    
    133
    +    , TypeError
    
    134
    +    , ErrorMessage(..)
    
    135
    +
    
    129 136
         -- Unsatisfiable
    
    130 137
         , Unsatisfiable, unsatisfiable
    
    131 138
     
    
    132 139
         -- Static pointers
    
    133 140
         , IsStatic( fromStaticPtr ), makeStatic
    
    141
    +    , StaticPtr( StaticPtr ), StaticPtrInfo( StaticPtrInfo )
    
    134 142
     
    
    135 143
         -- Stable pointers
    
    136 144
         , StablePtr, newStablePtr
    
    ... ... @@ -149,6 +157,9 @@ module GHC.Essentials
    149 157
         , CS.unpackAppendCStringUtf8#, CS.cstringLength#
    
    150 158
         , eqString, inline
    
    151 159
     
    
    160
    +    -- JS primitives
    
    161
    +    , unsafeUnpackJSStringUtf8##
    
    162
    +
    
    152 163
         , UnsafeEquality( UnsafeRefl ), unsafeEqualityProof
    
    153 164
     
    
    154 165
         -- Typeable and type representations
    
    ... ... @@ -216,16 +227,16 @@ module GHC.Essentials
    216 227
         , Body, normalB, guardedB
    
    217 228
         , Guard, normalGE, patGE
    
    218 229
     
    
    219
    -    -- See Note [Grand plan for Typeable] point (GPT6)
    
    220
    -    , krepStar, krepArrStar
    
    221
    -    , krepStarArrStarArrStarKind
    
    222
    -    , krepConstraint
    
    223
    -
    
    224 230
         -- GHCi
    
    225 231
         , GHCiSandboxIO(ghciStepIO)
    
    226 232
     
    
    227 233
         -- Callstacks
    
    228
    -    , pushCallStack, SrcLoc(..)
    
    234
    +    , CallStack, emptyCallStack, pushCallStack, SrcLoc(..)
    
    235
    +
    
    236
    +    -- Exception context
    
    237
    +    , ExceptionContext, emptyExceptionContext
    
    238
    +
    
    239
    +    , toAnnotationWrapper
    
    229 240
         ) where
    
    230 241
     
    
    231 242
     import GHC.Internal.Base hiding( foldr )
    
    ... ... @@ -236,6 +247,8 @@ import GHC.Internal.Real
    236 247
     import Data.String( IsString )
    
    237 248
     import GHC.Internal.Ix
    
    238 249
     import GHC.Internal.Magic.Dict( WithDict )
    
    250
    +import GHC.Internal.TypeNats( KnownNat )
    
    251
    +import GHC.Internal.TypeLits( KnownSymbol, KnownChar )
    
    239 252
     import GHC.Internal.Enum
    
    240 253
     import GHC.Internal.Data.Dynamic( toDyn )
    
    241 254
     import GHC.Internal.Data.Data
    
    ... ... @@ -253,7 +266,7 @@ import GHC.Internal.Desugar( (>>>) ) -- See Note [Tricky known-occ cases]
    253 266
     import GHC.Internal.OverloadedLabels( fromLabel )
    
    254 267
     import GHC.Internal.Records
    
    255 268
     import GHC.Internal.CString as CS
    
    256
    -import GHC.Internal.TypeError( Unsatisfiable, unsatisfiable )
    
    269
    +import GHC.Internal.TypeError( TypeError, ErrorMessage(..), Unsatisfiable, unsatisfiable )
    
    257 270
     import GHC.Internal.System.IO( print )
    
    258 271
     import qualified GHC.Internal.IsList as IL
    
    259 272
     import GHC.Internal.Err( error )
    
    ... ... @@ -263,7 +276,7 @@ import GHC.Internal.Word( Word8(W8#), Word16(W16#), Word32(W32#), Word64(W64#) )
    263 276
     
    
    264 277
     import GHC.Internal.Unsafe.Coerce( UnsafeEquality(..), unsafeEqualityProof )
    
    265 278
     
    
    266
    -import GHC.Internal.StaticPtr( IsStatic(..) )
    
    279
    +import GHC.Internal.StaticPtr( IsStatic(..), StaticPtr(..), StaticPtrInfo(..) )
    
    267 280
     import GHC.Internal.StaticPtr.Internal( makeStatic )
    
    268 281
     
    
    269 282
     import GHC.Internal.Stable( StablePtr, newStablePtr )
    
    ... ... @@ -280,7 +293,8 @@ import GHC.Internal.TH.Lib
    280 293
     import GHC.Internal.TH.Lift
    
    281 294
     import GHC.Internal.TH.Monad
    
    282 295
     import GHC.Internal.TopHandler
    
    283
    -import GHC.Internal.Classes.IP (IP)
    
    284 296
     import GHC.Internal.GHCi
    
    285 297
     import GHC.Internal.Desugar (toAnnotationWrapper)
    
    286 298
     import GHC.Internal.Stack.Types
    
    299
    +import GHC.Internal.Exception.Context
    
    300
    +import GHC.Internal.JS.Prim (unsafeUnpackJSStringUtf8##)

  • libraries/ghc-internal/src/GHC/Internal/Exception/Context.hs
    ... ... @@ -6,6 +6,7 @@
    6 6
     {-# LANGUAGE GADTs #-}
    
    7 7
     {-# OPTIONS_HADDOCK not-home #-}
    
    8 8
     
    
    9
    +{-# OPTIONS_GHC -fdefines-known-key-names #-}
    
    9 10
     -----------------------------------------------------------------------------
    
    10 11
     -- |
    
    11 12
     -- Module      :  GHC.Internal.Exception.Context
    

  • libraries/ghc-internal/src/GHC/Internal/Exception/Context.hs-boot
    1 1
     {-# LANGUAGE NoImplicitPrelude #-}
    
    2
    +{-# OPTIONS_GHC -fdefines-known-key-names #-}
    
    2 3
     
    
    3 4
     module GHC.Internal.Exception.Context where
    
    4 5
     
    

  • libraries/ghc-internal/src/GHC/Internal/JS/Prim.hs
    ... ... @@ -6,6 +6,8 @@
    6 6
     {-# LANGUAGE UnliftedFFITypes #-}
    
    7 7
     {-# LANGUAGE UnboxedTuples #-}
    
    8 8
     
    
    9
    +{-# OPTIONS_GHC -fdefines-known-key-names #-}
    
    10
    +
    
    9 11
     module GHC.Internal.JS.Prim ( JSVal(..), JSVal#
    
    10 12
                        , JSException(..)
    
    11 13
                        , WouldBlockException(..)
    

  • libraries/ghc-internal/src/GHC/Internal/Stack/Types.hs
    ... ... @@ -9,6 +9,7 @@
    9 9
     -- we hide this module from haddock to enforce GHC.Internal.Stack as the main
    
    10 10
     -- access point.
    
    11 11
     
    
    12
    +{-# OPTIONS_GHC -fdefines-known-key-names #-}
    
    12 13
     -----------------------------------------------------------------------------
    
    13 14
     -- |
    
    14 15
     -- Module      :  GHC.Internal.Stack.Types
    

  • libraries/ghc-internal/src/GHC/Internal/Types.hs
    ... ... @@ -8,7 +8,6 @@
    8 8
     -- NegativeLiterals: see Note [Fixity of (->)]
    
    9 9
     
    
    10 10
     {-# OPTIONS_HADDOCK print-explicit-runtime-reps #-}
    
    11
    -{-# OPTIONS_GHC -frebindable-known-names #-} -- built-in type reps (e.g. krepStar) are defined in this module.
    
    12 11
     
    
    13 12
     -----------------------------------------------------------------------------
    
    14 13
     -- |