<div dir="ltr"><div>Hi all,</div><div><br></div><div>As you may recall, the API for type-checking plugins is changing (ever so slightly) in GHC 9.4. It was pointed out to me that this might be a good opportunity to make further changes to accommodate other needs of type-checking plugin authors.</div><div><br></div><div>For the moment, I have one concrete change in mind: changing the TcPluginSolveResult datatype to be a flat record, where one can separately return solved constraints, new constraints and insoluble constraints. This allows plugin authors to return contradictions at the same time as they return solved constraints, which (I have been told) can significantly improve the quality of the error messages.</div><div>Pattern synonyms can be provided for compatibility, so the impact to plugin authors should be very minimal.<br></div><div> <br></div><div>
I would love to hear other
suggestions for improvements. Note however that I believe it is best if
we keep the GHC API quite sparse, leaving more elaborate design choices
to libraries. <br></div><div><br></div><div>Thanks,</div><div><br></div><div>Sam</div><div><br></div></div>