diff options
Diffstat (limited to 'compiler/GHC/Tc')
-rw-r--r-- | compiler/GHC/Tc/Errors/Hole.hs | 6 | ||||
-rw-r--r-- | compiler/GHC/Tc/Gen/Head.hs | 8 | ||||
-rw-r--r-- | compiler/GHC/Tc/Module.hs | 2 | ||||
-rw-r--r-- | compiler/GHC/Tc/Validity.hs | 4 |
4 files changed, 9 insertions, 11 deletions
diff --git a/compiler/GHC/Tc/Errors/Hole.hs b/compiler/GHC/Tc/Errors/Hole.hs index 00e948bd10..d1c727da35 100644 --- a/compiler/GHC/Tc/Errors/Hole.hs +++ b/compiler/GHC/Tc/Errors/Hole.hs @@ -484,12 +484,10 @@ pprHoleFit (HFDC sWrp sWrpVars sTy sProv sMs) (HoleFit {..}) = hang display 2 provenance where tyApp = sep $ zipWithEqual "pprHoleFit" pprArg vars hfWrap where pprArg b arg = case binderArgFlag b of - -- See Note [Explicit Case Statement for Specificity] - (Invisible spec) -> case spec of - SpecifiedSpec -> text "@" <> pprParendType arg + Specified -> text "@" <> pprParendType arg -- Do not print type application for inferred -- variables (#16456) - InferredSpec -> empty + Inferred -> empty Required -> pprPanic "pprHoleFit: bad Required" (ppr b <+> ppr arg) tyAppVars = sep $ punctuate comma $ diff --git a/compiler/GHC/Tc/Gen/Head.hs b/compiler/GHC/Tc/Gen/Head.hs index 821b118ded..9fbd972f8a 100644 --- a/compiler/GHC/Tc/Gen/Head.hs +++ b/compiler/GHC/Tc/Gen/Head.hs @@ -483,7 +483,7 @@ tcInferRecSelId (FieldOcc sel_name lbl) = do { thing <- tcLookup sel_name ; case thing of ATcId { tct_id = id } - -> do { check_naughty occ id + -> do { check_naughty occ id -- See Note [Local record selectors] ; check_local_id id ; return id } @@ -1034,11 +1034,11 @@ errors in a polymorphic situation. If this check fails (which isn't impossible) we get another chance; see Note [Converting strings] in Convert.hs -Local record selectors -~~~~~~~~~~~~~~~~~~~~~~ +Note [Local record selectors] +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Record selectors for TyCons in this module are ordinary local bindings, which show up as ATcIds rather than AGlobals. So we need to check for -naughtiness in both branches. c.f. TcTyClsBindings.mkAuxBinds. +naughtiness in both branches. c.f. GHC.Tc.TyCl.Utils.mkRecSelBinds. -} diff --git a/compiler/GHC/Tc/Module.hs b/compiler/GHC/Tc/Module.hs index e2a53c4f39..dca730f6f0 100644 --- a/compiler/GHC/Tc/Module.hs +++ b/compiler/GHC/Tc/Module.hs @@ -2708,7 +2708,7 @@ https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0179-printi reverse :: forall a. [a] -> [a] -- foo :: forall a f b. (Show a, Num b, Foldable f) => a -> f b -> String - > :type +v foo @Int + > :type foo @Int forall f b. (Show Int, Num b, Foldable f) => Int -> f b -> String Note that Show Int is still reported, because the solver never got a chance diff --git a/compiler/GHC/Tc/Validity.hs b/compiler/GHC/Tc/Validity.hs index de007d0fac..c5dc68469f 100644 --- a/compiler/GHC/Tc/Validity.hs +++ b/compiler/GHC/Tc/Validity.hs @@ -433,7 +433,7 @@ checkTySynRhs ctxt ty ; expand <- initialExpandMode ; check_pred_ty emptyTidyEnv dflags ctxt expand ty }) else addErrTcM ( emptyTidyEnv - , TcRnIllegalConstraintSynonymOfKind (tidyKind emptyTidyEnv actual_kind) + , TcRnIllegalConstraintSynonymOfKind (tidyType emptyTidyEnv actual_kind) ) } | otherwise @@ -923,7 +923,7 @@ forAllEscapeErr env tvbs theta tau tau_kind -- NB: Don't tidy the sigma type since the tvbs were already tidied -- previously, and re-tidying them will make the names of type -- variables different from tau_kind. - = (env, TcRnForAllEscapeError (mkSigmaTy tvbs theta tau) (tidyKind env tau_kind)) + = (env, TcRnForAllEscapeError (mkSigmaTy tvbs theta tau) (tidyType env tau_kind)) {- Note [Type variables escaping through kinds] |