Simon Peyton Jones pushed to branch wip/T24464 at Glasgow Haskell Compiler / GHC
Commits:
-
7cf2b4e3
by Simon Peyton Jones at 2026-01-18T18:15:37+00:00
2 changed files:
Changes:
| ... | ... | @@ -163,6 +163,9 @@ errors were dealt with by the renamer. |
| 163 | 163 | ********************************************************************* -}
|
| 164 | 164 | |
| 165 | 165 | tcTySigs :: [LSig GhcRn] -> TcM ([TcId], TcSigFun)
|
| 166 | +-- The returned [TcId] are the ones for which we have
|
|
| 167 | +-- a /complete/ type signature.
|
|
| 168 | +-- See Note [Complete and partial type signatures]
|
|
| 166 | 169 | tcTySigs hs_sigs
|
| 167 | 170 | = checkNoErrs $
|
| 168 | 171 | do { -- Fail if any of the signatures is duff
|
| ... | ... | @@ -172,9 +175,6 @@ tcTySigs hs_sigs |
| 172 | 175 | |
| 173 | 176 | ; let ty_sigs = concat ty_sigs_s
|
| 174 | 177 | poly_ids = mapMaybe completeSigPolyId_maybe ty_sigs
|
| 175 | - -- The returned [TcId] are the ones for which we have
|
|
| 176 | - -- a complete type signature.
|
|
| 177 | - -- See Note [Complete and partial type signatures]
|
|
| 178 | 178 | env = mkNameEnv [(tcSigInfoName sig, sig) | sig <- ty_sigs]
|
| 179 | 179 | |
| 180 | 180 | ; return (poly_ids, lookupNameEnv env) }
|
| ... | ... | @@ -723,7 +723,7 @@ tcExtendLetEnv top_lvl sig_fn closed ids thing_inside |
| 723 | 723 | [ (id_nm, ATcId { tct_id = id, tct_info = LetBound closed })
|
| 724 | 724 | | Scaled _ id <- ids
|
| 725 | 725 | , let id_nm = idName id
|
| 726 | - , isNothing (sig_fn id_nm) -- See (ELE) above
|
|
| 726 | + , not (hasCompleteSig sig_fn id_nm) -- See (ELE) above
|
|
| 727 | 727 | ] $
|
| 728 | 728 | foldr check_one_usg thing_inside ids
|
| 729 | 729 | where
|