diff options
author | Krzysztof Gogolewski <krzysztof.gogolewski@tweag.io> | 2021-06-17 10:44:05 +0200 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2021-06-22 02:34:49 -0400 |
commit | 362f078ef980c735d29bfa037d2a907f0002aece (patch) | |
tree | 49669a938e8809f445db815eaa5484f79615bc96 | |
parent | 595dfbb02fc8c15126140886150c99206d57906c (diff) | |
download | haskell-362f078ef980c735d29bfa037d2a907f0002aece.tar.gz |
Typos, minor comment fixes
- Remove fstName, sndName, fstIdKey, sndIdKey - no longer used,
removed from basicKnownKeyNames
- Remove breakpointId, breakpointCondId, opaqueTyCon, unknownTyCon -
they were used in the old implementation of the GHCi debugger
- Fix typos in comments
- Remove outdated comment in Lint.hs
- Use 'LitRubbish' instead of 'RubbishLit' for consistency
- Remove comment about subkinding - superseded by
Note [Kind Constraint and kind Type]
- Mention ticket ID in a linear types error message
- Fix formatting in using-warnings.rst and linear-types.rst
- Remove comment about 'Any' in Dynamic.hs - Dynamic
now uses Typeable + existential instead of Any
- Remove codeGen/should_compile/T13233.hs
This was added by accident, it is not used and T13233 is already in
should_fail
27 files changed, 44 insertions, 109 deletions
diff --git a/compiler/GHC/Builtin/Names.hs b/compiler/GHC/Builtin/Names.hs index 80d5e4f48f..ddb7074690 100644 --- a/compiler/GHC/Builtin/Names.hs +++ b/compiler/GHC/Builtin/Names.hs @@ -345,10 +345,9 @@ basicKnownKeyNames -- Others otherwiseIdName, inlineIdName, - eqStringName, assertName, breakpointName, breakpointCondName, - opaqueTyConName, + eqStringName, assertName, assertErrorName, traceName, - printName, fstName, sndName, + printName, dollarName, -- ghc-bignum @@ -1136,11 +1135,10 @@ groupWithName, considerAccessibleName :: Name groupWithName = varQual gHC_EXTS (fsLit "groupWith") groupWithIdKey considerAccessibleName = varQual gHC_EXTS (fsLit "considerAccessible") considerAccessibleIdKey --- Random PrelBase functions +-- Random GHC.Base functions fromStringName, otherwiseIdName, foldrName, buildName, augmentName, mapName, appendName, assertName, - breakpointName, breakpointCondName, - opaqueTyConName, dollarName :: Name + dollarName :: Name dollarName = varQual gHC_BASE (fsLit "$") dollarIdKey otherwiseIdName = varQual gHC_BASE (fsLit "otherwise") otherwiseIdKey foldrName = varQual gHC_BASE (fsLit "foldr") foldrIdKey @@ -1149,16 +1147,8 @@ augmentName = varQual gHC_BASE (fsLit "augment") augmentIdKey mapName = varQual gHC_BASE (fsLit "map") mapIdKey appendName = varQual gHC_BASE (fsLit "++") appendIdKey assertName = varQual gHC_BASE (fsLit "assert") assertIdKey -breakpointName = varQual gHC_BASE (fsLit "breakpoint") breakpointIdKey -breakpointCondName= varQual gHC_BASE (fsLit "breakpointCond") breakpointCondIdKey -opaqueTyConName = tcQual gHC_BASE (fsLit "Opaque") opaqueTyConKey fromStringName = varQual dATA_STRING (fsLit "fromString") fromStringClassOpKey --- PrelTup -fstName, sndName :: Name -fstName = varQual dATA_TUPLE (fsLit "fst") fstIdKey -sndName = varQual dATA_TUPLE (fsLit "snd") sndIdKey - -- Module GHC.Num numClassName, fromIntegerName, minusName, negateName :: Name numClassName = clsQual gHC_NUM (fsLit "Num") numClassKey @@ -1363,7 +1353,7 @@ fromIntegralName = varQual gHC_REAL (fsLit "fromIntegral")fromIntegralIdKey realToFracName = varQual gHC_REAL (fsLit "realToFrac") realToFracIdKey mkRationalBase2Name = varQual gHC_REAL (fsLit "mkRationalBase2") mkRationalBase2IdKey mkRationalBase10Name = varQual gHC_REAL (fsLit "mkRationalBase10") mkRationalBase10IdKey --- PrelFloat classes +-- GHC.Float classes floatingClassName, realFloatClassName :: Name floatingClassName = clsQual gHC_FLOAT (fsLit "Floating") floatingClassKey realFloatClassName = clsQual gHC_FLOAT (fsLit "RealFloat") realFloatClassKey @@ -1956,14 +1946,6 @@ pluginTyConKey, frontendPluginTyConKey :: Unique pluginTyConKey = mkPreludeTyConUnique 102 frontendPluginTyConKey = mkPreludeTyConUnique 103 -unknownTyConKey, unknown1TyConKey, unknown2TyConKey, unknown3TyConKey, - opaqueTyConKey :: Unique -unknownTyConKey = mkPreludeTyConUnique 129 -unknown1TyConKey = mkPreludeTyConUnique 130 -unknown2TyConKey = mkPreludeTyConUnique 131 -unknown3TyConKey = mkPreludeTyConUnique 132 -opaqueTyConKey = mkPreludeTyConUnique 133 - -- Generics (Unique keys) v1TyConKey, u1TyConKey, par1TyConKey, rec1TyConKey, k1TyConKey, m1TyConKey, sumTyConKey, prodTyConKey, @@ -2343,7 +2325,7 @@ raiseDivZeroIdKey = mkPreludeMiscIdUnique 29 concatIdKey, filterIdKey, zipIdKey, bindIOIdKey, returnIOIdKey, newStablePtrIdKey, printIdKey, failIOIdKey, nullAddrIdKey, voidArgIdKey, - fstIdKey, sndIdKey, otherwiseIdKey, assertIdKey :: Unique + otherwiseIdKey, assertIdKey :: Unique concatIdKey = mkPreludeMiscIdUnique 31 filterIdKey = mkPreludeMiscIdUnique 32 zipIdKey = mkPreludeMiscIdUnique 33 @@ -2354,8 +2336,6 @@ printIdKey = mkPreludeMiscIdUnique 37 failIOIdKey = mkPreludeMiscIdUnique 38 nullAddrIdKey = mkPreludeMiscIdUnique 39 voidArgIdKey = mkPreludeMiscIdUnique 40 -fstIdKey = mkPreludeMiscIdUnique 41 -sndIdKey = mkPreludeMiscIdUnique 42 otherwiseIdKey = mkPreludeMiscIdUnique 43 assertIdKey = mkPreludeMiscIdUnique 44 @@ -2377,10 +2357,6 @@ runRWKey = mkPreludeMiscIdUnique 107 traceKey :: Unique traceKey = mkPreludeMiscIdUnique 108 -breakpointIdKey, breakpointCondIdKey :: Unique -breakpointIdKey = mkPreludeMiscIdUnique 110 -breakpointCondIdKey = mkPreludeMiscIdUnique 111 - inlineIdKey, noinlineIdKey :: Unique inlineIdKey = mkPreludeMiscIdUnique 120 -- see below diff --git a/compiler/GHC/Builtin/PrimOps.hs b/compiler/GHC/Builtin/PrimOps.hs index 45e570d34c..1fa8b02bb7 100644 --- a/compiler/GHC/Builtin/PrimOps.hs +++ b/compiler/GHC/Builtin/PrimOps.hs @@ -636,7 +636,7 @@ have: plusInt# a b = P.plusInt# a b The Id for the wrapper of a primop can be found using -'GHC.Builtin.PrimOp.primOpWrapperId'. However, GHCi does not use this mechanism +'GHC.Builtin.PrimOps.primOpWrapperId'. However, GHCi does not use this mechanism to link primops; it rather does a rather hacky symbol lookup (see GHC.ByteCode.Linker.primopToCLabel). TODO: Perhaps this should be changed? diff --git a/compiler/GHC/Builtin/Types.hs b/compiler/GHC/Builtin/Types.hs index 880aec299c..3339842471 100644 --- a/compiler/GHC/Builtin/Types.hs +++ b/compiler/GHC/Builtin/Types.hs @@ -1135,7 +1135,7 @@ mk_tuple Unboxed arity = (tycon, tuple_con) UnboxedTuple flavour -- See Note [Unboxed tuple RuntimeRep vars] in GHC.Core.TyCon - -- Kind: forall (k1:RuntimeRep) (k2:RuntimeRep). TYPE k1 -> TYPE k2 -> # + -- Kind: forall (k1:RuntimeRep) (k2:RuntimeRep). TYPE k1 -> TYPE k2 -> TYPE (TupleRep [k1, k2]) tc_binders = mkTemplateTyConBinders (replicate arity runtimeRepTy) (\ks -> map tYPE ks) diff --git a/compiler/GHC/Builtin/Types/Prim.hs b/compiler/GHC/Builtin/Types/Prim.hs index 1125655398..c339125e9a 100644 --- a/compiler/GHC/Builtin/Types/Prim.hs +++ b/compiler/GHC/Builtin/Types/Prim.hs @@ -785,7 +785,7 @@ error messages, and (~R#) is rendered as Coercible. Let's take these one at a time: -------------------------- - (~#) :: forall k1 k2. k1 -> k2 -> # + (~#) :: forall k1 k2. k1 -> k2 -> TYPE (TupleRep '[]) -------------------------- This is The Type Of Equality in GHC. It classifies nominal coercions. This type is used in the solver for recording equality constraints. @@ -865,7 +865,7 @@ They are not defined within GHC at all. -------------------------- - (~R#) :: forall k1 k2. k1 -> k2 -> # + (~R#) :: forall k1 k2. k1 -> k2 -> TYPE (TupleRep '[]) -------------------------- The is the representational analogue of ~#. This is the type of representational equalities that the solver works on. All wanted constraints of this type are @@ -900,7 +900,7 @@ within GHC at all. -------------------------- - (~P#) :: forall k1 k2. k1 -> k2 -> # + (~P#) :: forall k1 k2. k1 -> k2 -> TYPE (TupleRep '[]) -------------------------- This is the phantom analogue of ~# and it is barely used at all. (The solver has no idea about this one.) Here is the motivation: @@ -960,7 +960,7 @@ mkProxyPrimTy k ty = TyConApp proxyPrimTyCon [k, ty] proxyPrimTyCon :: TyCon proxyPrimTyCon = mkPrimTyCon proxyPrimTyConName binders res_kind [Nominal,Phantom] where - -- Kind: forall k. k -> TYPE (Tuple '[]) + -- Kind: forall k. k -> TYPE (TupleRep '[]) binders = mkTemplateTyConBinders [liftedTypeKind] id res_kind = unboxedTupleKind [] @@ -976,7 +976,7 @@ eqPrimTyCon :: TyCon -- The representation type for equality predicates -- See Note [The equality types story] eqPrimTyCon = mkPrimTyCon eqPrimTyConName binders res_kind roles where - -- Kind :: forall k1 k2. k1 -> k2 -> TYPE (Tuple '[]) + -- Kind :: forall k1 k2. k1 -> k2 -> TYPE (TupleRep '[]) binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] id res_kind = unboxedTupleKind [] roles = [Nominal, Nominal, Nominal, Nominal] @@ -987,7 +987,7 @@ eqPrimTyCon = mkPrimTyCon eqPrimTyConName binders res_kind roles eqReprPrimTyCon :: TyCon -- See Note [The equality types story] eqReprPrimTyCon = mkPrimTyCon eqReprPrimTyConName binders res_kind roles where - -- Kind :: forall k1 k2. k1 -> k2 -> TYPE (Tuple '[]) + -- Kind :: forall k1 k2. k1 -> k2 -> TYPE (TupleRep '[]) binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] id res_kind = unboxedTupleKind [] roles = [Nominal, Nominal, Representational, Representational] @@ -998,7 +998,7 @@ eqReprPrimTyCon = mkPrimTyCon eqReprPrimTyConName binders res_kind roles eqPhantPrimTyCon :: TyCon eqPhantPrimTyCon = mkPrimTyCon eqPhantPrimTyConName binders res_kind roles where - -- Kind :: forall k1 k2. k1 -> k2 -> TYPE (Tuple '[]) + -- Kind :: forall k1 k2. k1 -> k2 -> TYPE (TupleRep '[]) binders = mkTemplateTyConBinders [liftedTypeKind, liftedTypeKind] id res_kind = unboxedTupleKind [] roles = [Nominal, Nominal, Phantom, Phantom] diff --git a/compiler/GHC/Core/Lint.hs b/compiler/GHC/Core/Lint.hs index 43935d1efe..fa780fb320 100644 --- a/compiler/GHC/Core/Lint.hs +++ b/compiler/GHC/Core/Lint.hs @@ -161,16 +161,6 @@ We check for If we have done specialisation the we check that there are (a) No top-level bindings of primitive (unboxed type) -Outstanding issues: - - -- Things are *not* OK if: - -- - -- * Unsaturated type app before specialisation has been done; - -- - -- * Oversaturated type app after specialisation (eta reduction - -- may well be happening...); - - Note [Linting function types] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As described in Note [Representation of function types], all saturated @@ -1746,11 +1736,11 @@ lintTySynFamApp report_unsat ty tc tys ; return (TyConApp tc tys') } ----------------- --- Confirms that a type is really *, #, Constraint etc +-- Confirms that a type is really TYPE r or Constraint checkValueType :: LintedType -> SDoc -> LintM () checkValueType ty doc = lintL (classifiesTypeWithValues kind) - (text "Non-*-like kind when *-like expected:" <+> ppr kind $$ + (text "Non-Type-like kind when Type-like expected:" <+> ppr kind $$ text "when checking" <+> doc) where kind = typeKind ty diff --git a/compiler/GHC/Core/Opt/Simplify.hs b/compiler/GHC/Core/Opt/Simplify.hs index cb5264f4ba..d1ca3e3f9c 100644 --- a/compiler/GHC/Core/Opt/Simplify.hs +++ b/compiler/GHC/Core/Opt/Simplify.hs @@ -1722,8 +1722,8 @@ simplRecE env pairs body cont In `simplNonRecE`, the call to `isStrictId` will fail if the binder has a representation-polymorphic type, of kind (TYPE r). So we are careful to call `isStrictId` on the OutId, not the InId, in case we have - ((\(r::RuntimeRep) \(x::Type r). blah) Lifted arg) -That will lead to `simplNonRecE env (x::Type r) arg`, and we can't tell + ((\(r::RuntimeRep) \(x::TYPE r). blah) Lifted arg) +That will lead to `simplNonRecE env (x::TYPE r) arg`, and we can't tell if x is lifted or unlifted from that. We only get such redexes from the compulsory inlining of a wired-in, @@ -3166,11 +3166,11 @@ even though it'll be over-ridden in every case alternative with a more informative unfolding. Why? Because suppose a later, less clever, pass simply replaces all occurrences of the case binder with the binder itself; then Lint may complain about the let/app invariant. Example - case e of b { DEFAULT -> let v = reallyUnsafePtrEq# b y in .... + case e of b { DEFAULT -> let v = reallyUnsafePtrEquality# b y in .... ; K -> blah } The let/app invariant requires that y is evaluated in the call to -reallyUnsafePtrEq#, which it is. But we still want that to be true if we +reallyUnsafePtrEquality#, which it is. But we still want that to be true if we propagate binders to occurrences. This showed up in #13027. diff --git a/compiler/GHC/Core/Opt/Specialise.hs b/compiler/GHC/Core/Opt/Specialise.hs index 88f5d408de..20f78f94bc 100644 --- a/compiler/GHC/Core/Opt/Specialise.hs +++ b/compiler/GHC/Core/Opt/Specialise.hs @@ -1762,7 +1762,7 @@ Wrinkles unfolding of the specialised function: this is the last field in specHeader's big result tuple. - The right thing to do is to produce a RubbishLit; it should rapidly + The right thing to do is to produce a LitRubbish; it should rapidly disappear. Rather like GHC.Core.Opt.WorkWrap.Utils.mk_absent_let. Note [Zap occ info in rule binders] diff --git a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs index 3eb4b31c52..61de975bf0 100644 --- a/compiler/GHC/Core/Opt/WorkWrap/Utils.hs +++ b/compiler/GHC/Core/Opt/WorkWrap/Utils.hs @@ -1213,7 +1213,7 @@ Needless to say, there are some wrinkles: cardinality 'C_10' (say, the arg to a bottoming function) where we could've used an error-thunk, but that's a small price to pay for simplicity. - 3. We can only emit a RubbishLit if the arg's type @arg_ty@ is mono-rep, e.g. + 3. We can only emit a LitRubbish if the arg's type @arg_ty@ is mono-rep, e.g. of the form @TYPE rep@ where @rep@ is not (and doesn't contain) a variable. Why? Because if we don't know its representation (e.g. size in memory, register class), we don't know what or how much rubbish to emit in codegen. diff --git a/compiler/GHC/Core/Type.hs b/compiler/GHC/Core/Type.hs index 8a5dc691ec..6b88262ff5 100644 --- a/compiler/GHC/Core/Type.hs +++ b/compiler/GHC/Core/Type.hs @@ -3301,14 +3301,8 @@ isKindLevPoly k = assertPpr (isLiftedTypeKind k || _is_type) (ppr k) $ _is_type = classifiesTypeWithValues k ----------------------------------------- --- Subkinding --- The tc variants are used during type-checking, where ConstraintKind --- is distinct from all other kinds --- After type-checking (in core), Constraint and liftedTypeKind are --- indistinguishable - -- | Does this classify a type allowed to have values? Responds True to things --- like *, #, TYPE Lifted, TYPE v, Constraint. +-- like *, TYPE Lifted, TYPE IntRep, TYPE v, Constraint. classifiesTypeWithValues :: Kind -> Bool -- ^ True of any sub-kind of OpenTypeKind classifiesTypeWithValues k = isJust (kindRep_maybe k) diff --git a/compiler/GHC/Core/Utils.hs b/compiler/GHC/Core/Utils.hs index 969ede72bc..a9a8769259 100644 --- a/compiler/GHC/Core/Utils.hs +++ b/compiler/GHC/Core/Utils.hs @@ -1786,7 +1786,7 @@ points do the job nicely. Note [Primops with lifted arguments] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Is this ok-for-speculation (see #13027)? - reallyUnsafePtrEq# a b + reallyUnsafePtrEquality# a b Well, yes. The primop accepts lifted arguments and does not evaluate them. Indeed, in general primops are, well, primitive and do not perform evaluation. diff --git a/compiler/GHC/Driver/Flags.hs b/compiler/GHC/Driver/Flags.hs index dc9c19a52e..9643579ce8 100644 --- a/compiler/GHC/Driver/Flags.hs +++ b/compiler/GHC/Driver/Flags.hs @@ -522,13 +522,13 @@ data WarningFlag = | Opt_WarnImplicitKindVars -- Since 8.6 | Opt_WarnSpaceAfterBang | Opt_WarnMissingDerivingStrategies -- Since 8.8 - | Opt_WarnPrepositiveQualifiedModule -- Since TBD + | Opt_WarnPrepositiveQualifiedModule -- Since 8.10 | Opt_WarnUnusedPackages -- Since 8.10 | Opt_WarnInferredSafeImports -- Since 8.10 | Opt_WarnMissingSafeHaskellMode -- Since 8.10 | Opt_WarnCompatUnqualifiedImports -- Since 8.10 | Opt_WarnDerivingDefaults - | Opt_WarnInvalidHaddock -- Since 8.12 + | Opt_WarnInvalidHaddock -- Since 9.0 | Opt_WarnOperatorWhitespaceExtConflict -- Since 9.2 | Opt_WarnOperatorWhitespace -- Since 9.2 | Opt_WarnAmbiguousFields -- Since 9.2 diff --git a/compiler/GHC/HsToCore/Errors/Ppr.hs b/compiler/GHC/HsToCore/Errors/Ppr.hs index 0d8dbcc9a9..b0d2b16409 100644 --- a/compiler/GHC/HsToCore/Errors/Ppr.hs +++ b/compiler/GHC/HsToCore/Errors/Ppr.hs @@ -88,7 +88,7 @@ instance Diagnostic DsMessage where -> mkSimpleDecorated $ text "Ignoring useless SPECIALISE pragma for NOINLINE function:" <+> quotes (ppr poly_id) DsMultiplicityCoercionsNotSupported - -> mkSimpleDecorated $ text "Multiplicity coercions are currently not supported" + -> mkSimpleDecorated $ text "Multiplicity coercions are currently not supported (see GHC #19517)" DsOrphanRule rule -> mkSimpleDecorated $ text "Orphan rule:" <+> ppr rule DsRuleLhsTooComplicated orig_lhs lhs2 diff --git a/compiler/GHC/HsToCore/Expr.hs b/compiler/GHC/HsToCore/Expr.hs index 6bf900da89..b79f5862b9 100644 --- a/compiler/GHC/HsToCore/Expr.hs +++ b/compiler/GHC/HsToCore/Expr.hs @@ -1130,7 +1130,7 @@ is what dsHsWrapped does. Because we might have an HsVar without a wrapper, we check in dsHsVar as well. typecheck/should_fail/T17021 triggers this case. -Note that if `f :: forall r (a :: Type r). blah`, then +Note that if `f :: forall r (a :: TYPE r). blah`, then const True f is absolutely fine. Here `f` is a function, represented by a pointer, and we can pass it to `const` (or anything else). (See diff --git a/compiler/GHC/HsToCore/Utils.hs b/compiler/GHC/HsToCore/Utils.hs index 020775c91c..b68cf061a0 100644 --- a/compiler/GHC/HsToCore/Utils.hs +++ b/compiler/GHC/HsToCore/Utils.hs @@ -529,7 +529,7 @@ There are a few subtleties in the desugaring of `seq`: 3. (as described in #2409) - The isLocalId ensures that we don't turn + The isInternalName ensures that we don't turn True `seq` e into case True of True { ... } diff --git a/compiler/GHC/Tc/Gen/Head.hs b/compiler/GHC/Tc/Gen/Head.hs index 4164bd26b0..f71b424ffa 100644 --- a/compiler/GHC/Tc/Gen/Head.hs +++ b/compiler/GHC/Tc/Gen/Head.hs @@ -809,7 +809,7 @@ mostly in tcInferDataCon: 2. We are going to return a ConLikeTc, thus: XExpr (ConLikeTc K [r,a] [Scaled p a]) - :: forall (r :: RuntimeRep) (a :: Type r). a %p -> T r a + :: forall (r :: RuntimeRep) (a :: TYPE r). a %p -> T r a where 'p' is a fresh multiplicity unification variable. To get the returned ConLikeTc, we allocate a fresh multiplicity diff --git a/compiler/GHC/Types/Id/Make.hs b/compiler/GHC/Types/Id/Make.hs index 581e8a83dd..4c2f028360 100644 --- a/compiler/GHC/Types/Id/Make.hs +++ b/compiler/GHC/Types/Id/Make.hs @@ -1542,7 +1542,7 @@ does not linger for long. -- See Note [Left and right sections] in GHC.Rename.Expr -- See Note [Wired-in Ids for rebindable syntax] --- leftSection :: forall r1 r2 n (a:Type r1) (b:TYPE r2). +-- leftSection :: forall r1 r2 n (a:TYPE r1) (b:TYPE r2). -- (a %n-> b) -> a %n-> b -- leftSection f x = f x -- Important that it is eta-expanded, so that (leftSection undefined `seq` ()) diff --git a/compiler/GHC/Types/Literal.hs b/compiler/GHC/Types/Literal.hs index 6160a450bb..9d079f8a85 100644 --- a/compiler/GHC/Types/Literal.hs +++ b/compiler/GHC/Types/Literal.hs @@ -1007,7 +1007,7 @@ c) Literal is in Ord, because (and only because) we use Ord on AltCon when Moreover, rubbish literals should not appear in patterns anyway. d) Why not lower LitRubbish in CoreToStg? Because it enables us to use - RubbishLit when unarising unboxed sums in the future, and it allows + LitRubbish when unarising unboxed sums in the future, and it allows rubbish values of e.g. VecRep, for which we can't cough up dummy values in STG. diff --git a/compiler/GHC/Utils/Ppr.hs b/compiler/GHC/Utils/Ppr.hs index e64c6e61f1..9b5b55658f 100644 --- a/compiler/GHC/Utils/Ppr.hs +++ b/compiler/GHC/Utils/Ppr.hs @@ -446,7 +446,7 @@ Relevant discussions: * Phabricator: https://phabricator.haskell.org/D4465 * GHC Trac: https://gitlab.haskell.org/ghc/ghc/issues/14872 -There is a flag `-dword-hex-literals` that causes literals of +There is a flag `-dhex-word-literals` that causes literals of type `Word#` or `Word64#` to be displayed in hexadecimal instead of decimal when dumping GHC core. It also affects the presentation of these in GHC's error messages. Additionally, the hexadecimal diff --git a/docs/users_guide/exts/linear_types.rst b/docs/users_guide/exts/linear_types.rst index 8029d0ad2f..5ed710d1c5 100644 --- a/docs/users_guide/exts/linear_types.rst +++ b/docs/users_guide/exts/linear_types.rst @@ -111,6 +111,7 @@ is no restriction on ``x``. It is also possible to define a multiplicity-polymorphic field: :: + data T3 a m where MkT3 :: a %m -> T3 a m diff --git a/docs/users_guide/using-warnings.rst b/docs/users_guide/using-warnings.rst index 840c66eef6..108928f210 100644 --- a/docs/users_guide/using-warnings.rst +++ b/docs/users_guide/using-warnings.rst @@ -844,11 +844,11 @@ of ``-W(no-)*``. :since: 9.2 Template Haskell quotes referring to local variables bound outside - of the quote are implicitly converted to use ``lift`. For example, + of the quote are implicitly converted to use ``lift``. For example, ``f x = [| reverse x |]`` becomes ``f x = [| reverse $(lift x) |])``. This flag issues a warning for every such implicit addition of ``lift``. This can be useful when debugging more complex staged programs, - where an implicit `lift`` can accidentally conceal a variable + where an implicit ``lift`` can accidentally conceal a variable used at a wrong stage. .. ghc-flag:: -Wimplicit-prelude diff --git a/libraries/base/Data/Dynamic.hs b/libraries/base/Data/Dynamic.hs index 8345e16854..89aaaa33a6 100644 --- a/libraries/base/Data/Dynamic.hs +++ b/libraries/base/Data/Dynamic.hs @@ -84,14 +84,6 @@ instance Show Dynamic where -- | @since 4.0.0.0 instance Exception Dynamic - -- Use GHC's primitive 'Any' type to hold the dynamically typed value. - -- - -- In GHC's new eval/apply execution model this type must not look - -- like a data type. If it did, GHC would use the constructor convention - -- when evaluating it, and this will go wrong if the object is really a - -- function. Using Any forces GHC to use - -- a fallback convention for evaluating it that works for all types. - -- | Converts an arbitrary value into an object of type 'Dynamic'. -- -- The type of the object must be an instance of 'Typeable', which diff --git a/testsuite/tests/codeGen/should_compile/T13233.hs b/testsuite/tests/codeGen/should_compile/T13233.hs deleted file mode 100644 index bb79856d3b..0000000000 --- a/testsuite/tests/codeGen/should_compile/T13233.hs +++ /dev/null @@ -1,12 +0,0 @@ -{-# LANGUAGE ScopedTypeVariables #-} -{-# LANGUAGE TypeInType #-} -{-# LANGUAGE UnboxedTuples #-} -module Bug where - -import GHC.Exts (TYPE) - -class Foo (a :: TYPE rep) where - bar :: forall (b :: TYPE rep2). (a -> a -> b) -> a -> a -> b - -baz :: forall (a :: TYPE rep). Foo a => a -> a -> (# a, a #) -baz = bar (#,#) diff --git a/testsuite/tests/linear/should_fail/LinearPolyType.stderr b/testsuite/tests/linear/should_fail/LinearPolyType.stderr index 884b8991fb..c2d8b7d452 100644 --- a/testsuite/tests/linear/should_fail/LinearPolyType.stderr +++ b/testsuite/tests/linear/should_fail/LinearPolyType.stderr @@ -1,6 +1,6 @@ LinearPolyType.hs:15:1: error: - Multiplicity coercions are currently not supported + Multiplicity coercions are currently not supported (see GHC #19517) LinearPolyType.hs:15:1: error: - Multiplicity coercions are currently not supported + Multiplicity coercions are currently not supported (see GHC #19517) diff --git a/testsuite/tests/printer/RdrNames.hs b/testsuite/tests/printer/RdrNames.hs index 5124bcccde..1bdf4f2fb3 100644 --- a/testsuite/tests/printer/RdrNames.hs +++ b/testsuite/tests/printer/RdrNames.hs @@ -97,12 +97,6 @@ lt = undefined -- --------------------------------------------------------------------- --- | '[:' ':]' {% ams (sLL $1 $> $ parrTyCon_RDR) [mo $1,mc $2] } - --- GHC source indicates this constuctor is only available in PrelPArr --- ltp :: [::] a --- ltp = undefined - -- --------------------------------------------------------------------- -- | '(' '~#' ')' {% ams (sLL $1 $> $ getRdrName eqPrimTyCon) diff --git a/testsuite/tests/typecheck/should_compile/T12427a.hs b/testsuite/tests/typecheck/should_compile/T12427a.hs index 56c7513012..933939164c 100644 --- a/testsuite/tests/typecheck/should_compile/T12427a.hs +++ b/testsuite/tests/typecheck/should_compile/T12427a.hs @@ -36,6 +36,6 @@ h2 y = case y of T1 _ v -> v -- Fails in 7.10 (head exploded) -- Fails in 8.0.1 (ditto) -- Succeeds in 8.2 --- Fails in 8.12 (simple subsumption) +-- Fails in 9.0 (simple subsumption) x3 :: (forall a. a->a) -> Int T1 _ x3 = undefined diff --git a/testsuite/tests/typecheck/should_compile/holes.stderr b/testsuite/tests/typecheck/should_compile/holes.stderr index ddaae57d07..1e19fa85ba 100644 --- a/testsuite/tests/typecheck/should_compile/holes.stderr +++ b/testsuite/tests/typecheck/should_compile/holes.stderr @@ -166,13 +166,13 @@ holes.hs:11:15: warning: [-Wtyped-holes (in -Wdefault)] quotRem :: forall a. Integral a => a -> a -> (a, a) rem :: forall a. Integral a => a -> a -> a zip :: forall a b. [a] -> [b] -> [(a, b)] - fst :: forall a b. (a, b) -> a - snd :: forall a b. (a, b) -> b map :: forall a b. (a -> b) -> [a] -> [b] realToFrac :: forall a b. (Real a, Fractional b) => a -> b Left :: forall a b. a -> Either a b Right :: forall a b. b -> Either a b maybe :: forall b a. b -> (a -> b) -> Maybe a -> b + fst :: forall a b. (a, b) -> a + snd :: forall a b. (a, b) -> b const :: forall a b. a -> b -> a scanl :: forall b a. (b -> a -> b) -> b -> [a] -> [b] scanr :: forall a b. (a -> b -> b) -> b -> [a] -> [b] diff --git a/testsuite/tests/typecheck/should_compile/holes3.stderr b/testsuite/tests/typecheck/should_compile/holes3.stderr index 52cf8db18f..448f89009e 100644 --- a/testsuite/tests/typecheck/should_compile/holes3.stderr +++ b/testsuite/tests/typecheck/should_compile/holes3.stderr @@ -169,13 +169,13 @@ holes3.hs:11:15: error: quotRem :: forall a. Integral a => a -> a -> (a, a) rem :: forall a. Integral a => a -> a -> a zip :: forall a b. [a] -> [b] -> [(a, b)] - fst :: forall a b. (a, b) -> a - snd :: forall a b. (a, b) -> b map :: forall a b. (a -> b) -> [a] -> [b] realToFrac :: forall a b. (Real a, Fractional b) => a -> b Left :: forall a b. a -> Either a b Right :: forall a b. b -> Either a b maybe :: forall b a. b -> (a -> b) -> Maybe a -> b + fst :: forall a b. (a, b) -> a + snd :: forall a b. (a, b) -> b const :: forall a b. a -> b -> a scanl :: forall b a. (b -> a -> b) -> b -> [a] -> [b] scanr :: forall a b. (a -> b -> b) -> b -> [a] -> [b] |