Draft: Disallow (->) as a data constructor in "data" declaration (fixes #16999)
Add a specific check in tyConToDataCon
to disallow (->)
as a data constructor. I don't think anything more general is warranted -- it's only because of this special parsing of data constructors in data
/newtype
declarations that (->)
can "sneak in" as a potential data constructor. Otherwise, parsing rules keep them separate. So, tyConToDataCon
should be the only place where we need to deal with this issue.