To some extent I can agree with the view that certain small things
should possibly be folded in, but from another perspective, I actually
like the way that major language features are modular, and I can tell a
lot about what to expect by looking at the top of a file. There are also
things that most people agree are a decent part of the language, but
should also probably never stop being extensions, like FFI and Template
Haskell.
But while warning users about
certain things being controversial or unstable and certain things being
less so could be something that one could put in the Report, I wouldn't
want any change to the language to start there. If you try to make
changes to the language as it exists while also documenting it, you'll
end up in a season of bikeshedding that will never end, and at the same time end up
describing a creature that doesn't exist. See the ghc-proposals mailing
list for a more appropriate place to begin with changes to the language
at present. See also this proposal:
https://github.com/ghc-proposals/ghc-proposals/blob/master/proposals/0380-ghc2021.rst
which has been implemented in the latest GHC 9.2 for defining a particular "GHC2021"
agglomeration of some of the most commonly used extensions. There's also
a table there containing some nice usage statistics that were collected
from Hackage.
From the other side of
things, I think the Report, if revived, should not shy away from
trying to describe as many of the extensions as people have the energy
to describe, controversial/unstable or not. The most important purpose
for which I'd really like to have a Report at present would be to
properly clarify the interactions between extensions. For example, how
do you figure out what happens when you use functional dependencies and
type equality constraints together? Exactly how does GHC know when to
instantiate a quantified constraint, and how does that interact with
type family expansion? Even the technical papers written about these
features don't necessarily answer questions about these interactions, so
if you start using them together, cases can arise where it can be
difficult to determine what's going to happen. Often things will just
work as you might hope, even if you're not entirely certain why. Once in a blue
moon though, you might just get weird error messages that don't quite
make sense, but seem to indicate that the compiler is very confused.
Then perhaps you try a newer GHC, and find out that particular
combination of things is now simply forbidden outright. So it would be
nice to really get everything into a single framework of description,
and there have been some rather large efforts in the direction of
unifying large chunks of it, like the OutsideIn(X) paper (which is
already perhaps too technical compared with the Report), but it's by no
means easy.
Also, typical users of the
language eventually have to contend with most of the extensions, controversial or not, and it would be very nice to have a
reference for what things are supposed to mean regardless of whether
we'd rather they not be in the language at all. The Report would also be
a great place to have a little bit of guidance and statistics on how
stable/well-used these things are.
- Cale