Treatment of unknown pragmas
ndmitchell at gmail.com
Mon Oct 22 10:32:25 UTC 2018
> I'm trying to view the pragma question from the perspective of setting a
> precedent for other tools. If a dozen Haskell tools were to approach us
> tomorrow and ask for similar treatment to HLint it's clear that
> hardcoding pragma lists in the lexer would be unsustainable.
Why? Making the list 12 elements longer doesn't seem fatal or add any
real complexity. And do we have any idea of 12 additional programs
that might want settings adding? Maybe we just demand that the program
be continuously maintained for over a decade :).
> Is this likely to happen? Of course not. However, it is an indication to
> me that the root cause of this current debate is our lack of a good
> extensible pragmas. It seems to me that introducing a tool pragma
> convention, from which tool users can claim namespaces at will, is the
> right way to fix this.
I'd suggest just adding HLINT as a known pragma. But given there isn't
any consensus on that, why not add TOOL as a known pragma, and then
we've got an extension point which requires only one single entry to
More information about the ghc-devs