Sasha Bogicevic pushed to branch wip/21101 at Glasgow Haskell Compiler / GHC
Commits:
-
81ab5074
by Sasha Bogicevic at 2026-07-19T17:47:27+00:00
1 changed file:
Changes:
| ... | ... | @@ -424,9 +424,11 @@ lookupConstructorInfo qcon@(WithUserRdr _ con_name) |
| 424 | 424 | ; case info of
|
| 425 | 425 | IAmConLike con_info -> return con_info
|
| 426 | 426 | UnboundGRE -> return $ ConInfo (ConIsData []) (ConHasPositionalArgs 0)
|
| 427 | - -- The arity is a dummy: an unbound constructor never reaches the
|
|
| 428 | - -- code that consults it (see the isUnboundName guard in
|
|
| 429 | - -- GHC.Rename.Pat.rn_dotdot).
|
|
| 427 | + -- NB: it's OK to use the dummy value of '0' for the constructor arity:
|
|
| 428 | + -- we only use this information for 'TcRnIllegalWildcardsInConstructor',
|
|
| 429 | + -- which is an error we don't emit when the constructor is unbound.
|
|
| 430 | + -- See GHC.Rename.Pat.rnHsRecFields.rn_dotdot.
|
|
| 431 | + |
|
| 430 | 432 | IAmTyCon {} -> failIllegalTyCon WL_ConLike qcon
|
| 431 | 433 | _ -> pprPanic "lookupConstructorInfo: not a ConLike" $
|
| 432 | 434 | vcat [ text "name:" <+> ppr con_name ]
|