[Git][ghc/ghc][wip/soulomoon/suggest-UnliftedNewtypes-unlifted-data-family-25593] format
Patrick (@soulomoon)
gitlab at gitlab.haskell.org
Wed Jan 8 10:44:04 UTC 2025
Patrick pushed to branch wip/soulomoon/suggest-UnliftedNewtypes-unlifted-data-family-25593 at Glasgow Haskell Compiler / GHC
Commits:
09a5916c by Patrick at 2025-01-08T18:43:53+08:00
format
- - - - -
1 changed file:
- compiler/GHC/Tc/TyCl/Instance.hs
Changes:
=====================================
compiler/GHC/Tc/TyCl/Instance.hs
=====================================
@@ -941,11 +941,10 @@ tcDataFamInstHeader mb_clsinfo skol_info fam_tc hs_outer_bndrs fixity
-- with its parent class
; addConsistencyConstraints mb_clsinfo lhs_ty
-
-- Add constraints from the data constructors
-- Fix #25611
-- See Note [Kind inference for data family instances]
- ; when isH98orNewType $ kcConDecls lhs_applied_kind hs_cons
+ ; when is_H98_or_newtype $ kcConDecls lhs_applied_kind hs_cons
-- Check that the result kind of the TyCon applied to its args
-- is compatible with the explicit signature (or Type, if there
@@ -1005,13 +1004,12 @@ tcDataFamInstHeader mb_clsinfo skol_info fam_tc hs_outer_bndrs fixity
fam_name = tyConName fam_tc
data_ctxt = DataKindCtxt fam_name
new_or_data = dataDefnConsNewOrData hs_cons
- isH98orNewType = case hs_cons of
+ is_H98_or_newtype = case hs_cons of
NewTypeCon{} -> True
DataTypeCons _ cons -> all isH98 cons
isH98 (L _ (ConDeclH98 {})) = True
isH98 _ = False
-
-- See Note [Implementation of UnliftedNewtypes] in GHC.Tc.TyCl, families (2),
-- and Note [Implementation of UnliftedDatatypes].
tc_kind_sig Nothing
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/09a5916cbaff500fd60b392519e6990645b3858e
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/09a5916cbaff500fd60b392519e6990645b3858e
You're receiving this email because of your account on gitlab.haskell.org.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20250108/6bcf4582/attachment-0001.html>
More information about the ghc-commits
mailing list