On Tue, 5 Oct 2021, David Feuer wrote:
To be clear, the proposal to allow different constraints was accepted, but integrating it into the current, incredibly complex, code was well beyond the limited abilities of the one person who made an attempt. Totally severing pattern synonyms from constructor synonyms (giving them separate namespaces) would be a much simpler design.
The backend side of it shouldn't be too difficult -- after all, we are already storing a full `Id` (with type and all) for the builder in `PatSyn`, it might as well have a completely different type from the matcher `Id`. So in GHC/Tc/TyCl/PatSyn.hs, we can just fiddle with `mkPatSynBuilder`.
And so we get to the UX side of this, which is the hairy part and the reason I'm not too keen on working on this. As you can see in this very thread, pattern types are already quite complex for users.
_______________________________________________ Glasgow-haskell-users mailing list Glasgowemail@example.com http://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users