[Git][ghc/ghc][wip/21101] Apply 1 suggestion(s) to 1 file(s)
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 Apply 1 suggestion(s) to 1 file(s) Co-authored-by: sheaf <sam.derbyshire@gmail.com> - - - - - 1 changed file: - compiler/GHC/Rename/Env.hs Changes: ===================================== compiler/GHC/Rename/Env.hs ===================================== @@ -424,9 +424,11 @@ lookupConstructorInfo qcon@(WithUserRdr _ con_name) ; case info of IAmConLike con_info -> return con_info UnboundGRE -> return $ ConInfo (ConIsData []) (ConHasPositionalArgs 0) - -- The arity is a dummy: an unbound constructor never reaches the - -- code that consults it (see the isUnboundName guard in - -- GHC.Rename.Pat.rn_dotdot). + -- NB: it's OK to use the dummy value of '0' for the constructor arity: + -- we only use this information for 'TcRnIllegalWildcardsInConstructor', + -- which is an error we don't emit when the constructor is unbound. + -- See GHC.Rename.Pat.rnHsRecFields.rn_dotdot. + IAmTyCon {} -> failIllegalTyCon WL_ConLike qcon _ -> pprPanic "lookupConstructorInfo: not a ConLike" $ vcat [ text "name:" <+> ppr con_name ] View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/81ab5074ed147ba491b12b8873b5bc6e... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/81ab5074ed147ba491b12b8873b5bc6e... You're receiving this email because of your account on gitlab.haskell.org. Manage all notifications: https://gitlab.haskell.org/-/profile/notifications | Help: https://gitlab.haskell.org/help
participants (1)
-
Sasha Bogicevic (@Bogicevic)