Skip to content

Postpone associated tyfam default checks until after typechecking

Ryan Scott requested to merge wip/T18648 into master

Previously, associated type family defaults were validity-checked during typechecking. Unfortunately, the error messages that these checks produce run the risk of printing knot-tied type constructors, which will cause GHC to diverge. In order to preserve the current error message's descriptiveness, this patch postpones these validity checks until after typechecking, which are now located in the new function GHC.Tc.Validity.checkValidAssocTyFamDeflt.

Fixes #18648 (closed).

Merge request reports