From 8abfa45f4c3ef3bf601fc15452a76b4b1ffefc1a Mon Sep 17 00:00:00 2001 From: Krzysztof Gogolewski Date: Tue, 3 May 2022 12:59:18 +0200 Subject: Fix several note references, part 2 --- compiler/GHC/Core/InstEnv.hs | 2 +- compiler/GHC/Core/RoughMap.hs | 2 +- compiler/GHC/HsToCore/Binds.hs | 10 ++++---- compiler/GHC/HsToCore/Docs.hs | 4 +-- compiler/GHC/HsToCore/Utils.hs | 4 +-- compiler/GHC/Rename/Splice.hs | 2 +- compiler/GHC/Runtime/Eval.hs | 2 +- compiler/GHC/Runtime/Interpreter.hs | 2 +- compiler/GHC/Tc/Errors.hs | 4 +-- compiler/GHC/Tc/Errors/Ppr.hs | 2 +- compiler/GHC/Tc/Errors/Types.hs | 3 +-- compiler/GHC/Tc/Gen/Arrow.hs | 2 +- compiler/GHC/Tc/Gen/Foreign.hs | 2 +- compiler/GHC/Tc/Gen/Match.hs | 6 ++--- compiler/GHC/Tc/Gen/Pat.hs | 8 ++---- compiler/GHC/Tc/TyCl.hs | 5 ++-- compiler/GHC/Tc/TyCl/Instance.hs | 2 +- compiler/GHC/Tc/Types.hs | 2 +- compiler/GHC/Tc/Utils/Env.hs | 7 ++---- compiler/GHC/Tc/Utils/TcMType.hs | 2 +- compiler/GHC/Tc/Utils/TcType.hs | 2 +- compiler/GHC/ThToHs.hs | 3 ++- compiler/GHC/Types/Basic.hs | 2 +- compiler/GHC/Types/Demand.hs | 2 +- compiler/GHC/Types/Unique.hs | 2 +- ghc/GHCi/UI.hs | 2 +- testsuite/tests/linters/notes.stdout | 39 ----------------------------- testsuite/tests/perf/join_points/join005.hs | 4 +-- 28 files changed, 41 insertions(+), 88 deletions(-) diff --git a/compiler/GHC/Core/InstEnv.hs b/compiler/GHC/Core/InstEnv.hs index 63dde6f6b5..45ecd4f2b5 100644 --- a/compiler/GHC/Core/InstEnv.hs +++ b/compiler/GHC/Core/InstEnv.hs @@ -965,7 +965,7 @@ lookupInstEnv check_overlap_safe (m:_) | isIncoherent (fst m) -> NoUnifiers _ -> all_unifs - -- NOTE [Safe Haskell isSafeOverlap] + -- Note [Safe Haskell isSafeOverlap] -- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -- We restrict code compiled in 'Safe' mode from overriding code -- compiled in any other mode. The rationale is that code compiled diff --git a/compiler/GHC/Core/RoughMap.hs b/compiler/GHC/Core/RoughMap.hs index cc64e96149..30145ee544 100644 --- a/compiler/GHC/Core/RoughMap.hs +++ b/compiler/GHC/Core/RoughMap.hs @@ -180,7 +180,7 @@ Where mightMatch is defined like this: mightMatch [] [] = True -- A perfectly sized match might match mightMatch key [] = True -- A shorter lookup key matches everything mightMatch [] (_:_) = True -- If the lookup key is longer, then still might match - -- Note [RoughMatch and beta reduction] + -- Note [RoughMap and beta reduction] mightMatch (k:ks) (lk:lks) = = case (k,lk) of -- Standard case, matching on a specific known TyCon. diff --git a/compiler/GHC/HsToCore/Binds.hs b/compiler/GHC/HsToCore/Binds.hs index 9da2ecbc02..fe7747a4a1 100644 --- a/compiler/GHC/HsToCore/Binds.hs +++ b/compiler/GHC/HsToCore/Binds.hs @@ -847,7 +847,7 @@ decomposeRuleLhs :: DynFlags -> [Var] -> CoreExpr -> Either DsMessage ([Var], Id, [CoreExpr]) -- (decomposeRuleLhs bndrs lhs) takes apart the LHS of a RULE, -- The 'bndrs' are the quantified binders of the rules, but decomposeRuleLhs --- may add some extra dictionary binders (see Note [Free dictionaries]) +-- may add some extra dictionary binders (see Note [Free dictionaries on rule LHS]) -- -- Returns an error message if the LHS isn't of the expected shape -- Note [Decomposing the left-hand side of a RULE] @@ -881,8 +881,8 @@ decomposeRuleLhs dflags orig_bndrs orig_lhs orig_bndr_set = mkVarSet orig_bndrs - -- Add extra tyvar binders: Note [Free tyvars in rule LHS] - -- and extra dict binders: Note [Free dictionaries in rule LHS] + -- Add extra tyvar binders: Note [Free tyvars on rule LHS] + -- and extra dict binders: Note [Free dictionaries on rule LHS] mk_extra_bndrs fn_id args = scopedSort unbound_tvs ++ unbound_dicts where @@ -940,7 +940,7 @@ Note [Decomposing the left-hand side of a RULE] There are several things going on here. * drop_dicts: see Note [Drop dictionary bindings on rule LHS] * simpleOptExpr: see Note [Simplify rule LHS] -* extra_dict_bndrs: see Note [Free dictionaries] +* extra_dict_bndrs: see Note [Free dictionaries on rule LHS] Note [Free tyvars on rule LHS] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -997,7 +997,7 @@ drop_dicts drops dictionary bindings on the LHS where possible. --> f d Reasoning here is that there is only one d:Eq [Int], and so we can quantify over it. That makes 'd' free in the LHS, but that is later - picked up by extra_dict_bndrs (Note [Dead spec binders]). + picked up by extra_dict_bndrs (see Note [Unused spec binders]). NB 1: We can only drop the binding if the RHS doesn't bind one of the orig_bndrs, which we assume occur on RHS. diff --git a/compiler/GHC/HsToCore/Docs.hs b/compiler/GHC/HsToCore/Docs.hs index c4839ae449..7bf49a6c8d 100644 --- a/compiler/GHC/HsToCore/Docs.hs +++ b/compiler/GHC/HsToCore/Docs.hs @@ -273,8 +273,8 @@ mkMaps env instances decls = names _ decl = getMainDeclBinder env decl {- -Note [1]: ---------- +Note [1] +~~~~~~~~ We relate ClsInsts to InstDecls and DerivDecls using the SrcSpans buried inside them. That should work for normal user-written instances (from looking at GHC sources). We can assume that commented instances are diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs index b962b9bd39..be165c80dd 100644 --- a/compiler/GHC/HsToCore/Utils.hs +++ b/compiler/GHC/HsToCore/Utils.hs @@ -933,8 +933,8 @@ Note [Failure thunks and CPR] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ (This note predates join points as formal entities (hence the quotation marks). We can't use actual join points here (see above); if we did, this would also -solve the CPR problem, since join points don't get CPR'd. See Note [Don't CPR -join points] in GHC.Core.Opt.WorkWrap.) +solve the CPR problem, since join points don't get CPR'd. See Note [Don't w/w +join points for CPR] in GHC.Core.Opt.WorkWrap.) When we make a failure point we ensure that it does not look like a thunk. Example: diff --git a/compiler/GHC/Rename/Splice.hs b/compiler/GHC/Rename/Splice.hs index e9eb2c78bb..e67e480d78 100644 --- a/compiler/GHC/Rename/Splice.hs +++ b/compiler/GHC/Rename/Splice.hs @@ -475,7 +475,7 @@ rnSpliceExpr splice run_expr_splice :: HsSplice GhcRn -> RnM (HsExpr GhcRn, FreeVars) run_expr_splice rn_splice | isTypedSplice rn_splice -- Run it later, in the type checker - = do { -- Ugh! See Note [Splices] above + = do { -- Ugh! See Note [Free variables of typed splices] above traceRn "rnSpliceExpr: typed expression splice" empty ; lcl_rdr <- getLocalRdrEnv ; gbl_rdr <- getGlobalRdrEnv diff --git a/compiler/GHC/Runtime/Eval.hs b/compiler/GHC/Runtime/Eval.hs index bf6227737f..e4f4de3fc5 100644 --- a/compiler/GHC/Runtime/Eval.hs +++ b/compiler/GHC/Runtime/Eval.hs @@ -985,7 +985,7 @@ typeKind normalise str = withSession $ \hsc_env -> {- Note [Querying instances for a type] - + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Here is the implementation of GHC proposal 41. (https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0041-ghci-instances.rst) diff --git a/compiler/GHC/Runtime/Interpreter.hs b/compiler/GHC/Runtime/Interpreter.hs index ed906279cc..a61578278f 100644 --- a/compiler/GHC/Runtime/Interpreter.hs +++ b/compiler/GHC/Runtime/Interpreter.hs @@ -200,7 +200,7 @@ interpCmd interp msg = case interpInstance interp of InternalInterp -> run msg -- Just run it directly #endif ExternalInterp c i -> withIServ_ c i $ \iserv -> - uninterruptibleMask_ $ -- Note [uninterruptibleMask_] + uninterruptibleMask_ $ -- Note [uninterruptibleMask_ and interpCmd] iservCall iserv msg diff --git a/compiler/GHC/Tc/Errors.hs b/compiler/GHC/Tc/Errors.hs index 8c46285ad4..237c6fa4a3 100644 --- a/compiler/GHC/Tc/Errors.hs +++ b/compiler/GHC/Tc/Errors.hs @@ -175,7 +175,7 @@ reportUnsolved wanted -- NB: Type-level holes are OK, because there are no bindings. -- See Note [Deferring coercion errors to runtime] -- Used by solveEqualities for kind equalities --- (see Note [Fail fast on kind errors] in "GHC.Tc.Solver") +-- (see Note [Failure in local type signatures] in GHC.Tc.Solver) reportAllUnsolved :: WantedConstraints -> TcM () reportAllUnsolved wanted = do { ev_binds <- newNoTcEvBinds @@ -2237,7 +2237,7 @@ something like Discussion in #9611. Note [Highlighting ambiguous type variables] -~------------------------------------------- +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ When we encounter ambiguous type variables (i.e. type variables that remain metavariables after type inference), we need a few more conditions before we can reason that *ambiguity* prevents constraints diff --git a/compiler/GHC/Tc/Errors/Ppr.hs b/compiler/GHC/Tc/Errors/Ppr.hs index 86aac8d99d..d8d9ff0302 100644 --- a/compiler/GHC/Tc/Errors/Ppr.hs +++ b/compiler/GHC/Tc/Errors/Ppr.hs @@ -2233,7 +2233,7 @@ pprTcSolverReportMsg ctxt@(CEC {cec_encl = implics}) orig = errorItemOrigin item pred = errorItemPred item (clas, tys) = getClassPredTys pred - -- See Note [Highlighting ambiguous type variables] + -- See Note [Highlighting ambiguous type variables] in GHC.Tc.Errors (ambig_kvs, ambig_tvs) = ambigTkvsOfTy pred ambigs = ambig_kvs ++ ambig_tvs has_ambigs = not (null ambigs) diff --git a/compiler/GHC/Tc/Errors/Types.hs b/compiler/GHC/Tc/Errors/Types.hs index b86f1d1506..b1f635325a 100644 --- a/compiler/GHC/Tc/Errors/Types.hs +++ b/compiler/GHC/Tc/Errors/Types.hs @@ -2976,8 +2976,7 @@ data PromotionErr -- in GHC.Tc.Utils.Env. | ConstrainedDataConPE PredType -- Data constructor with a non-equality context - -- See Note [Don't promote data constructors with - -- non-equality contexts] in GHC.Tc.Gen.HsType + -- See Note [Constraints in kinds] in GHC.Core.TyCo.Rep | PatSynPE -- Pattern synonyms -- See Note [Don't promote pattern synonyms] in GHC.Tc.Utils.Env diff --git a/compiler/GHC/Tc/Gen/Arrow.hs b/compiler/GHC/Tc/Gen/Arrow.hs index b404a00b1a..a4eff74ea4 100644 --- a/compiler/GHC/Tc/Gen/Arrow.hs +++ b/compiler/GHC/Tc/Gen/Arrow.hs @@ -435,7 +435,7 @@ tcArrDoStmt env ctxt (RecStmt { recS_stmts = L l stmts, recS_later_ids = later_n -- NB: The rec_ids for the recursive things -- already scope over this part. This binding may shadow -- some of them with polymorphic things with the same Name - -- (see Note [RecStmt] in GHC.Hs.Expr) + -- (see Note [How RecStmt works] in Language.Haskell.Syntax.Expr) ; let rec_ids = takeList rec_names tup_ids ; later_ids <- tcLookupLocalIds later_names diff --git a/compiler/GHC/Tc/Gen/Foreign.hs b/compiler/GHC/Tc/Gen/Foreign.hs index 53e880c0f6..31f47227c8 100644 --- a/compiler/GHC/Tc/Gen/Foreign.hs +++ b/compiler/GHC/Tc/Gen/Foreign.hs @@ -146,7 +146,7 @@ normaliseFfiType' env ty0 = runWriterT $ go Representational initRecTc ty0 | isNewTyCon tc -- Expand newtypes , Just rec_nts' <- checkRecTc rec_nts tc - -- See Note [Expanding newtypes] in GHC.Core.TyCon + -- See Note [Expanding newtypes and products] in GHC.Core.TyCon.RecWalk -- We can't just use isRecursiveTyCon; sometimes recursion is ok: -- newtype T = T (Ptr T) -- Here, we don't reject the type for being recursive. diff --git a/compiler/GHC/Tc/Gen/Match.hs b/compiler/GHC/Tc/Gen/Match.hs index 05d95bf6d2..9c838785ac 100644 --- a/compiler/GHC/Tc/Gen/Match.hs +++ b/compiler/GHC/Tc/Gen/Match.hs @@ -546,7 +546,7 @@ tcLcStmt m_tc ctxt (TransStmt { trS_form = form, trS_stmts = stmts -- Ensure that every old binder of type `b` is linked up with its -- new binder which should have type `n b` - -- See Note [GroupStmt binder map] in GHC.Hs.Expr + -- See Note [TransStmt binder map] in GHC.Hs.Expr n_bndr_ids = zipWith mk_n_bndr n_bndr_names bndr_ids bindersMap' = bndr_ids `zip` n_bndr_ids @@ -739,7 +739,7 @@ tcMcStmt ctxt (TransStmt { trS_stmts = stmts, trS_bndrs = bindersMap -- Ensure that every old binder of type `b` is linked up with its -- new binder which should have type `n b` - -- See Note [GroupStmt binder map] in GHC.Hs.Expr + -- See Note [TransStmt binder map] in GHC.Hs.Expr n_bndr_ids = zipWithEqual "tcMcStmt" mk_n_bndr n_bndr_names bndr_ids bindersMap' = bndr_ids `zip` n_bndr_ids @@ -1005,7 +1005,7 @@ Otherwise the error shows up when checking the rebindable syntax, and the expected/inferred stuff is back to front (see #3613). Note [typechecking ApplicativeStmt] - +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ join ((\pat1 ... patn -> body) <$> e1 <*> ... <*> en) fresh type variables: diff --git a/compiler/GHC/Tc/Gen/Pat.hs b/compiler/GHC/Tc/Gen/Pat.hs index 487b1512ab..45cedcbc8d 100644 --- a/compiler/GHC/Tc/Gen/Pat.hs +++ b/compiler/GHC/Tc/Gen/Pat.hs @@ -1402,12 +1402,8 @@ which applies more generally (not just within 'proc'), as it's a good plan in general to bypass the constraint simplification step entirely when it's not needed. -************************************************************************ -* * - Note [Pattern coercions] -* * -************************************************************************ - +Note [Pattern coercions] +~~~~~~~~~~~~~~~~~~~~~~~~ In principle, these program would be reasonable: f :: (forall a. a->a) -> Int diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs index 604740c657..52473f3d93 100644 --- a/compiler/GHC/Tc/TyCl.hs +++ b/compiler/GHC/Tc/TyCl.hs @@ -624,7 +624,7 @@ Note [Missed opportunity to retain higher-rank kinds] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ In 'kcTyClGroup', there is a missed opportunity to make kind inference work in a few more cases. The idea is analogous -to Note [Single function non-recursive binding special-case]: +to Note [Special case for non-recursive function bindings]: * If we have an SCC with a single decl, which is non-recursive, instead of creating a unification variable representing the @@ -1892,8 +1892,7 @@ DT3 Eta-expansion: Any forall-bound variables and function arguments in a result is produced by processing the return kind in etaExpandAlgTyCon, called in tcDataDefn. - See also Note [TyConBinders for the result kind signatures of a data type] - in GHC.Tc.Gen.HsType. + See also Note [splitTyConKind] in GHC.Tc.Gen.HsType. DT4 Datatype return kind restriction: A data type return kind must end in a type that, after type-synonym expansion, yields `TYPE LiftedRep`. By diff --git a/compiler/GHC/Tc/TyCl/Instance.hs b/compiler/GHC/Tc/TyCl/Instance.hs index 24802a65ea..90951272a2 100644 --- a/compiler/GHC/Tc/TyCl/Instance.hs +++ b/compiler/GHC/Tc/TyCl/Instance.hs @@ -944,7 +944,7 @@ tcDataFamInstHeader mb_clsinfo skol_info fam_tc hs_outer_bndrs fixity -- clearer to duplicate it. Still, if you fix a bug here, -- check there too! - -- See GHC.Tc.TyCl Note [Generalising in tcFamTyPatsGuts] + -- See GHC.Tc.TyCl Note [Generalising in tcTyFamInstEqnGuts] ; dvs <- candidateQTyVarsWithBinders outer_tvs lhs_ty ; qtvs <- quantifyTyVars skol_info TryNotToDefaultNonStandardTyVars dvs ; let final_tvs = scopedSort (qtvs ++ outer_tvs) diff --git a/compiler/GHC/Tc/Types.hs b/compiler/GHC/Tc/Types.hs index bce78dda31..d3f07ac311 100644 --- a/compiler/GHC/Tc/Types.hs +++ b/compiler/GHC/Tc/Types.hs @@ -1214,7 +1214,7 @@ ClosedLet means that - The fvs::RhsNames contains the free names of the RHS, excluding Global and ClosedLet ones. - - For the ClosedTypeId field see Note [Bindings with closed types] + - For the ClosedTypeId field see Note [Bindings with closed types: ClosedTypeId] For (static e) to be valid, we need for every 'x' free in 'e', that x's binding is floatable to the top level. Specifically: diff --git a/compiler/GHC/Tc/Utils/Env.hs b/compiler/GHC/Tc/Utils/Env.hs index b116cbbb29..01fde4cd1a 100644 --- a/compiler/GHC/Tc/Utils/Env.hs +++ b/compiler/GHC/Tc/Utils/Env.hs @@ -553,7 +553,7 @@ tcExtendNameTyVarEnv binds thing_inside names = [(name, ATyVar name tv) | (name, tv) <- binds] isTypeClosedLetBndr :: Id -> Bool --- See Note [Bindings with closed types] in GHC.Tc.Types +-- See Note [Bindings with closed types: ClosedTypeId] in GHC.Tc.Types isTypeClosedLetBndr = noFreeVarsOfType . idType tcExtendRecIds :: [(Name, TcId)] -> TcM a -> TcM a @@ -1125,7 +1125,7 @@ mkWrapperName :: (MonadIO m, HasModule m) => IORef (ModuleEnv Int) -> String -> String -> m FastString -- ^ @mkWrapperName ref what nameBase@ -- --- See Note [Generating fresh names for ccall wrapper] for @ref@'s purpose. +-- See Note [Generating fresh names for FFI wrappers] for @ref@'s purpose. mkWrapperName wrapperRef what nameBase = do thisMod <- getModule let pkg = unitString (moduleUnit thisMod) @@ -1187,9 +1187,6 @@ notFound name } wrongThingErr :: String -> TcTyThing -> Name -> TcM a --- It's important that this only calls pprTcTyThingCategory, which in --- turn does not look at the details of the TcTyThing. --- See Note [Placeholder PatSyn kinds] in GHC.Tc.Gen.Bind wrongThingErr expected thing name = let msg = TcRnUnknownMessage $ mkPlainError noHints $ (pprTcTyThingCategory thing <+> quotes (ppr name) <+> diff --git a/compiler/GHC/Tc/Utils/TcMType.hs b/compiler/GHC/Tc/Utils/TcMType.hs index 1206b95da7..21954240d6 100644 --- a/compiler/GHC/Tc/Utils/TcMType.hs +++ b/compiler/GHC/Tc/Utils/TcMType.hs @@ -747,7 +747,7 @@ skolems. They are used in two places: 1. In kind signatures, see GHC.Tc.TyCl Note [Inferring kinds for type declarations] - and Note [Kind checking for GADTs] + and Note [Using TyVarTvs for kind-checking GADTs] 2. In partial type signatures. See GHC.Tc.Types Note [Quantified variables in partial type signatures] diff --git a/compiler/GHC/Tc/Utils/TcType.hs b/compiler/GHC/Tc/Utils/TcType.hs index 9caf6c9f5b..b5d47d8d5b 100644 --- a/compiler/GHC/Tc/Utils/TcType.hs +++ b/compiler/GHC/Tc/Utils/TcType.hs @@ -588,7 +588,7 @@ we would need to enforce the separation. -} -- A TyVarDetails is inside a TyVar --- See Note [TyVars and TcTyVars] +-- See Note [TyVars and TcTyVars during type checking] data TcTyVarDetails = SkolemTv -- A skolem SkolemInfo diff --git a/compiler/GHC/ThToHs.hs b/compiler/GHC/ThToHs.hs index 931ea20796..a839822e40 100644 --- a/compiler/GHC/ThToHs.hs +++ b/compiler/GHC/ThToHs.hs @@ -1798,8 +1798,9 @@ wrap_tyarg (HsTypeArg l ki) = HsTypeArg l $ parenthesizeHsType appPrec ki wrap_tyarg ta@(HsArgPar {}) = ta -- Already parenthesized -- --------------------------------------------------------------------- --- Note [Adding parens for splices] {- +Note [Adding parens for splices] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ The hsSyn representation of parsed source explicitly contains all the original parens, as written in the source. diff --git a/compiler/GHC/Types/Basic.hs b/compiler/GHC/Types/Basic.hs index 92bb8241dd..d562d0937f 100644 --- a/compiler/GHC/Types/Basic.hs +++ b/compiler/GHC/Types/Basic.hs @@ -621,7 +621,7 @@ instance Outputable Origin where -} -- | The semantics allowed for overlapping instances for a particular --- instance. See Note [Safe Haskell isSafeOverlap] (in "GHC.Core.InstEnv") for a +-- instance. See Note [Safe Haskell isSafeOverlap] in GHC.Core.InstEnv for a -- explanation of the `isSafeOverlap` field. -- -- - 'GHC.Parser.Annotation.AnnKeywordId' : diff --git a/compiler/GHC/Types/Demand.hs b/compiler/GHC/Types/Demand.hs index 19d1938557..16c2403c5f 100644 --- a/compiler/GHC/Types/Demand.hs +++ b/compiler/GHC/Types/Demand.hs @@ -1143,7 +1143,7 @@ Then argsOneShots returns a [[OneShotInfo]] of [[OneShot,NoOneShotInfo,OneShot], [OneShot]] The occurrence analyser propagates this one-shot infor to the binders \pqr and \xyz; -see Note [Use one-shot information] in "GHC.Core.Opt.OccurAnal". +see Note [Sources of one-shot information] in GHC.Core.Opt.OccurAnal. Note [Boxity in Poly] ~~~~~~~~~~~~~~~~~~~~~ diff --git a/compiler/GHC/Types/Unique.hs b/compiler/GHC/Types/Unique.hs index 25075f47a1..f4538bf579 100644 --- a/compiler/GHC/Types/Unique.hs +++ b/compiler/GHC/Types/Unique.hs @@ -75,7 +75,7 @@ A `Unique` in GHC is a Word-sized value composed of two pieces: The mask is typically an ASCII character. It is typically used to make it easier to distinguish uniques constructed by different parts of the compiler. There is a (potentially incomplete) list of unique masks used given in -GHC.Builtin.Uniques. See Note [Uniques-prelude - Uniques for wired-in Prelude things] +GHC.Builtin.Uniques. See Note [Uniques for wired-in prelude things and known masks] `mkUnique` constructs a `Unique` from its pieces mkUnique :: Char -> Int -> Unique diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index 8108accaa2..94fc07660b 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -3639,7 +3639,7 @@ completeBreakpoint = wrapCompleter spaces $ \w -> do -- #3000 pure $ zip (repeat str_rdr) $ GHC.nameModule <$> names -- For every top-level identifier in scope, add the bids of the nested - -- declarations. See Note [ModBreaks.decls] in GHC.ByteCode.Types + -- declarations. See Note [Field modBreaks_decls] in GHC.ByteCode.Types addNestedDecls :: GhciMonad m => (String, Module) -> m [String] addNestedDecls (ident, mod) = do (_, decls) <- getModBreak mod diff --git a/testsuite/tests/linters/notes.stdout b/testsuite/tests/linters/notes.stdout index 8540d0c06d..b8822bd476 100644 --- a/testsuite/tests/linters/notes.stdout +++ b/testsuite/tests/linters/notes.stdout @@ -6,73 +6,36 @@ ref compiler/GHC/Core/Opt/Simplify.hs:3239:0: Note [Suppressing binder-sw ref compiler/GHC/Core/Opt/Simplify.hs:3767:8: Note [Lambda-bound unfoldings] ref compiler/GHC/Core/Opt/Simplify/Utils.hs:1225:37: Note [Gentle mode] ref compiler/GHC/Core/Opt/Specialise.hs:1593:28: Note [Arity decrease] -ref compiler/GHC/Core/RoughMap.hs:183:35: Note [RoughMatch and beta reduction] ref compiler/GHC/Core/TyCo/Rep.hs:1711:31: Note [What prevents a constraint from floating] ref compiler/GHC/Driver/Main.hs:1566:34: Note [simpleTidyPgm - mkBootModDetailsTc] ref compiler/GHC/Driver/Session.hs:3916:49: Note [Eta-reduction in -O0] ref compiler/GHC/Hs/Extension.hs:140:5: Note [Strict argument type constraints] ref compiler/GHC/HsToCore/Binds.hs:313:33: Note [AbsBinds wrappers] -ref compiler/GHC/HsToCore/Binds.hs:849:46: Note [Free dictionaries] -ref compiler/GHC/HsToCore/Binds.hs:883:36: Note [Free tyvars in rule LHS] -ref compiler/GHC/HsToCore/Binds.hs:884:35: Note [Free dictionaries in rule LHS] -ref compiler/GHC/HsToCore/Binds.hs:942:24: Note [Free dictionaries] -ref compiler/GHC/HsToCore/Binds.hs:999:34: Note [Dead spec binders] -ref compiler/GHC/HsToCore/Docs.hs:126:70: Note [1] -ref compiler/GHC/HsToCore/Docs.hs:130:0: Note [1] ref compiler/GHC/HsToCore/Pmc/Solver.hs:853:20: Note [COMPLETE sets on data families] -ref compiler/GHC/HsToCore/Utils.hs:939:62: Note [Don't CPR join points] ref compiler/GHC/Rename/Pat.hs:888:29: Note [Disambiguating record fields] -ref compiler/GHC/Rename/Splice.hs:450:27: Note [Splices] -ref compiler/GHC/Runtime/Eval.hs:996:2: Note [Querying instances for a type] -ref compiler/GHC/Runtime/Interpreter.hs:198:30: Note [uninterruptibleMask_] ref compiler/GHC/StgToCmm.hs:108:18: Note [codegen-split-init] ref compiler/GHC/StgToCmm.hs:111:18: Note [pipeline-split-init] ref compiler/GHC/StgToCmm/Expr.hs:585:4: Note [case on bool] ref compiler/GHC/StgToCmm/Expr.hs:848:3: Note [alg-alt heap check] -ref compiler/GHC/Tc/Errors.hs:180:13: Note [Fail fast on kind errors] -ref compiler/GHC/Tc/Errors.hs:2016:0: Note [Highlighting ambiguous type variables] -ref compiler/GHC/Tc/Errors/Ppr.hs:1760:11: Note [Highlighting ambiguous type variables] -ref compiler/GHC/Tc/Errors/Types.hs:2986:28: Note [Don't promote data constructors with non-equality contexts] -ref compiler/GHC/Tc/Gen/Arrow.hs:435:29: Note [RecStmt] ref compiler/GHC/Tc/Gen/Expr.hs:670:24: Note [Disambiguating record fields] ref compiler/GHC/Tc/Gen/Expr.hs:1195:7: Note [Disambiguating record fields] ref compiler/GHC/Tc/Gen/Expr.hs:1298:11: Note [Deprecating ambiguous fields] -ref compiler/GHC/Tc/Gen/Foreign.hs:149:26: Note [Expanding newtypes] ref compiler/GHC/Tc/Gen/HsType.hs:552:56: Note [Skolem escape prevention] ref compiler/GHC/Tc/Gen/HsType.hs:2623:7: Note [Matching a kind sigature with a declaration] -ref compiler/GHC/Tc/Gen/Match.hs:553:20: Note [GroupStmt binder map] -ref compiler/GHC/Tc/Gen/Match.hs:746:20: Note [GroupStmt binder map] -ref compiler/GHC/Tc/Gen/Match.hs:1011:0: Note [typechecking ApplicativeStmt] ref compiler/GHC/Tc/Gen/Pat.hs:169:20: Note [Typing patterns in pattern bindings] -ref compiler/GHC/Tc/Gen/Pat.hs:476:7: Note [Pattern coercions] ref compiler/GHC/Tc/Gen/Pat.hs:1077:7: Note [Matching polytyped patterns] -ref compiler/GHC/Tc/Gen/Pat.hs:1376:16: Note [Pattern coercions] ref compiler/GHC/Tc/Gen/Sig.hs:78:10: Note [Overview of type signatures] ref compiler/GHC/Tc/Instance/Family.hs:515:35: Note [Constrained family instances] ref compiler/GHC/Tc/Module.hs:698:15: Note [Extra dependencies from .hs-boot files] ref compiler/GHC/Tc/Solver/Canonical.hs:1229:33: Note [Canonical LHS] ref compiler/GHC/Tc/Solver/Interact.hs:1638:9: Note [No touchables as FunEq RHS] ref compiler/GHC/Tc/Solver/Rewrite.hs:1032:7: Note [Stability of rewriting] -ref compiler/GHC/Tc/TyCl.hs:627:3: Note [Single function non-recursive binding special-case] ref compiler/GHC/Tc/TyCl.hs:1106:6: Note [Unification variables need fresh Names] -ref compiler/GHC/Tc/TyCl.hs:1895:13: Note [TyConBinders for the result kind signatures of a data type] -ref compiler/GHC/Tc/TyCl/Instance.hs:947:26: Note [Generalising in tcFamTyPatsGuts] ref compiler/GHC/Tc/Types.hs:696:33: Note [Extra dependencies from .hs-boot files] -ref compiler/GHC/Tc/Types.hs:1230:36: Note [Bindings with closed types] ref compiler/GHC/Tc/Types.hs:1466:47: Note [Care with plugin imports] ref compiler/GHC/Tc/Types/Constraint.hs:238:34: Note [NonCanonical Semantics] -ref compiler/GHC/Tc/Utils/Env.hs:556:7: Note [Bindings with closed types] -ref compiler/GHC/Tc/Utils/Env.hs:1128:7: Note [Generating fresh names for ccall wrapper] -ref compiler/GHC/Tc/Utils/Env.hs:1192:7: Note [Placeholder PatSyn kinds] -ref compiler/GHC/Tc/Utils/TcMType.hs:793:7: Note [Kind checking for GADTs] -ref compiler/GHC/Tc/Utils/TcType.hs:529:7: Note [TyVars and TcTyVars] -ref compiler/GHC/ThToHs.hs:1738:11: Note [Adding parens for splices] -ref compiler/GHC/ThToHs.hs:1749:3: Note [Adding parens for splices] -ref compiler/GHC/Types/Basic.hs:619:17: Note [Safe Haskell isSafeOverlap] ref compiler/GHC/Types/Demand.hs:307:25: Note [Preserving Boxity of results is rarely a win] -ref compiler/GHC/Types/Demand.hs:1100:4: Note [Use one-shot information] ref compiler/GHC/Types/Name/Occurrence.hs:301:4: Note [Unique OccNames from Template Haskell] -ref compiler/GHC/Types/Unique.hs:78:25: Note [Uniques-prelude - Uniques for wired-in Prelude things] ref compiler/GHC/Unit/Module/Deps.hs:79:13: Note [Structure of dep_boot_mods] ref compiler/GHC/Utils/Monad.hs:391:34: Note [multiShotIO] ref compiler/Language/Haskell/Syntax/Binds.hs:226:31: Note [fun_id in Match] @@ -80,7 +43,6 @@ ref compiler/Language/Haskell/Syntax/Expr.hs:1561:32: Note [Quasi-quote o ref compiler/Language/Haskell/Syntax/Pat.hs:336:12: Note [Disambiguating record fields] ref configure.ac:212:10: Note [Linking ghc-bin against threaded stage0 RTS] ref docs/core-spec/core-spec.mng:177:6: Note [TyBinders] -ref ghc/GHCi/UI.hs:3646:25: Note [ModBreaks.decls] ref ghc/ghc.mk:62:6: Note [Linking ghc-bin against threaded stage0 RTS] ref hadrian/src/Expression.hs:130:30: Note [Linking ghc-bin against threaded stage0 RTS] ref libraries/base/GHC/ST.hs:139:7: Note [Definition of runRW#] @@ -91,7 +53,6 @@ ref testsuite/driver/testlib.py:152:10: Note [Why is there no stage1 setu ref testsuite/driver/testlib.py:156:2: Note [Why is there no stage1 setup function?] ref testsuite/mk/boilerplate.mk:263:2: Note [WayFlags] ref testsuite/tests/indexed-types/should_fail/ExtraTcsUntch.hs:30:27: Note [Extra TcS Untouchables] -ref testsuite/tests/perf/join_points/join005.hs:19:63: Note [Don't CPR join points] ref testsuite/tests/perf/should_run/all.T:3:6: Note [Solving from instances when interacting Dicts] ref testsuite/tests/polykinds/CuskFam.hs:16:11: Note [Unifying implicit CUSK variables] ref testsuite/tests/simplCore/should_compile/T5776.hs:16:7: Note [Simplifying RULE lhs constraints] diff --git a/testsuite/tests/perf/join_points/join005.hs b/testsuite/tests/perf/join_points/join005.hs index 611a3de4ae..4d715c2d87 100644 --- a/testsuite/tests/perf/join_points/join005.hs +++ b/testsuite/tests/perf/join_points/join005.hs @@ -16,8 +16,8 @@ sumOfMultiplesOf p ns It's hard to test for this, but what should happen is that go gets W/W'd and the worker is a join point (else Core Lint will complain). Interestingly, go is *not* CPR'd, because then the worker couldn't be a join point, but once the -simplifier runs, the worker ends up returning Int# anyway. See Note [Don't CPR -join points] in GHC.Core.Opt.WorkWrap. +simplifier runs, the worker ends up returning Int# anyway. See Note [Don't w/w +join points for CPR] in GHC.Core.Opt.WorkWrap. -} main = print $ sumOfMultiplesOf 2 [1..10] -- cgit v1.2.1