
Hi, I have a similar notions. Either would work, both have downsides. Re positionally, I notice that the way GHC expects them to be placed is pretty rigid, and may make the code less nice to read, with a possibly large pragma between the constructor and the arguments. I find this to not fit well with the rest of the language, where we can even move type signatures away from the code if that improves readability. But the ability to deprecate instances is a strong argument in favor of a positional variant. TBH, all these problems (how to nicely place annotations of sorts next to many kinds of declarations) had to be answered for haddock already, so piggy-backing on that might be the best coarse of action, e.g. something along the lines of where DEPRECATED is followed by either | or ^, with the same meaning as for haddocks. This easily extends to allowing either positional or named pragmas, and leave it up to the user what they prefer: {-# DEPRECATED pattern Baz "Baz is deprecated too" #-} This is maybe a somewhat elaborate for “just” the DEPRECATED pragma, but we are solving a problem here will come up with other existing or future pragmas as well, so a generic solution that we are happy with and that can be applied uniformly would be nice. With this in mind, maybe we should accept the proposal with the named variant for now, and make “refined positional pragmas” a separate proposal that deals with a positional way of writing of all annotation- like pragmas. It is a pitty that ANN and DEPRECATED, although very similar in their needs of addressing modules, terms and types, have already diverged in how they do it (ANN module vs. positional DEPRECATED; a type qualifier for ANN, but no qualifiers for DEPRECATED, and more than one qualifier after this proposal). Cheers, Joachim Am Freitag, den 01.02.2019, 10:04 -0800 schrieb Iavor Diatchki:
Hello,
this seems quite reasonable and I think we should accept it. I don't have a strong preference on if this is positional or not. If it is positional, it may be nice to associate it with a specific delcaration, so that you don't have to write the name twice. OTOH, I also see values in the ability to put all deprecation pragmas in one place, rather than sprinkling them throughout a declaration.
-Iavor
On Fri, Feb 1, 2019 at 6:58 AM Vitaly Bragilevsky
wrote: Dear Committee,
I was asked to shepherd the proposal #167 (Deprecated Entities, https://github.com/nineonine/ghc-proposals/blob/depr-entities/proposals/0000...). It is proposed to extend DEPRECATED pragma with the two specifiers to disambiguate deprecating named type-level and value-level things. Simon suggested another alternative to make DEPRECATED pragmas positional (in consistency with the deprecating modules). I like the positional alternative more, as it enables more fine-grained control over deprecated entities and can be extended to deprecating unnamed entities (like type class instances). It seems the author is okay with rewriting the proposal, but the current proposal is already implemented. So, the question is: do we want it quick or good? I am not ready to answer this question and come up with the recommendation on the proposal yet.
Please, comment on the following issues: a) which form of the DEPRECATED pragma you prefer, b) do you see any potential drawbacks of the positional form, c) are there any caveats with deprecating instances. Your comments are very welcome either here or on GitHub (https://github.com/ghc-proposals/ghc-proposals/pull/167).
Thanks, Vitaly _______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee
_______________________________________________ ghc-steering-committee mailing list ghc-steering-committee@haskell.org https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-steering-committee -- Joachim Breitner mail@joachim-breitner.de http://www.joachim-breitner.de/