diff --git a/.gitlab/ci.sh b/.gitlab/ci.sh index a8651c29542f6a957508df3e03bac48505a624d3..bfb13fcf5cec10392b68cd55e86637acadb346f0 100755 --- a/.gitlab/ci.sh +++ b/.gitlab/ci.sh @@ -642,7 +642,7 @@ function test_hadrian() { then test_compiler_backend=$(${test_compiler} -e "GHC.Num.Backend.backendName") if [ $test_compiler_backend != "\"$BIGNUM_BACKEND\"" ]; then - fail "Test compiler has a different BIGNUM_BACKEND ($test_compiler_backend) thean requested ($BIGNUM_BACKEND)" + fail "Test compiler has a different BIGNUM_BACKEND ($test_compiler_backend) than requested ($BIGNUM_BACKEND)" fi fi diff --git a/.gitlab/rel_eng/upload.sh b/.gitlab/rel_eng/upload.sh index 6d1dfa1d53ef3adfbeb7b66b5ee030ba328fef21..2b2655d392d82bef3f2264b63548c224c76fd451 100755 --- a/.gitlab/rel_eng/upload.sh +++ b/.gitlab/rel_eng/upload.sh @@ -19,7 +19,7 @@ set -e # tarballs # # upload.sh prepare_docs (deprecated) prepare the documentation directory -# (this should be unecessary as the script which +# (this should be unnecessary as the script which # fetches artifacts should create this folder from # the doc-tarball job) # diff --git a/compiler/GHC/Builtin/Types.hs b/compiler/GHC/Builtin/Types.hs index c3acb93214cb553b3289d0568e7ae36480808a28..86d12d3ae75f896e997448a9f49c7d8af590beb9 100644 --- a/compiler/GHC/Builtin/Types.hs +++ b/compiler/GHC/Builtin/Types.hs @@ -464,9 +464,9 @@ In order to compose these two terms as @length []@ a type application is required, but there is no constraint on the choice. In this situation GHC uses 'Any', -> length (Any *) ([] (Any *)) +> length @(Any @Type) ([] @(Any @Type)) -Above, we print kinds explicitly, as if with --fprint-explicit-kinds. +Above, we print kinds explicitly, as if with -fprint-explicit-kinds. The Any tycon used to be quite magic, but we have since been able to implement it merely with an empty kind polymorphic type family. See #10886 for a diff --git a/compiler/GHC/Builtin/Types/Prim.hs b/compiler/GHC/Builtin/Types/Prim.hs index 323d033279e07547e72ae57c2d3b2cacc23c3ea0..fed8a3a4b79c253e01a1fc5b5028cc2e675750f0 100644 --- a/compiler/GHC/Builtin/Types/Prim.hs +++ b/compiler/GHC/Builtin/Types/Prim.hs @@ -420,8 +420,8 @@ mkTemplateKiTyVars -- Result is anon arg kinds [ak1, .., akm] -> [TyVar] -- [kv1:k1, ..., kvn:kn, av1:ak1, ..., avm:akm] -- Example: if you want the tyvars for --- forall (r:RuntimeRep) (a:TYPE r) (b:*). blah --- call mkTemplateKiTyVars [RuntimeRep] (\[r] -> [TYPE r, *]) +-- forall (r::RuntimeRep) (a::TYPE r) (b::Type). blah +-- call mkTemplateKiTyVars [RuntimeRep] (\[r] -> [TYPE r, Type]) mkTemplateKiTyVars kind_var_kinds mk_arg_kinds = kv_bndrs ++ tv_bndrs where @@ -435,8 +435,8 @@ mkTemplateKiTyVar -- Result is anon arg kinds [ak1, .., akm] -> [TyVar] -- [kv1:k1, ..., kvn:kn, av1:ak1, ..., avm:akm] -- Example: if you want the tyvars for --- forall (r:RuntimeRep) (a:TYPE r) (b:*). blah --- call mkTemplateKiTyVar RuntimeRep (\r -> [TYPE r, *]) +-- forall (r::RuntimeRep) (a::TYPE r) (b::Type). blah +-- call mkTemplateKiTyVar RuntimeRep (\r -> [TYPE r, Type]) mkTemplateKiTyVar kind mk_arg_kinds = kv_bndr : tv_bndrs where @@ -826,7 +826,7 @@ Wrinkles are not Apart. See the FunTy/FunTy case in GHC.Core.Unify.unify_ty. (W3) Are (TYPE IntRep) and (CONSTRAINT WordRep) apart? In truth yes, - they are. But it's easier to say that htey are not apart, by + they are. But it's easier to say that they are not apart, by reporting "maybeApart" (which is always safe), rather than recurse into the arguments (whose kinds may be utterly different) to look for apartness inside them. Again this is in @@ -846,8 +846,8 @@ Wrinkles Note [RuntimeRep polymorphism] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Generally speaking, you can't be polymorphic in `RuntimeRep`. E.g - f :: forall (rr:RuntimeRep) (a:TYPE rr). a -> [a] - f = /\(rr:RuntimeRep) (a:rr) \(a:rr). ... + f :: forall (rr::RuntimeRep) (a::TYPE rr). a -> [a] + f = /\(rr::RuntimeRep) (a::rr) \(a::rr). ... This is no good: we could not generate code for 'f', because the calling convention for 'f' varies depending on whether the argument is a a Int, Int#, or Float#. (You could imagine generating specialised @@ -856,7 +856,7 @@ code, one for each instantiation of 'rr', but we don't do that.) Certain functions CAN be runtime-rep-polymorphic, because the code generator never has to manipulate a value of type 'a :: TYPE rr'. -* error :: forall (rr:RuntimeRep) (a:TYPE rr). String -> a +* error :: forall (rr::RuntimeRep) (a::TYPE rr). String -> a Code generator never has to manipulate the return value. * unsafeCoerce#, defined in Desugar.mkUnsafeCoercePair: diff --git a/compiler/GHC/CmmToAsm.hs b/compiler/GHC/CmmToAsm.hs index 15d09ec4212e8a083ee8f27a3473c970c1772e8a..1d4891786738240b6cd37b50256d481b1b75dbb1 100644 --- a/compiler/GHC/CmmToAsm.hs +++ b/compiler/GHC/CmmToAsm.hs @@ -67,7 +67,7 @@ module GHC.CmmToAsm ( nativeCodeGen - -- * Test-only exports: see trac #12744 + -- * Test-only exports: see #12744 -- used by testGraphNoSpills, which needs to access -- the register allocator intermediate data structures -- cmmNativeGen emits diff --git a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs index 9c401cca20fd3f97eb920130b718327850fbeb4b..98501a9b276a1a44ecf49fb9f72b47a2a3362187 100644 --- a/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs +++ b/compiler/GHC/CmmToAsm/Reg/Graph/TrivColorable.hs @@ -178,7 +178,7 @@ trivColorable platform virtualRegSqueeze realRegSqueeze RcDouble conflicts exclu ArchX86_64 -> 10 -- in x86_64 there are 16 XMM registers -- xmm0 .. xmm15, here 10 is a - -- "dont need to solve conflicts" count that + -- "don't need to solve conflicts" count that -- was chosen at some point in the past. ArchPPC -> 26 ArchPPC_64 _ -> 20 diff --git a/compiler/GHC/CmmToAsm/X86/Instr.hs b/compiler/GHC/CmmToAsm/X86/Instr.hs index b4e93a1c5d132a0b0dff03ffacd3f65513a8bd5e..dfc6c094f7f662d5dd7582503d12a80f17b12883 100644 --- a/compiler/GHC/CmmToAsm/X86/Instr.hs +++ b/compiler/GHC/CmmToAsm/X86/Instr.hs @@ -257,7 +257,7 @@ data Instr -- We need to support the FSTP (x87 store and pop) instruction -- so that we can correctly read off the return value of an -- x86 CDECL C function call when its floating point. - -- so we dont include a register argument, and just use st(0) + -- so we don't include a register argument, and just use st(0) -- this instruction is used ONLY for return values of C ffi calls -- in x86_32 abi | X87Store Format AddrMode -- st(0), dst diff --git a/compiler/GHC/CmmToAsm/X86/Regs.hs b/compiler/GHC/CmmToAsm/X86/Regs.hs index 25746f9debe684de33b119c3a0464f859415f31d..c426868512a9f557e7b9d08646923f50dd3c40a7 100644 --- a/compiler/GHC/CmmToAsm/X86/Regs.hs +++ b/compiler/GHC/CmmToAsm/X86/Regs.hs @@ -246,7 +246,7 @@ classOfRealReg platform reg | otherwise -> panic "X86.Reg.classOfRealReg registerSingle too high" -- | Get the name of the register with this number. --- NOTE: fixme, we dont track which "way" the XMM registers are used +-- NOTE: fixme, we don't track which "way" the XMM registers are used showReg :: Platform -> RegNo -> String showReg platform n | n >= firstxmm && n <= lastxmm platform = "%xmm" ++ show (n-firstxmm) diff --git a/compiler/GHC/CmmToLlvm/Base.hs b/compiler/GHC/CmmToLlvm/Base.hs index 43c9ef5ba0cdc1e1afb696eda73c607dd0e296c5..fa10afb56ecb85bb877e51bfdbe6cb3ebfa4cecd 100644 --- a/compiler/GHC/CmmToLlvm/Base.hs +++ b/compiler/GHC/CmmToLlvm/Base.hs @@ -412,7 +412,7 @@ getUniqMeta s = getEnv (flip lookupUFM s . envUniqMeta) -- so as to make sure they have the most general type in the case that -- user code also uses these functions but with a different type than GHC -- internally. (Main offender is treating return type as 'void' instead of --- 'void *'). Fixes trac #5486. +-- 'void *'). Fixes #5486. ghcInternalFunctions :: LlvmM () ghcInternalFunctions = do platform <- getPlatform diff --git a/compiler/GHC/Core/Coercion/Opt.hs b/compiler/GHC/Core/Coercion/Opt.hs index 3cc6a1638df1f9c8d05b98c50115bdb6d2a72a7f..a69adb39c95ec92a55896e136f251849d79d4cde 100644 --- a/compiler/GHC/Core/Coercion/Opt.hs +++ b/compiler/GHC/Core/Coercion/Opt.hs @@ -528,8 +528,8 @@ of arguments in a `CoTyConApp` can differ. Consider Any :: forall k. k - Any * Int :: * - Any (*->*) Maybe Int :: * + Any @Type Int :: Type + Any @(Type->Type) Maybe Int :: Type Hence the need to compare argument lengths; see #13658 diff --git a/compiler/GHC/Core/Make.hs b/compiler/GHC/Core/Make.hs index a0f659f3184198cd95af1d5315104cde9575dc2e..c37de55bebbd3ef721ffa454b64114e3c721c465 100644 --- a/compiler/GHC/Core/Make.hs +++ b/compiler/GHC/Core/Make.hs @@ -1251,7 +1251,7 @@ aBSENT_CONSTRAINT_ERROR_ID -- See Note [aBSENT_ERROR_ID] mkRuntimeErrorId :: TypeOrConstraint -> Name -> Id -- Error function --- with type: forall (r:RuntimeRep) (a:TYPE r). Addr# -> a +-- with type: forall (r::RuntimeRep) (a::TYPE r). Addr# -> a -- with arity: 1 -- which diverges after being given one argument -- The Addr# is expected to be the address of diff --git a/compiler/GHC/Core/Opt/CSE.hs b/compiler/GHC/Core/Opt/CSE.hs index a70128bf102f15e1099dac9940fa64f875ca2407..1ae0fb3335f84a0bb48a82b502f8f394dcd9d7a8 100644 --- a/compiler/GHC/Core/Opt/CSE.hs +++ b/compiler/GHC/Core/Opt/CSE.hs @@ -43,7 +43,7 @@ and apply that to the rest of the program. When we then see y1 = C a b y2 = C y1 b -we replace the C a b with x1. But then we *dont* want to +we replace the C a b with x1. But then we *don't* want to add x1 -> y1 to the mapping. Rather, we want the reverse, y1 -> x1 so that a subsequent binding y2 = C y1 b diff --git a/compiler/GHC/Core/Opt/ConstantFold.hs b/compiler/GHC/Core/Opt/ConstantFold.hs index ea0f4b6569c22634ba7eabe2eca0e5a2076fc274..3df7d093a02372e9f2980497e69d5834442d6518 100644 --- a/compiler/GHC/Core/Opt/ConstantFold.hs +++ b/compiler/GHC/Core/Opt/ConstantFold.hs @@ -2081,7 +2081,7 @@ Things to note * Why do we need a primop at all? That is, instead of case seq# x s of (# x, s #) -> blah why not instead say this? - case x of { DEFAULT -> blah) + case x of { DEFAULT -> blah } Reason (see #5129): if we saw catch# (\s -> case x of { DEFAULT -> raiseIO# exn s }) handler diff --git a/compiler/GHC/Core/Opt/DmdAnal.hs b/compiler/GHC/Core/Opt/DmdAnal.hs index 9fc9f5f4044f0575cc06b2d71aebb70523fe9911..1dbddda4b17065ed5d1a10f111ab39ceb78ec2f0 100644 --- a/compiler/GHC/Core/Opt/DmdAnal.hs +++ b/compiler/GHC/Core/Opt/DmdAnal.hs @@ -2160,7 +2160,7 @@ Wrinkle (DNB1): we /do/ want to unbox tuple dictionaries (#23398) in ...f @a (% sel1 d, sel2 d %) and all the tuple building and taking apart will disappear. -Wrinkle (DNB2): we /do/ wnat to unbox equality dictionaries, +Wrinkle (DNB2): we /do/ want to unbox equality dictionaries, for (~), (~~), and Coercible (#23398). Their payload is a single unboxed coercion. We never want to specialise on `(t1 ~ t2)`. All that would do is to make a copy of the function's RHS with a particular coercion. Unlike diff --git a/compiler/GHC/Core/Opt/SetLevels.hs b/compiler/GHC/Core/Opt/SetLevels.hs index 93e9bf073ef73cd6c2d8d29e17d612b7df79b222..4ebe1ce2abca801141bac37a1d00a7ded20004d7 100644 --- a/compiler/GHC/Core/Opt/SetLevels.hs +++ b/compiler/GHC/Core/Opt/SetLevels.hs @@ -529,7 +529,7 @@ Things to note: * The test we perform is exprIsHNF, and /not/ exprOkForSpeculation. - - exrpIsHNF catches the key case of an evaluated variable + - exprIsHNF catches the key case of an evaluated variable - exprOkForSpeculation is /false/ of an evaluated variable; See Note [exprOkForSpeculation and evaluated variables] in GHC.Core.Utils diff --git a/compiler/GHC/Core/Opt/Specialise.hs b/compiler/GHC/Core/Opt/Specialise.hs index 7f78dff7e1a079e5be5fc3816c59ac6bfad9d8d8..6e66400c9816039d1150640e40cbb30f1e22687f 100644 --- a/compiler/GHC/Core/Opt/Specialise.hs +++ b/compiler/GHC/Core/Opt/Specialise.hs @@ -2903,7 +2903,7 @@ where is a top-level dictionary-former. This actually happened in #22459, because of (MP1) of Note [Specialising polymorphic dictionaries]. -How can we speicalise $wsplit? We might try +How can we specialise $wsplit? We might try RULE "SPEC" forall (d :: C T). $wsplit @T d = $s$wsplit diff --git a/compiler/GHC/Core/Stats.hs b/compiler/GHC/Core/Stats.hs index 04e6bc3274216041dfee95fb9460162fa0e99d15..30f4f1accc3854aeb5a64643c258328d73031676 100644 --- a/compiler/GHC/Core/Stats.hs +++ b/compiler/GHC/Core/Stats.hs @@ -98,7 +98,7 @@ coStats :: Coercion -> CoreStats coStats co = zeroCS { cs_co = coercionSize co } coreBindsSize :: [CoreBind] -> Int --- We use coreBindStats for user printout +-- We use coreBindsStats for user printout -- but this one is a quick and dirty basis for -- the simplifier's tick limit coreBindsSize bs = sum (map bindSize bs) diff --git a/compiler/GHC/Core/TyCo/Rep.hs b/compiler/GHC/Core/TyCo/Rep.hs index f85ca8f90f0a56a77b9dc012768d215577ba07f6..d57b18c254130359d89d4ec3b1169f27c70f1bdf 100644 --- a/compiler/GHC/Core/TyCo/Rep.hs +++ b/compiler/GHC/Core/TyCo/Rep.hs @@ -296,7 +296,7 @@ When treated as a user type, implicitly instantiated - Coercion types, and non-pred evidence types (i.e. not - of kind Constrain), are just regular old types, are + of kind Constraint), are just regular old types, are visible, and are not implicitly instantiated. In a FunTy { ft_af = af } and af = FTF_C_T or FTF_C_C, the argument diff --git a/compiler/GHC/Core/TyCon.hs b/compiler/GHC/Core/TyCon.hs index 2afeae415599590f4d4b0f9047b644e02676dfdb..fa987335baba46d7d8145b07e4a2478a8cb41799 100644 --- a/compiler/GHC/Core/TyCon.hs +++ b/compiler/GHC/Core/TyCon.hs @@ -1337,7 +1337,7 @@ via the PromotedDataCon alternative in GHC.Core.TyCon. Note [Enumeration types] ~~~~~~~~~~~~~~~~~~~~~~~~ We define datatypes with no constructors to *not* be -enumerations; this fixes trac #2578, Otherwise we +enumerations; this fixes #2578, Otherwise we end up generating an empty table for <mod>_<type>_closure_tbl which is used by tagToEnum# to map Int# to constructors @@ -1869,7 +1869,7 @@ mkTcTyCon name binders res_kind scoped_tvs poly flav noTcTyConScopedTyVars :: [(Name, TcTyVar)] noTcTyConScopedTyVars = [] --- | Create an primitive 'TyCon', such as @Int#@, @Type@ or @RealWorld#@ +-- | Create an primitive 'TyCon', such as @Int#@, @Type@ or @RealWorld@ -- Primitive TyCons are marshalable iff not lifted. -- If you'd like to change this, modify marshalablePrimTyCon. mkPrimTyCon :: Name -> [TyConBinder] diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs index 124ad34a1edbad5fa62e88ce9ba1ce3d4f290fc3..d83b525410024fbe3b9835ec6b8056e4b9e73bb5 100644 --- a/compiler/GHC/Core/Type.hs +++ b/compiler/GHC/Core/Type.hs @@ -430,7 +430,7 @@ saturates _ 0 = True saturates [] _ = False saturates (_:tys) n = assert( n >= 0 ) $ saturates tys (n-1) -- Arities are always positive; the assertion just checks - -- that, to avoid an ininite loop in the bad case + -- that, to avoid an infinite loop in the bad case -- | A helper for 'expandSynTyConApp_maybe' to avoid inlining this cold path -- into call-sites. @@ -816,7 +816,7 @@ runtimeRepLevity_maybe rep [lev] -> levityType_maybe lev _ -> Nothing -- Type isn't of kind RuntimeRep -- The latter case happens via the call to isLiftedRuntimeRep - -- in GHC.Tc.Errors.Ppr.pprMisMatchMsg (#22742) + -- in GHC.Tc.Errors.Ppr.pprMismatchMsg (#22742) else Just Unlifted -- Avoid searching all the unlifted RuntimeRep type cons -- In the RuntimeRep data type, only LiftedRep is lifted @@ -1619,7 +1619,7 @@ splitTyConAppNoView_maybe ty -- of a 'FunTy' with an argument of unknown kind 'FunTy' -- (e.g. `FunTy (a :: k) Int`, since the kind of @a@ isn't of -- the form `TYPE rep`. This isn't usually a problem but may --- be temporarily the cas during canonicalization: +-- be temporarily the case during canonicalization: -- see Note [Decomposing FunTy] in GHC.Tc.Solver.Equality -- and Note [The Purely Kinded Type Invariant (PKTI)] in GHC.Tc.Gen.HsType, -- Wrinkle around FunTy diff --git a/compiler/GHC/CoreToStg.hs b/compiler/GHC/CoreToStg.hs index 2d62d46987981b2fad788f45d1a32c0f489a1e6d..33c9446dd8723cc6acf014899fab153870b331e3 100644 --- a/compiler/GHC/CoreToStg.hs +++ b/compiler/GHC/CoreToStg.hs @@ -558,7 +558,7 @@ coreToStgApp f args ticks = do tapp = foldr add_tick app (map (coreToStgTick res_ty) ticks ++ ticks') -- Forcing these fixes a leak in the code generator, noticed while - -- profiling for trac #4367 + -- profiling for #4367 app `seq` return tapp -- --------------------------------------------------------------------------- diff --git a/compiler/GHC/Driver/Config/HsToCore.hs b/compiler/GHC/Driver/Config/HsToCore.hs index 325a4546be2bec141d4aa67145036cc43e4db5b2..c2c1c9e98717a79137b8f9b26885c7e447a639b3 100644 --- a/compiler/GHC/Driver/Config/HsToCore.hs +++ b/compiler/GHC/Driver/Config/HsToCore.hs @@ -12,7 +12,7 @@ initBangOpts dflags = BangOpts { bang_opt_strict_data = xopt LangExt.StrictData dflags , bang_opt_unbox_disable = gopt Opt_OmitInterfacePragmas dflags -- Don't unbox if we aren't optimising; rather arbitrarily, - -- we use -fomit-iface-pragmas as the indication + -- we use -fomit-interface-pragmas as the indication , bang_opt_unbox_strict = gopt Opt_UnboxStrictFields dflags , bang_opt_unbox_small = gopt Opt_UnboxSmallStrictFields dflags } diff --git a/compiler/GHC/Driver/Make.hs b/compiler/GHC/Driver/Make.hs index c3d69347efea94b62a23695ac23f247cc66b6a26..d3113601239cd793072c9912156249c92a4d0c5e 100644 --- a/compiler/GHC/Driver/Make.hs +++ b/compiler/GHC/Driver/Make.hs @@ -742,7 +742,7 @@ load' mhmi_cache how_much diag_wrapper mHscMessage mod_graph = do checkHowMuch how_much $ do -- mg2_with_srcimps drops the hi-boot nodes, returning a - -- graph with cycles. It is just used for warning about unecessary source imports. + -- graph with cycles. It is just used for warning about unnecessary source imports. let mg2_with_srcimps :: [SCC ModuleGraphNode] mg2_with_srcimps = topSortModuleGraph True mod_graph Nothing diff --git a/compiler/GHC/HsToCore/Usage.hs b/compiler/GHC/HsToCore/Usage.hs index 59a8c01073508a6c3e4a2383be5e1d83bf5e7e45..64508e70a80bb251184fdaab78962c3f41655a08 100644 --- a/compiler/GHC/HsToCore/Usage.hs +++ b/compiler/GHC/HsToCore/Usage.hs @@ -235,7 +235,7 @@ mk_mod_usage_info uc home_unit home_unit_ids this_mod direct_imports used_names else mod -- This lambda function is really just a -- specialised (++); originally came about to - -- avoid quadratic behaviour (trac #2680) + -- avoid quadratic behaviour (#2680) in extendModuleEnvWith (\_ xs -> occ:xs) mv_map mod' [occ] where occ = nameOccName name diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs index e382755409afbdd5e6251e8dc1068712155e83ee..3b96fd14a11337001a7bcf37a646f00fd0f80ac0 100644 --- a/compiler/GHC/HsToCore/Utils.hs +++ b/compiler/GHC/HsToCore/Utils.hs @@ -643,7 +643,7 @@ There are two cases. The 'Solo' is a one-tuple; see Note [One-tuples] in GHC.Builtin.Types Note that forcing 't' makes the pattern match happen, but does not force 'v'. That's why we call `mkBigCoreVarTupSolo` - in `mkSeletcorBinds` + in `mkSelectorBinds` * The pattern binds no variables let !(True,False) = e in body @@ -913,7 +913,7 @@ anyway, and the Void# doesn't do much harm. mkFailurePair :: CoreExpr -- Result type of the whole case expression -> DsM (CoreBind, -- Binds the newly-created fail variable -- to \ _ -> expression - CoreExpr) -- Fail variable applied to realWorld# + CoreExpr) -- Fail variable applied to (# #) -- See Note [Failure thunks and CPR] mkFailurePair expr = do { fail_fun_var <- newFailLocalDs ManyTy (unboxedUnitTy `mkVisFunTyMany` ty) diff --git a/compiler/GHC/Iface/Load.hs b/compiler/GHC/Iface/Load.hs index 97aed71b802172e8c9015104fadbc4a27527b1bc..478b1a523f920f313ad2e2b8553626b3b0da093d 100644 --- a/compiler/GHC/Iface/Load.hs +++ b/compiler/GHC/Iface/Load.hs @@ -1064,7 +1064,7 @@ In order to disambiguate between identifiers from different modules, we qualify all names that don't originate in the current module. In order to keep visual noise as low as possible, we keep local names unqualified. -For some background on this choice see trac #15269. +For some background on this choice see #15269. -} -- | Read binary interface, and print it out diff --git a/compiler/GHC/Linker/Deps.hs b/compiler/GHC/Linker/Deps.hs index 64210b14789c90c23962dc1fa21150d9cbacff55..9bf46ea3c918a6a511a6e660acb4811a2ebb2730 100644 --- a/compiler/GHC/Linker/Deps.hs +++ b/compiler/GHC/Linker/Deps.hs @@ -323,9 +323,8 @@ get_link_deps opts pls maybe_normal_osuf span mods = do {- Note [Using Byte Code rather than Object Code for Template Haskell] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ - The `-fprefer-byte-code` flag allows a user to specify that they want to use -byte code (if availble) rather than object code for home module dependenices +byte code (if available) rather than object code for home module dependencies when executing Template Haskell splices. Why might you want to use byte code rather than object code? @@ -336,7 +335,7 @@ Why might you want to use byte code rather than object code? So we allow the user to choose to use byte code rather than object files if they want to avoid these two pitfalls. -When using `-fprefer-byte-code` you have to arrange to have the byte code availble. +When using `-fprefer-byte-code` you have to arrange to have the byte code available. In normal --make mode it will not be produced unless you enable `-fbyte-code-and-object-code`. See Note [Home module build products] for some more information about that. diff --git a/compiler/GHC/Prelude/Basic.hs b/compiler/GHC/Prelude/Basic.hs index b3a311fdb7659d3023c29889e353646c8ce284fd..8b0ff5109be01f9f3fe40fdbb251010a0315550c 100644 --- a/compiler/GHC/Prelude/Basic.hs +++ b/compiler/GHC/Prelude/Basic.hs @@ -13,7 +13,7 @@ -- Every module in GHC -- * Is compiled with -XNoImplicitPrelude --- * Explicitly imports GHC.BasicPrelude or GHC.Prelude +-- * Explicitly imports GHC.Prelude.Basic or GHC.Prelude -- * The later provides some functionality with within ghc itself -- like pprTrace. diff --git a/compiler/GHC/Rename/Bind.hs b/compiler/GHC/Rename/Bind.hs index a633ccc9825172b0df41efc6bc5666852e69e7e0..f1222f6b8f0a0d2415b10d08764541ada79599a1 100644 --- a/compiler/GHC/Rename/Bind.hs +++ b/compiler/GHC/Rename/Bind.hs @@ -618,7 +618,7 @@ and we seq fvs' before turning it as part of a record. The reason is that trim is sometimes something like \xs -> intersectNameSet (mkNameSet bound_names) xs and we don't want to retain the list bound_names. This showed up in -trac ticket #1136. +ticket #1136. -} {- ********************************************************************* diff --git a/compiler/GHC/Rename/Names.hs b/compiler/GHC/Rename/Names.hs index 18fab379095a04a7e4978695348dca673d7abffa..b1cb3392d6ddb861e2059514e673bd5745fa3053 100644 --- a/compiler/GHC/Rename/Names.hs +++ b/compiler/GHC/Rename/Names.hs @@ -1948,7 +1948,7 @@ warnUnusedImport rdr_env (L loc decl, used, unused) where -- In warning message, pretty-print identifiers unqualified unconditionally -- to improve the consistent for ambiguous/unambiguous identifiers. - -- See trac#14881. + -- See #14881. possible_field n = case lookupGRE_Name rdr_env n of Just (GRE { gre_par = par, gre_info = IAmRecField info }) -> diff --git a/compiler/GHC/Rename/Utils.hs b/compiler/GHC/Rename/Utils.hs index d8cda861d63faf5b38dba88d29e6cd723b73f0fa..e0ee22c55826e8373bf5a87e55bb29a0030299ec 100644 --- a/compiler/GHC/Rename/Utils.hs +++ b/compiler/GHC/Rename/Utils.hs @@ -373,7 +373,7 @@ warnUnusedTopBinds gres _ -> False -- Don't warn about unused bindings with parents in -- .hs-boot files, as you are sometimes required to give - -- unused bindings (trac #3449). + -- unused bindings (#3449). -- HOWEVER, in a signature file, you are never obligated to put a -- definition in the main text. Thus, if you define something -- and forget to export it, we really DO want to warn. diff --git a/compiler/GHC/Stg/BcPrep.hs b/compiler/GHC/Stg/BcPrep.hs index e84fdf1fda955b6d85d0e296ec0ccde61905da7f..8defb7730cedccd858a38b0239f7d76c1fccc51c 100644 --- a/compiler/GHC/Stg/BcPrep.hs +++ b/compiler/GHC/Stg/BcPrep.hs @@ -170,7 +170,7 @@ opportunity here, but that is beyond the scope of my (Richard E's) Thursday.) We thus must have *some* strategy for dealing with representation-polymorphic and unlifted join points. Representation-polymorphic variables are generally -not allowed (though representation -polymorphic join points *are*; see +not allowed (though representation-polymorphic join points *are*; see Note [Invariants on join points] in GHC.Core, point 6), and we don't wish to evaluate unlifted join points eagerly. The questionable join points are *not-necessarily-lifted join points* diff --git a/compiler/GHC/Stg/Unarise.hs b/compiler/GHC/Stg/Unarise.hs index 24025605cbaa332da647e5658651948688062cf7..0b28cc5cab27a218a3534d1640d918a82f6556ca 100644 --- a/compiler/GHC/Stg/Unarise.hs +++ b/compiler/GHC/Stg/Unarise.hs @@ -896,7 +896,7 @@ mkUbxSum dc ty_args args0 us mkTupArg (arg_idx, arg_map, us, wrapper) slot | Just stg_arg <- IM.lookup arg_idx arg_map = case castArg us slot stg_arg of - -- Slot and arg type missmatched, do a cast + -- Slot and arg type mismatched, do a cast Just (casted_arg,us',wrapper') -> ( (arg_idx+1, arg_map, us', wrapper . wrapper') , casted_arg) @@ -963,13 +963,13 @@ For arguments (StgArg) and binders (Id) we have two kind of unarisation: - When unarising function arg binders and arguments, we don't want to remove void binders and arguments. For example, - f :: (# (# #), (# #) #) -> Void# -> RealWorld# -> ... + f :: (# (# #), (# #) #) -> Void# -> State# RealWorld -> ... f x y z = <body> Here after unarise we should still get a function with arity 3. Similarly in the call site we shouldn't remove void arguments: - f (# (# #), (# #) #) void# rw + f (# (# #), (# #) #) void# realWorld# When unarising <body>, we extend the environment with these binders: @@ -1129,7 +1129,7 @@ voidArg :: StgArg voidArg = StgVarArg voidPrimId mkDefaultLitAlt :: [StgAlt] -> [StgAlt] --- We have an exhauseive list of literal alternatives +-- We have an exhaustive list of literal alternatives -- 1# -> e1 -- 2# -> e2 -- Since they are exhaustive, we can replace one with DEFAULT, to avoid diff --git a/compiler/GHC/StgToByteCode.hs b/compiler/GHC/StgToByteCode.hs index 0ffaa2c10ca1319933f3f0a9d5085effb10fb983..4b9947578c2349aa339b1be47f25d38ed7b89192 100644 --- a/compiler/GHC/StgToByteCode.hs +++ b/compiler/GHC/StgToByteCode.hs @@ -862,7 +862,7 @@ doCase d s p scrut bndr alts -- Are we dealing with an unboxed tuple with a tuple return frame? -- -- 'Simple' tuples with at most one non-void component, - -- like (# Word# #) or (# Int#, State# RealWorld# #) do not have a + -- like (# Word# #) or (# Int#, State# RealWorld #) do not have a -- tuple return frame. This is because (# foo #) and (# foo, Void# #) -- have the same runtime rep. We have more efficient specialized -- return frames for the situations with one non-void element. diff --git a/compiler/GHC/Tc/Deriv.hs b/compiler/GHC/Tc/Deriv.hs index 2606e145bd0edf677194f8b0382095dbe2740e03..3d4ae7d201cb84749540c52b165761c7f0047edc 100644 --- a/compiler/GHC/Tc/Deriv.hs +++ b/compiler/GHC/Tc/Deriv.hs @@ -1981,7 +1981,7 @@ doDerivInstErrorChecks1 mechanism = DerivSpecStock{dsm_stock_dit = dit} -> data_cons_in_scope_check dit -- No need to 'data_cons_in_scope_check' for newtype deriving. - -- Additionally, we also don't need to mark the constructos as + -- Additionally, we also don't need to mark the constructors as -- used because newtypes are handled separately elsewhere. -- See Note [Tracking unused binding and imports] in GHC.Tc.Types -- or #17328 for more. diff --git a/compiler/GHC/Tc/Errors/Hole.hs b/compiler/GHC/Tc/Errors/Hole.hs index 8d0c0fa9a9c39160d71f6faa87cbb9562eb5827b..189c115b032c4d2be4da6971de921a915dcd6b37 100644 --- a/compiler/GHC/Tc/Errors/Hole.hs +++ b/compiler/GHC/Tc/Errors/Hole.hs @@ -402,7 +402,7 @@ is discarded. Note [Speeding up valid hole-fits] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -To fix #16875 we noted that a lot of time was being spent on unecessary work. +To fix #16875 we noted that a lot of time was being spent on unnecessary work. When we'd call `tcCheckHoleFit hole hole_ty ty`, we would end up by generating a constraint to show that `hole_ty ~ ty`, including any constraints in `ty`. For @@ -956,7 +956,7 @@ tcSubsumes ty_a ty_b = fst <$> tcCheckHoleFit dummyHole ty_a ty_b , th_implics = [] , th_hole = Nothing } --- | A tcSubsumes which takes into account relevant constraints, to fix trac +-- | A tcSubsumes which takes into account relevant constraints, to fix -- #14273. This makes sure that when checking whether a type fits the hole, -- the type has to be subsumed by type of the hole as well as fulfill all -- constraints on the type of the hole. diff --git a/compiler/GHC/Tc/Gen/HsType.hs b/compiler/GHC/Tc/Gen/HsType.hs index a1c81c290f7cabb24439c3b614936fae01e45672..e94d20b0bf216d6a01e2e02e1ad49f84bac796d9 100644 --- a/compiler/GHC/Tc/Gen/HsType.hs +++ b/compiler/GHC/Tc/Gen/HsType.hs @@ -2119,7 +2119,7 @@ The type desugarer is phase 2 of dealing with HsTypes. Specifically: * It zonks any kinds. The returned type should have no mutable kind or type variables (hence returning Type not TcType): - - any unconstrained kind variables are defaulted to (Any *) just + - any unconstrained kind variables are defaulted to (Any @Type) just as in GHC.Tc.Zonk.Type. - there are no mutable type variables because we are kind-checking a type @@ -2130,7 +2130,7 @@ You might worry about nested scopes: ..a:kappa in scope.. let f :: forall b. T '[a,b] -> Int In this case, f's type could have a mutable kind variable kappa in it; -and we might then default it to (Any *) when dealing with f's type +and we might then default it to (Any @Type) when dealing with f's type signature. But we don't expect this to happen because we can't get a lexically scoped type variable with a mutable kind variable in it. A delicate point, this. If it becomes an issue we might need to @@ -2155,7 +2155,7 @@ as if $(..blah..) :: forall k. k. In the e1 example, the context of the splice fixes kappa to *. But in the e2 example, we'll desugar the type, zonking the kind unification variables as we go. When we encounter the unconstrained kappa, we -want to default it to '*', not to (Any *). +want to default it to 'Type', not to (Any @Type). -} diff --git a/compiler/GHC/Tc/Gen/Sig.hs b/compiler/GHC/Tc/Gen/Sig.hs index fb199da379e6deb3ac3e8a2f5f5c4561fbb34d0c..f0804f023e42ae423d05ddd7b40752700d45400f 100644 --- a/compiler/GHC/Tc/Gen/Sig.hs +++ b/compiler/GHC/Tc/Gen/Sig.hs @@ -777,7 +777,7 @@ Some wrinkles tcSpecPrags :: Id -> [LSig GhcRn] -> TcM [LTcSpecPrag] --- Add INLINE and SPECIALSE pragmas +-- Add INLINE and SPECIALISE pragmas -- INLINE prags are added to the (polymorphic) Id directly -- SPECIALISE prags are passed to the desugarer via TcSpecPrags -- Pre-condition: the poly_id is zonked diff --git a/compiler/GHC/Tc/TyCl.hs b/compiler/GHC/Tc/TyCl.hs index 6a359a68b903d48c801a6d237515d14462fbb0c8..a789f5c4924faacb7026c15edda28b81a21b05b0 100644 --- a/compiler/GHC/Tc/TyCl.hs +++ b/compiler/GHC/Tc/TyCl.hs @@ -3402,7 +3402,7 @@ unravelFamInstPats fam_app -- The Nothing case cannot happen for type families, because -- we don't call unravelFamInstPats until we've solved the -- equalities. For data families, it shouldn't happen either, - -- we need to fail hard and early if it does. See trac issue #15905 + -- we need to fail hard and early if it does. See issue #15905 -- for an example of this happening. addConsistencyConstraints :: AssocInstInfo -> TcType -> TcM () @@ -4746,7 +4746,7 @@ checkValidDataCon dflags existential_ok tc con checkNewDataCon :: DataCon -> TcM () -- Further checks for the data constructor of a newtype -- You might wonder if we need to check for an unlifted newtype --- without -XUnliftedNewTypes, such as +-- without -XUnliftedNewtypes, such as -- newtype C = MkC Int# -- But they are caught earlier, by GHC.Tc.Gen.HsType.checkDataKindSig checkNewDataCon con diff --git a/compiler/GHC/Types/Basic.hs b/compiler/GHC/Types/Basic.hs index 758b7f4abdbfbb5d13c809fc3cd6187f06e50249..cb806eb425a6821f2cb8ce6fe08373683be12979 100644 --- a/compiler/GHC/Types/Basic.hs +++ b/compiler/GHC/Types/Basic.hs @@ -2211,7 +2211,7 @@ GHC.Tc.Solver.applyDefaultingRules GHC.Iface.Type.defaultIfaceTyVarsOfKind This is a built-in defaulting mechanism that only applies when pretty-printing. - It defaults 'RuntimeRep'/'Levity' variables unless -fprint-explicit-kinds is enabled, + It defaults 'RuntimeRep'/'Levity' variables unless -fprint-explicit-runtime-reps is enabled, and 'Multiplicity' variables unless -XLinearTypes is enabled. -} diff --git a/compiler/GHC/Types/Literal.hs b/compiler/GHC/Types/Literal.hs index 1bb9ddb31b4deb1b0c30fb7dbacc3f3ead466180..a1e4f63f124b3efc80ec79dfe40055e649355ffc 100644 --- a/compiler/GHC/Types/Literal.hs +++ b/compiler/GHC/Types/Literal.hs @@ -136,8 +136,8 @@ data Literal | LitRubbish -- ^ A nonsense value; See Note [Rubbish literals]. TypeOrConstraint -- t_or_c: whether this is a type or a constraint RuntimeRepType -- rr: a type of kind RuntimeRep - -- The type of the literal is forall (a:TYPE rr). a - -- or forall (a:CONSTRAINT rr). a + -- The type of the literal is forall (a::TYPE rr). a + -- or forall (a::CONSTRAINT rr). a -- -- INVARIANT: the Type has no free variables -- and so substitution etc can ignore it diff --git a/compiler/GHC/Types/Name.hs b/compiler/GHC/Types/Name.hs index 703a973752aa0ec58e52d898ae2d3698f36cb69c..9d5fdd5f54033c2adb479f2f8176799dcf46001c 100644 --- a/compiler/GHC/Types/Name.hs +++ b/compiler/GHC/Types/Name.hs @@ -199,7 +199,7 @@ So a comparison like `x == int8TyConName` will turn into `getUnique x == int8TyConKey`, nice and efficient. But if the `n_occ` field is strict, that definition will look like: - int8TyCOnName = case (mkOccName..."Int8") of occ -> + int8TyConName = case (mkOccName..."Int8") of occ -> Name gHC_INT occ int8TyConKey and now the comparison will not optimise. This matters even more when there are @@ -606,7 +606,7 @@ instance Eq Name where -- | __Caution__: This instance is implemented via `nonDetCmpUnique`, which -- means that the ordering is not stable across deserialization or rebuilds. -- --- See `nonDetCmpUnique` for further information, and trac #15240 for a bug +-- See `nonDetCmpUnique` for further information, and #15240 for a bug -- caused by improper use of this instance. -- For a deterministic lexicographic ordering, use `stableNameCmp`. diff --git a/compiler/GHC/Utils/Logger.hs b/compiler/GHC/Utils/Logger.hs index 9d8370d297caa01f008b65d61129774a2c772d3d..e1fc3832c31232852eafe1014d3517e69c9b4235 100644 --- a/compiler/GHC/Utils/Logger.hs +++ b/compiler/GHC/Utils/Logger.hs @@ -505,7 +505,7 @@ chooseDumpFile logflags ways flag getPrefix -- dump file location is being forced - -- by the --ddump-file-prefix flag. + -- by the -ddump-file-prefix flag. | Just prefix <- log_dump_prefix_override logflags = prefix -- dump file locations, module specified to [modulename] set by diff --git a/docs/users_guide/exts/type_abstractions.rst b/docs/users_guide/exts/type_abstractions.rst index 2e5e8ecab7a00be07a3d6dc27ed5fed301cca66b..67f4c08235302e9775109efcd3f706798807db2a 100644 --- a/docs/users_guide/exts/type_abstractions.rst +++ b/docs/users_guide/exts/type_abstractions.rst @@ -43,7 +43,7 @@ a GADT data constructor as in the following example:: main :: IO () main = print $ test (Foo @Float) -In this example, the case in ``test``` is binding an existential variable introduced +In this example, the case in ``test`` is binding an existential variable introduced by ``Foo`` that otherwise could not be named and used. It's possible to bind variables to any part of the type arguments to a constructor; @@ -188,4 +188,4 @@ signature. The inferred ``forall k.`` does not float to the left; the order of quantifiers continues to match the order of binders in the header:: -- Inferred kind: forall k. k -> forall j. j -> Type - data B @(k :: Type) (a :: k) @(j :: Type) (b :: j) \ No newline at end of file + data B @(k :: Type) (a :: k) @(j :: Type) (b :: j) diff --git a/docs/users_guide/ghci.rst b/docs/users_guide/ghci.rst index a2966b1d147d138364118917f744395539439010..2fa4062b70a5123d5ac759a7a3c32e8d6b4605cd 100644 --- a/docs/users_guide/ghci.rst +++ b/docs/users_guide/ghci.rst @@ -2860,7 +2860,7 @@ commonly used commands. Sets the function to be used for the prompt displaying in GHCi. The function should be of the type ``[String] -> Int -> IO String``. This function is called each time the prompt is being made. The first argument - stands for the names of the modules currently in scope(the name of the + stands for the names of the modules currently in scope (the name of the "topmost" module will begin with a ``*``; see :ref:`ghci-scope` for more information). The second arguments is the line number (as referenced in compiler messages) of the current prompt. diff --git a/docs/users_guide/using-optimisation.rst b/docs/users_guide/using-optimisation.rst index 849d81605e947a5be7e2f2154a26a0cad2176561..5a6c8efeffdbb983931d4804106460cf2b5eaa40 100644 --- a/docs/users_guide/using-optimisation.rst +++ b/docs/users_guide/using-optimisation.rst @@ -372,7 +372,7 @@ as such you shouldn't need to set any of them explicitly. A flag sumIO :: [Int] -> IO Int sumIO xs = IO $ \s -> case $wsum xs s of (# s', r #) -> (# s', I# r #) - $wsumIO :: [Int] -> (# RealWorld#, Int# #) + $wsumIO :: [Int] -> (# State# RealWorld, Int# #) $wsumIO [] s = (# s, 0# #) $wsumIO (I# x:xs) s = case $wsumIO xs of (# s', r #) -> (# s', x +# r#) diff --git a/ghc/GHCi/UI.hs b/ghc/GHCi/UI.hs index f412467c70d6fcb664f7261739ebb3b021a5f9de..f32c636d6528fb35eb62052d14e33cab9074916b 100644 --- a/ghc/GHCi/UI.hs +++ b/ghc/GHCi/UI.hs @@ -2677,7 +2677,7 @@ browseModule bang modl exports_only = do -- annotate groups of imports with their import modules -- the default ordering is somewhat arbitrary, so we group -- by header and sort groups; the names themselves should - -- really come in order of source appearance.. (trac #1799) + -- really come in order of source appearance.. (#1799) annotate mts = concatMap (\(m,ts)->labels m:ts) $ sortBy cmpQualifiers $ grp mts where cmpQualifiers = diff --git a/libraries/base/Unsafe/Coerce.hs b/libraries/base/Unsafe/Coerce.hs index 33cfcc9bc1a9912c926c19c2542c9568d461d38a..8e2c569aea53ca325409fafb648e5ac940a46455 100644 --- a/libraries/base/Unsafe/Coerce.hs +++ b/libraries/base/Unsafe/Coerce.hs @@ -180,7 +180,7 @@ several ways no longer does that. So we need a separate map/unsafeCoerce RULE, in this module. - Adding these RULES means we must delay inlinine unsafeCoerce + Adding these RULES means we must delay inlining unsafeCoerce until the RULES have had a chance to fire; hence the INLINE[1] pragma on unsafeCoerce. (Side note: this has the coincidental benefit of making the unsafeCoerce-based version of the `reflection` diff --git a/testsuite/driver/runtests.py b/testsuite/driver/runtests.py index fc0c38360cf50654329197ff97b8e3901490bb75..4c63141a7151dff0a79a39debfb1572152c1cfce 100644 --- a/testsuite/driver/runtests.py +++ b/testsuite/driver/runtests.py @@ -88,7 +88,7 @@ perf_group.add_argument("--only-perf-tests", action="store_true", help="Only do parser.add_argument("--ignore-perf-failures", choices=['increases','decreases','all'], help="Do not fail due to out-of-tolerance perf tests") parser.add_argument("--only-report-hadrian-deps", type=argparse.FileType('w'), - help="Dry run the testsuite and report all extra hadrian depenedencies needed on the given file") + help="Dry run the testsuite and report all extra hadrian dependencies needed on the given file") args = parser.parse_args() diff --git a/testsuite/tests/quantified-constraints/T23323.hs b/testsuite/tests/quantified-constraints/T23323.hs index 5cb82e30abca8f4774c008bc7ca31949ab36db94..29410a890a7bb3bf76742437ccb7f5adb8423cec 100644 --- a/testsuite/tests/quantified-constraints/T23323.hs +++ b/testsuite/tests/quantified-constraints/T23323.hs @@ -13,5 +13,5 @@ foo :: forall f c. (forall a. c a => Show (f a)) => Proxy c -> f Int -> Int foo = foo bar = foo @T @Eq --- We dont' want to report a redundance (Eq a) constraint +-- We don't want to report a redundant (Eq a) constraint