Simon Peyton Jones pushed to branch wip/spj-reinstallable-base at Glasgow Haskell Compiler / GHC
Commits:
-
9308eece
by Simon Peyton Jones at 2026-03-17T13:52:15+00:00
15 changed files:
- compiler/GHC/Builtin/Names.hs
- compiler/GHC/Driver/DynFlags.hs
- compiler/GHC/Driver/Flags.hs
- compiler/GHC/Driver/Session.hs
- compiler/GHC/HsToCore/Monad.hs
- compiler/GHC/Rename/Env.hs
- compiler/GHC/Tc/Gen/Default.hs
- compiler/GHC/Tc/Utils/Env.hs
- libraries/base/base.cabal.in
- libraries/ghc-internal/ghc-internal.cabal.in
- libraries/ghc-internal/src/GHC/Internal/Classes.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Foldable.hs
- libraries/ghc-internal/src/GHC/Internal/Data/Traversable.hs
- libraries/ghc-internal/src/GHC/Internal/LanguageExtensions.hs
- libraries/ghc-internal/src/GHC/Internal/Real.hs
Changes:
| ... | ... | @@ -193,7 +193,13 @@ wired in ones are defined in GHC.Builtin.Types etc. |
| 193 | 193 | |
| 194 | 194 | basicKnownKeyTable :: [(OccName, Unique)]
|
| 195 | 195 | basicKnownKeyTable
|
| 196 | - = [ (mkTcOcc "Rational", rationalTyConKey) ]
|
|
| 196 | + = [ (mkTcOcc "Rational", rationalTyConKey)
|
|
| 197 | + , (mkTcOcc "Eq", eqClassKey)
|
|
| 198 | + , (mkTcOcc "Ord", ordClassKey)
|
|
| 199 | + , (mkTcOcc "Show", showClassKey)
|
|
| 200 | + , (mkTcOcc "Foldable", foldableClassKey)
|
|
| 201 | + , (mkTcOcc "Traversable", traversableClassKey)
|
|
| 202 | + ]
|
|
| 197 | 203 | |
| 198 | 204 | basicKnownKeyNames :: [Name] -- See Note [Known-key names]
|
| 199 | 205 | basicKnownKeyNames
|
| ... | ... | @@ -201,8 +207,6 @@ basicKnownKeyNames |
| 201 | 207 | ++ [ -- Classes. *Must* include:
|
| 202 | 208 | -- classes that are grabbed by key (e.g., eqClassKey)
|
| 203 | 209 | -- classes in "Class.standardClassKeys" (quite a few)
|
| 204 | - eqClassName, -- mentioned, derivable
|
|
| 205 | - ordClassName, -- derivable
|
|
| 206 | 210 | boundedClassName, -- derivable
|
| 207 | 211 | numClassName, -- mentioned, numeric
|
| 208 | 212 | enumClassName, -- derivable
|
| ... | ... | @@ -218,8 +222,6 @@ basicKnownKeyNames |
| 218 | 222 | isStringClassName,
|
| 219 | 223 | applicativeClassName,
|
| 220 | 224 | alternativeClassName,
|
| 221 | - foldableClassName,
|
|
| 222 | - traversableClassName,
|
|
| 223 | 225 | semigroupClassName, sappendName,
|
| 224 | 226 | monoidClassName, memptyName, mappendName, mconcatName,
|
| 225 | 227 | |
| ... | ... | @@ -315,9 +317,6 @@ basicKnownKeyNames |
| 315 | 317 | -- Ix stuff
|
| 316 | 318 | ixClassName,
|
| 317 | 319 | |
| 318 | - -- Show stuff
|
|
| 319 | - showClassName,
|
|
| 320 | - |
|
| 321 | 320 | -- Read stuff
|
| 322 | 321 | readClassName,
|
| 323 | 322 | |
| ... | ... | @@ -1010,10 +1009,8 @@ inlineIdName :: Name |
| 1010 | 1009 | inlineIdName = varQual gHC_MAGIC (fsLit "inline") inlineIdKey
|
| 1011 | 1010 | |
| 1012 | 1011 | -- Base classes (Eq, Ord, Functor)
|
| 1013 | -fmapName, eqClassName, eqName, ordClassName, geName, functorClassName :: Name
|
|
| 1014 | -eqClassName = clsQual gHC_CLASSES (fsLit "Eq") eqClassKey
|
|
| 1012 | +fmapName, eqName, geName, functorClassName :: Name
|
|
| 1015 | 1013 | eqName = varQual gHC_CLASSES (fsLit "==") eqClassOpKey
|
| 1016 | -ordClassName = clsQual gHC_CLASSES (fsLit "Ord") ordClassKey
|
|
| 1017 | 1014 | geName = varQual gHC_CLASSES (fsLit ">=") geClassOpKey
|
| 1018 | 1015 | functorClassName = clsQual gHC_INTERNAL_BASE (fsLit "Functor") functorClassKey
|
| 1019 | 1016 | fmapName = varQual gHC_INTERNAL_BASE (fsLit "fmap") fmapClassOpKey
|
| ... | ... | @@ -1038,8 +1035,7 @@ pureAName = varQual gHC_INTERNAL_BASE (fsLit "pure") pureAClas |
| 1038 | 1035 | thenAName = varQual gHC_INTERNAL_BASE (fsLit "*>") thenAClassOpKey
|
| 1039 | 1036 | |
| 1040 | 1037 | -- Classes (Foldable, Traversable)
|
| 1041 | -foldableClassName, traversableClassName :: Name
|
|
| 1042 | -foldableClassName = clsQual gHC_INTERNAL_DATA_FOLDABLE (fsLit "Foldable") foldableClassKey
|
|
| 1038 | +traversableClassName :: Name
|
|
| 1043 | 1039 | traversableClassName = clsQual gHC_INTERNAL_DATA_TRAVERSABLE (fsLit "Traversable") traversableClassKey
|
| 1044 | 1040 | |
| 1045 | 1041 | -- Classes (Semigroup, Monoid)
|
| ... | ... | @@ -1427,10 +1423,6 @@ getFieldName, setFieldName :: Name |
| 1427 | 1423 | getFieldName = varQual gHC_INTERNAL_RECORDS (fsLit "getField") getFieldClassOpKey
|
| 1428 | 1424 | setFieldName = varQual gHC_INTERNAL_RECORDS (fsLit "setField") setFieldClassOpKey
|
| 1429 | 1425 | |
| 1430 | --- Class Show
|
|
| 1431 | -showClassName :: Name
|
|
| 1432 | -showClassName = clsQual gHC_INTERNAL_SHOW (fsLit "Show") showClassKey
|
|
| 1433 | - |
|
| 1434 | 1426 | -- Class Read
|
| 1435 | 1427 | readClassName :: Name
|
| 1436 | 1428 | readClassName = clsQual gHC_INTERNAL_READ (fsLit "Read") readClassKey
|
| ... | ... | @@ -2650,14 +2642,9 @@ derivableClassKeys |
| 2650 | 2642 | = [ eqClassKey, ordClassKey, enumClassKey, ixClassKey,
|
| 2651 | 2643 | boundedClassKey, showClassKey, readClassKey ]
|
| 2652 | 2644 | |
| 2653 | - |
|
| 2645 | +interactiveClassKeys :: [Unique]
|
|
| 2654 | 2646 | -- These are the "interactive classes" that are consulted when doing
|
| 2655 | 2647 | -- defaulting. Does not include Num or IsString, which have special
|
| 2656 | 2648 | -- handling.
|
| 2657 | -interactiveClassNames :: [Name]
|
|
| 2658 | -interactiveClassNames
|
|
| 2659 | - = [ showClassName, eqClassName, ordClassName, foldableClassName
|
|
| 2660 | - , traversableClassName ]
|
|
| 2661 | - |
|
| 2662 | -interactiveClassKeys :: [Unique]
|
|
| 2663 | -interactiveClassKeys = map getUnique interactiveClassNames |
|
| 2649 | +interactiveClassKeys = [ showClassKey, eqClassKey, ordClassKey
|
|
| 2650 | + , foldableClassKey, traversableClassKey ] |
| ... | ... | @@ -1382,9 +1382,7 @@ languageExtensions :: Maybe Language -> [LangExt.Extension] |
| 1382 | 1382 | languageExtensions Nothing = languageExtensions (Just defaultLanguage)
|
| 1383 | 1383 | |
| 1384 | 1384 | languageExtensions (Just Haskell98)
|
| 1385 | - = [LangExt.ImplicitPrelude,
|
|
| 1386 | - LangExt.ImplicitKnownKeyNames,
|
|
| 1387 | - -- See Note [When is StarIsType enabled]
|
|
| 1385 | + = [-- See Note [When is StarIsType enabled]
|
|
| 1388 | 1386 | LangExt.StarIsType,
|
| 1389 | 1387 | LangExt.CUSKs,
|
| 1390 | 1388 | LangExt.MonomorphismRestriction,
|
| ... | ... | @@ -1405,9 +1403,7 @@ languageExtensions (Just Haskell98) |
| 1405 | 1403 | ]
|
| 1406 | 1404 | |
| 1407 | 1405 | languageExtensions (Just Haskell2010)
|
| 1408 | - = [LangExt.ImplicitPrelude,
|
|
| 1409 | - LangExt.ImplicitKnownKeyNames,
|
|
| 1410 | - -- See Note [When is StarIsType enabled]
|
|
| 1406 | + = [-- See Note [When is StarIsType enabled]
|
|
| 1411 | 1407 | LangExt.StarIsType,
|
| 1412 | 1408 | LangExt.CUSKs,
|
| 1413 | 1409 | LangExt.MonomorphismRestriction,
|
| ... | ... | @@ -1425,9 +1421,7 @@ languageExtensions (Just Haskell2010) |
| 1425 | 1421 | ]
|
| 1426 | 1422 | |
| 1427 | 1423 | languageExtensions (Just GHC2021)
|
| 1428 | - = [LangExt.ImplicitPrelude,
|
|
| 1429 | - LangExt.ImplicitKnownKeyNames,
|
|
| 1430 | - -- See Note [When is StarIsType enabled]
|
|
| 1424 | + = [-- See Note [When is StarIsType enabled]
|
|
| 1431 | 1425 | LangExt.StarIsType,
|
| 1432 | 1426 | LangExt.MonomorphismRestriction,
|
| 1433 | 1427 | LangExt.TraditionalRecordSyntax,
|
| ... | ... | @@ -149,8 +149,6 @@ extensionName = \case |
| 149 | 149 | LangExt.QuasiQuotes -> "QuasiQuotes"
|
| 150 | 150 | LangExt.ImplicitParams -> "ImplicitParams"
|
| 151 | 151 | LangExt.ImplicitPrelude -> "ImplicitPrelude"
|
| 152 | - LangExt.ImplicitKnownKeyNames -> "ImplicitKnownKeyNames"
|
|
| 153 | - LangExt.DefinesKnownKeyNames -> "DefinesKnownKeyNames"
|
|
| 154 | 152 | LangExt.ScopedTypeVariables -> "ScopedTypeVariables"
|
| 155 | 153 | LangExt.AllowAmbiguousTypes -> "AllowAmbiguousTypes"
|
| 156 | 154 | LangExt.UnboxedTuples -> "UnboxedTuples"
|
| ... | ... | @@ -889,6 +887,10 @@ data GeneralFlag |
| 889 | 887 | |
| 890 | 888 | | Opt_G_NoStateHack
|
| 891 | 889 | | Opt_G_NoOptCoercion
|
| 890 | + |
|
| 891 | + -- Known-key names
|
|
| 892 | + | Opt_DefinesKnownKeyNames
|
|
| 893 | + | Opt_RebindableKnownKeyNames
|
|
| 892 | 894 | deriving (Eq, Show, Enum)
|
| 893 | 895 | |
| 894 | 896 | -- | The set of flags which affect optimisation for the purposes of
|
| ... | ... | @@ -1001,7 +1003,6 @@ data WarningFlag = |
| 1001 | 1003 | | Opt_WarnRedundantConstraints
|
| 1002 | 1004 | | Opt_WarnHiShadows
|
| 1003 | 1005 | | Opt_WarnImplicitPrelude
|
| 1004 | - -- TODO: Opt_WarnImplicitKnownKeyNames
|
|
| 1005 | 1006 | | Opt_WarnIncompletePatterns
|
| 1006 | 1007 | | Opt_WarnIncompleteUniPatterns
|
| 1007 | 1008 | | Opt_WarnIncompletePatternsRecUpd
|
| ... | ... | @@ -2665,7 +2665,11 @@ fFlagsDeps = [ |
| 2665 | 2665 | flagSpec "break-points" Opt_InsertBreakpoints,
|
| 2666 | 2666 | flagSpec "info-table-map" Opt_InfoTableMap,
|
| 2667 | 2667 | flagSpec "info-table-map-with-stack" Opt_InfoTableMapWithStack,
|
| 2668 | - flagSpec "info-table-map-with-fallback" Opt_InfoTableMapWithFallback
|
|
| 2668 | + flagSpec "info-table-map-with-fallback" Opt_InfoTableMapWithFallback,
|
|
| 2669 | + |
|
| 2670 | + -- Known-key names
|
|
| 2671 | + flagSpec "defines-known-key-names" Opt_DefinesKnownKeyNames,
|
|
| 2672 | + flagSpec "rebindable-known-key-names" Opt_RebindableKnownKeyNames
|
|
| 2669 | 2673 | ]
|
| 2670 | 2674 | ++ fHoleFlags
|
| 2671 | 2675 |
| ... | ... | @@ -567,10 +567,10 @@ instance MonadThings (IOEnv (Env DsGblEnv DsLclEnv)) where |
| 567 | 567 | |
| 568 | 568 | dsLookupKnownKey :: Unique -> DsM TyThing
|
| 569 | 569 | dsLookupKnownKey uniq
|
| 570 | - = do { normal_path <- xoptM LangExt.ImplicitKnownKeyNames
|
|
| 571 | - ; mb_rdr_env <- if normal_path
|
|
| 572 | - then return Nothing
|
|
| 573 | - else Just <$> dsGetGlobalRdrEnv
|
|
| 570 | + = do { rebindable_path <- goptM Opt_RebindableKnownKeyNames
|
|
| 571 | + ; mb_rdr_env <- if rebindable_path
|
|
| 572 | + then Just <$> dsGetGlobalRdrEnv
|
|
| 573 | + else return Nothing
|
|
| 574 | 574 | ; dsToIfL $
|
| 575 | 575 | do { mb_res <- lookupKnownKeyThing mb_rdr_env uniq
|
| 576 | 576 | ; case mb_res of
|
| ... | ... | @@ -252,7 +252,7 @@ newTopVanillaSrcBinder occ loc |
| 252 | 252 | = do { this_mod <- getModule
|
| 253 | 253 | |
| 254 | 254 | -- See if this bindings is for a known-key name, and if so get its Unique
|
| 255 | - ; defines_known_keys <- xoptM LangExt.DefinesKnownKeyNames
|
|
| 255 | + ; defines_known_keys <- goptM Opt_DefinesKnownKeyNames
|
|
| 256 | 256 | ; let mb_uniq :: Maybe Unique
|
| 257 | 257 | mb_uniq | defines_known_keys = lookupOccEnv knownKeyOccMap occ
|
| 258 | 258 | | otherwise = Nothing
|
| ... | ... | @@ -157,7 +157,8 @@ tcDefaultDecls decls = |
| 157 | 157 | -- typeclass when typechecking such a default declaration. To do this, we wrap
|
| 158 | 158 | -- calls of 'tcLookupClass' in 'tryTc'.
|
| 159 | 159 | (True, [L _ (DefaultDecl _ Nothing [])]) -> do
|
| 160 | - h2010_dflt_clss <- foldMapM (fmap maybeToList . fmap fst . tryTc . tcLookupClass) =<< getH2010DefaultNames
|
|
| 160 | + h2010_dflt_clss <- foldMapM (fmap maybeToList . fmap fst . tryTc . tcLookupKnownKeyClass)
|
|
| 161 | + =<< getH2010DefaultKeys
|
|
| 161 | 162 | case NE.nonEmpty h2010_dflt_clss of
|
| 162 | 163 | Nothing -> return []
|
| 163 | 164 | Just h2010_dflt_clss' -> toClassDefaults h2010_dflt_clss' decls
|
| ... | ... | @@ -176,18 +177,21 @@ tcDefaultDecls decls = |
| 176 | 177 | -- No extensions: Num
|
| 177 | 178 | -- OverloadedStrings: add IsString
|
| 178 | 179 | -- ExtendedDefaults: add Show, Eq, Ord, Foldable, Traversable
|
| 179 | - getH2010DefaultClasses = mapM tcLookupClass =<< getH2010DefaultNames
|
|
| 180 | - getH2010DefaultNames
|
|
| 180 | + getH2010DefaultClasses = do { keys <- getH2010DefaultKeys
|
|
| 181 | + ; mapM tcLookupKnownKeyClass keys }
|
|
| 182 | + |
|
| 183 | + getH2010DefaultKeys :: TcM (NonEmpty Unique)
|
|
| 184 | + getH2010DefaultKeys
|
|
| 181 | 185 | = do { ovl_str <- xoptM LangExt.OverloadedStrings
|
| 182 | 186 | ; ext_deflt <- xoptM LangExt.ExtendedDefaultRules
|
| 183 | 187 | ; let deflt_str = if ovl_str
|
| 184 | - then [isStringClassName]
|
|
| 188 | + then [isStringClassKey]
|
|
| 185 | 189 | else []
|
| 186 | 190 | ; let deflt_interactive = if ext_deflt
|
| 187 | - then interactiveClassNames
|
|
| 191 | + then interactiveClassKeys
|
|
| 188 | 192 | else []
|
| 189 | 193 | ; let extra_clss_names = deflt_str ++ deflt_interactive
|
| 190 | - ; return $ numClassName :| extra_clss_names
|
|
| 194 | + ; return $ numClassKey :| extra_clss_names
|
|
| 191 | 195 | }
|
| 192 | 196 | declarationParts :: NonEmpty Class -> LDefaultDecl GhcRn -> TcM (Maybe (Maybe Class, LDefaultDecl GhcRn, [Type]))
|
| 193 | 197 | declarationParts h2010_dflt_clss decl@(L locn (DefaultDecl _ mb_cls_name dflt_hs_tys))
|
| ... | ... | @@ -29,6 +29,8 @@ module GHC.Tc.Utils.Env( |
| 29 | 29 | addTypecheckedBinds, addEvBinds, addTopEvBinds,
|
| 30 | 30 | failIllegalTyCon, failIllegalTyVar,
|
| 31 | 31 | |
| 32 | + tcLookupKnownKeyGlobal, tcLookupKnownKeyTyCon, tcLookupKnownKeyClass,
|
|
| 33 | + |
|
| 32 | 34 | -- Local environment
|
| 33 | 35 | tcExtendKindEnv, tcExtendKindEnvList,
|
| 34 | 36 | tcExtendTyVarEnv, tcExtendNameTyVarEnv,
|
| ... | ... | @@ -497,6 +499,39 @@ to bring the data constructor A into scope. We thus emit the following message: |
| 497 | 499 | Add ‘A’ to the import list in the import of M1
|
| 498 | 500 | |
| 499 | 501 | ************************************************************************
|
| 502 | +* *
|
|
| 503 | + Looking up known-key things
|
|
| 504 | +* *
|
|
| 505 | +************************************************************************
|
|
| 506 | +-}
|
|
| 507 | + |
|
| 508 | +tcLookupKnownKeyGlobal :: Unique -> TcM TyThing
|
|
| 509 | +tcLookupKnownKeyGlobal uniq
|
|
| 510 | + = do { rebindable_path <- goptM Opt_RebindableKnownKeyNames
|
|
| 511 | + ; mb_rdr_env <- if rebindable_path
|
|
| 512 | + then Just <$> getGlobalRdrEnv
|
|
| 513 | + else return Nothing
|
|
| 514 | + ; mb_thing <- initIfaceTcRn (lookupKnownKeyThing mb_rdr_env uniq)
|
|
| 515 | + ; case mb_thing of
|
|
| 516 | + Succeeded thing -> return thing
|
|
| 517 | + Failed msg -> failWithTc (TcRnInterfaceError msg) }
|
|
| 518 | + |
|
| 519 | +tcLookupKnownKeyClass :: Unique -> TcM Class
|
|
| 520 | +tcLookupKnownKeyClass uniq
|
|
| 521 | + = do { thing <- tcLookupKnownKeyGlobal uniq
|
|
| 522 | + ; case thing of
|
|
| 523 | + ATyCon tc | Just cls <- tyConClass_maybe tc
|
|
| 524 | + -> return cls
|
|
| 525 | + _ -> wrongThingErr WrongThingClass (AGlobal thing) (getName thing) }
|
|
| 526 | + |
|
| 527 | +tcLookupKnownKeyTyCon :: Unique -> TcM TyCon
|
|
| 528 | +tcLookupKnownKeyTyCon uniq
|
|
| 529 | + = do { thing <- tcLookupKnownKeyGlobal uniq
|
|
| 530 | + ; case thing of
|
|
| 531 | + ATyCon tc -> return tc
|
|
| 532 | + _ -> wrongThingErr WrongThingClass (AGlobal thing) (getName thing) }
|
|
| 533 | + |
|
| 534 | +{- *********************************************************************
|
|
| 500 | 535 | * *
|
| 501 | 536 | Extending the global environment
|
| 502 | 537 | * *
|
| ... | ... | @@ -955,15 +990,8 @@ tcExtendRules lcl_rules thing_inside |
| 955 | 990 | |
| 956 | 991 | tcMetaKnownKeyTy :: HasDebugCallStack => Unique -> TcM Type
|
| 957 | 992 | tcMetaKnownKeyTy uniq
|
| 958 | - = do { normal_path <- xoptM LangExt.ImplicitKnownKeyNames
|
|
| 959 | - ; mb_rdr_env <- if normal_path
|
|
| 960 | - then return Nothing
|
|
| 961 | - else Just <$> getGlobalRdrEnv
|
|
| 962 | - ; mb_thing <- initIfaceTcRn (lookupKnownKeyThing mb_rdr_env uniq)
|
|
| 963 | - ; case mb_thing of
|
|
| 964 | - Succeeded (ATyCon tc) -> return (mkTyConTy tc)
|
|
| 965 | - Succeeded thing -> wrongThingErr WrongThingTyCon (AGlobal thing) (getName thing)
|
|
| 966 | - Failed msg -> failWithTc (TcRnInterfaceError msg) }
|
|
| 993 | + = do { tc <- tcLookupKnownKeyTyCon uniq
|
|
| 994 | + ; return (mkTyConTy tc) }
|
|
| 967 | 995 | |
| 968 | 996 | tcMetaTy :: Name -> TcM Type
|
| 969 | 997 | -- Given the name of a Template Haskell data type,
|
| ... | ... | @@ -1035,9 +1063,9 @@ tcGetDefaultTys |
| 1035 | 1063 | { extDef <- if extended_defaults
|
| 1036 | 1064 | then do { list_ty <- tcMetaTy listTyConName
|
| 1037 | 1065 | ; integer_ty <- tcMetaTy integerTyConName
|
| 1038 | - ; foldableClass <- tcLookupClass foldableClassName
|
|
| 1039 | - ; showClass <- tcLookupClass showClassName
|
|
| 1040 | - ; eqClass <- tcLookupClass eqClassName
|
|
| 1066 | + ; foldableClass <- tcLookupKnownKeyClass foldableClassKey
|
|
| 1067 | + ; showClass <- tcLookupKnownKeyClass showClassKey
|
|
| 1068 | + ; eqClass <- tcLookupKnownKeyClass eqClassKey
|
|
| 1041 | 1069 | ; pure $ defaultEnv
|
| 1042 | 1070 | [ builtinDefaults foldableClass [list_ty]
|
| 1043 | 1071 | , builtinDefaults showClass [unitTy, integer_ty, doubleTy]
|
| ... | ... | @@ -28,11 +28,15 @@ extra-doc-files: |
| 28 | 28 | |
| 29 | 29 | Library
|
| 30 | 30 | default-language: Haskell2010
|
| 31 | - default-extensions: NoImplicitPrelude, NoImplicitKnownKeyNames
|
|
| 31 | + default-extensions: NoImplicitPrelude
|
|
| 32 | 32 | build-depends:
|
| 33 | 33 | ghc-internal == @ProjectVersionForLib@.*,
|
| 34 | 34 | ghc-prim,
|
| 35 | 35 | |
| 36 | + -- Set -frebindable-known-key-names,
|
|
| 37 | + -- since GHC.KnownKeyNames isn't available yet
|
|
| 38 | + ghc-options: -frebindable-known-key-names
|
|
| 39 | + |
|
| 36 | 40 | exposed-modules:
|
| 37 | 41 | Control.Applicative
|
| 38 | 42 | , Control.Concurrent
|
| ... | ... | @@ -571,5 +571,9 @@ Library |
| 571 | 571 | -- as it's magic.
|
| 572 | 572 | ghc-options: -this-unit-id ghc-internal
|
| 573 | 573 | |
| 574 | + -- Set -frebindable-known-key-names,
|
|
| 575 | + -- since GHC.KnownKeyNames isn't available yet
|
|
| 576 | + ghc-options: -frebindable-known-key-names
|
|
| 577 | + |
|
| 574 | 578 | -- Make sure we don't accidentally regress into anti-patterns
|
| 575 | 579 | ghc-options: -Wcompat -Wnoncanonical-monad-instances |
| ... | ... | @@ -7,6 +7,9 @@ |
| 7 | 7 | {-# LANGUAGE UndecidableSuperClasses #-}
|
| 8 | 8 | -- Because of the type-variable superclasses for tuples
|
| 9 | 9 | |
| 10 | +{-# LANGUAGE_GHC -fdefines-known-key-names #-}
|
|
| 11 | + -- Defines Eq, Ord
|
|
| 12 | + |
|
| 10 | 13 | {-# OPTIONS_GHC -Wno-unused-imports #-}
|
| 11 | 14 | -- -Wno-unused-imports needed for the GHC.Internal.Tuple import below. Sigh.
|
| 12 | 15 |
| ... | ... | @@ -6,6 +6,9 @@ |
| 6 | 6 | {-# LANGUAGE Trustworthy #-}
|
| 7 | 7 | {-# LANGUAGE TypeOperators #-}
|
| 8 | 8 | |
| 9 | +{-# LANGUAGE_GHC -fdefines-known-key-names #-}
|
|
| 10 | + -- Defines Foldable
|
|
| 11 | + |
|
| 9 | 12 | -----------------------------------------------------------------------------
|
| 10 | 13 | -- |
|
| 11 | 14 | -- Module : GHC.Internal.Data.Foldable
|
| ... | ... | @@ -7,6 +7,9 @@ |
| 7 | 7 | {-# LANGUAGE TypeApplications #-}
|
| 8 | 8 | {-# LANGUAGE TypeOperators #-}
|
| 9 | 9 | |
| 10 | +{-# LANGUAGE_GHC -fdefines-known-key-names #-}
|
|
| 11 | + -- Defines Traversable
|
|
| 12 | + |
|
| 10 | 13 | -----------------------------------------------------------------------------
|
| 11 | 14 | -- |
|
| 12 | 15 | -- Module : GHC.Internal.Data.Traversable
|
| ... | ... | @@ -55,8 +55,6 @@ data Extension |
| 55 | 55 | | QuasiQuotes
|
| 56 | 56 | | ImplicitParams
|
| 57 | 57 | | ImplicitPrelude
|
| 58 | - | ImplicitKnownKeyNames -- See Note [Overview of known-key names]
|
|
| 59 | - | DefinesKnownKeyNames -- See Note [Overview of known-key names]
|
|
| 60 | 58 | | ScopedTypeVariables
|
| 61 | 59 | | AllowAmbiguousTypes
|
| 62 | 60 | | UnboxedTuples
|
| 1 | 1 | {-# LANGUAGE Trustworthy #-}
|
| 2 | -{-# LANGUAGE DefinesKnownKeyNames #-}
|
|
| 3 | 2 | {-# LANGUAGE CPP, NoImplicitPrelude, MagicHash, UnboxedTuples, BangPatterns #-}
|
| 3 | + |
|
| 4 | +{-# OPTIONS_GHC -fdefines-known-key-names #-}
|
|
| 4 | 5 | {-# OPTIONS_GHC -Wno-orphans #-}
|
| 6 | + |
|
| 5 | 7 | {-# OPTIONS_HADDOCK not-home #-}
|
| 6 | 8 | |
| 7 | 9 | -----------------------------------------------------------------------------
|