The GHC team asked me to help them gather input about their priorities for the next six months.
To ensure that the volume of feedback from this pilot process was manageable, we initially contacted 23 expert users with whom we have pre-existing relationships. In a future iteration we will look into how to expand the set, while keeping the process informative, deliberative, and manageable. The responses were analysed by separating the requests by topic, and we followed up as necessary for clarification. Then, we prioritised the tasks based on a mix of how often they were requested, how severe the issues were for the requesters, and our own judgement about resource availability and value.
1. Things we plan to do in the next six months
This section documents the user priorities that we plan to achieve in the next six months. We believe that they are all achievable, given available resources, and that they will lead to real improvements to GHC for many users. This consists of two large projects and a number of important smaller tasks.
1.1 Larger Project: GHC management
A number of respondents asked for more clarity and transparency in the management of the GHC open-source project. In the next six months, we plan to more clearly define and document the GHC open-source project’s technical leadership, membership criteria, and decision-making practices. (#22747)
1.2 Larger Project: GHC API
Today, the GHC API is not particularly well-defined. There is a GHC API module, but it does not include sufficient tools to enable clients of GHC to do what they need to do. As a result, in practical terms, GHC’s API is essentially its entire implementation. This poses a dilemma: clients need some form of API stability, but stability of implementation internals means an end to progress.
The Haskell Foundation and the GHC team will create a working group of GHC API clients, such as the HLS team and compiler plugin authors, to define the needs for a more stable API, along with a stability policy that’s satisfactory to both clients and the GHC implementers. We may also explore whether some facilities from certain API clients, particularly HLS, should in fact be part of the GHC source tree.
1.3 Smaller Tasks
-
File layouts for releases. Packagers and redistributors of GHC have requested release file manifests and changelogs that describe changes in file layouts. We plan to add this to the changelog, and prevent omissions using CI going forward. (#22748)
-
We received feedback that some users don’t feel that they can report bugs when they are incapable of producing a minimal failing example. This is a mis-comunication:
- While small reproductions certainly make it much easier for us to diagnose a problem, we are able to work with larger open-source examples when it’s necessary.
- As a matter of policy, we also accept larger reproductions, with the caveat that we may not have the resources to fix the bug, although we will try. (#22749)
-
Advertising GHC releases. Some people who need to know about GHC releases for packaging and other reasons are not well-served by subscribing to the ghc-devs mailing list. There seem to be two issues
-
Medium: some people would like to be emailed explicitly, not just monitor ghc-devs. We would be happy to hear from people who would like an explicit email.
-
Timing: it would help to have a clear notification timetable; e.g. we will tell you our release timetable, rather than simply announce releases.
-
Currently GHC has bugs on Apple’s latest M2 hardware with macOS Ventura, although macOS is a Tier 1 platform. We now have access to a suitable machine, and (with support from the HF) will invest in making sure that GHC works on it (#22750). More generally, we will refine the Tier 1 platform descriptions to be more precise about operating system version ranges. (#22751)
-
With help from the HF, we will expand the Tier 1 platform table to specifically indicate which Linux distributions and versions are Tier 1; and we’ll enhance our CI to unpack an appropriate bindist on each of these distributions and check that it works. (#22751)
-
We were asked to be less Unix-centric in our documentation, as GHC supports other platforms as well. We will do our best to view documentation updates through the perspective of a variety of platforms, but GHC development will primarily occur on Unix-like machines for the next six months, so specific feedback on the documentation is also welcome.
-
Contributors to GHC are rightfully interested in a more reliable CI setup. The Haskell Foundation now employs a full-time DevOps engineer to work on this, and progress is being made. Please try again, and report CI failures to Bryan Richter (@chreekat) for follow-up.
-
Tools such as HLS rely on
ghc-exactprint
, but time can pass between the release of a GHC version and release of the correspondingghc-exactprint
version. Due to its dependencies,ghc-exactprint
cannot be made part of the GHC source repository, but we plan to include it and its transitive dependencies in head.hackage, which allows CI to detect the emergence of incompatibilities and anyone (not just its maintainers) to contribute patches to make it work with GHC HEAD. (#22752) -
One respondent mentioned desired improvements to HPC, including general polish, improved control over what gets annotated, and how to combine reports. A new group of contributors has resumed work on HPC, after a period of dormancy. We will attempt to support them in making their improvements, and we’re happy to connect users who are asking for improvements to HPC with this group.
-
Linux distributions that have local patches to GHC have asked that we actively integrate them. However, the patches as submitted are not always suitable for inclusion and so are sometimes turned down. We are open to mentoring the submitters, or to helping them document the issues fixed by the distribution patches so that we can solve them in a way that works for our long-term maintenance responsibilities.
-
The new diagnostics infrastructure, with datatypes whose constructors represent the various errors and warnings that GHC can emit, will be completed. As of now, there are 172 instances of TcRnUnknown, the constructor of not-yet-structured type checker and renamer errors. We see this as an easy (if somewhat tedious) way to bring immediate value to at least HLS and to errors.haskell.org, which relies on the numeric identifiers assigned to each constructor, and we hope that it will also benefit other clients of GHC-the-library. (#22753)
-
It was requested that we run tests and benchmarks for all the boot libraries in CI, to better detect regressions. We don’t think that we can do this in GHC’s CI, because the test and benchmark suites for various boot libraries depend on broader parts of the ecosystem, and keeping all of the testing frameworks updated with GHC would be too much. Instead, we plan to use head.hackage for this, and extend it to also run its tests on aarch64. The migration of many boot libraries to
tasty
andtasty-bench
, both of which have small dependency footprints, makes this easier and more reliable. (#22754) -
Finally, we were asked to ensure that recent improvements made to cross-compilation do not degrade. We assure you that cross-compilation is a priority for us, and we have no plans to down-prioritize it.
2. Proposals Needed
Language feature requests need to go through the GHC Steering Committee’s proposal process before being implemented in GHC. We’re happy to contribute insights regarding the ease or difficulty of implementing a proposal, but we are not in a position to drive the process forward for the following requests:
-
We were asked to extend GHC to support multiple simultaneous default implementations of type class methods (e.g. in terms of other methods, and using default signatures). We are happy to comment on a proposal to the GHC Steering Committee and help develop the idea, but the corner cases of the design need to be worked out with the committee before we can just implement it.
-
Sandboxing Template Haskell to control its ability to run arbitrary IO actions is an interesting and useful goal. As sandboxes are notoriously difficult to use appropriately, and any meaningful sandbox will also need to account for
unsafePerformIO
, we believe that a sandbox design should go through the GHC proposals process. -
It was requested that we find a way to support circular modular dependencies that’s easier to use than .hs-boot files and that has good support for incremental compilation. We don’t have a design for this sitting on the shelf, and we are happy to participate in keeping a GHC proposal grounded in the realities of the implementation, but we are not in a position to drive such a proposal forward ourselves.
3. Insufficient Resources
Here are some larger tasks that we would like to do, but we do not believe that we have sufficient development resources to achieve them in the next six months together with the other priorities here. They will remain in the queue for future iterations.
-
We’d like to make it easier to test development versions of GHC in order to enable feedback prior to releases and help the package ecosystem be ready for new releases. While we regularly test changes to GHC against Hackage, many significant Haskell code bases are either internal applications or are not part of Hackage. One way that we could make it easier to get feedback from users would be to more conveniently provide nightly releases of GHC, e.g. by placing all nightlies for all platforms from the last month on a well-known server. Making it easy to install and test these nightly releases would enable others to give timely feedback about compatibility concerns.
-
A longer term goal would be to assemble nightly releases of the Haskell toolchain, including Cabal, Stack, Haddock, and HLS, such that they all work together, with CI to catch any ongoing incompatibilities and warn users. We don’t expect to be able to do this in the next 3-6 months, and this effort would require coordination with other projects that we don’t presently have the capacity to lead, but we are interested in participating in such an effort.
-
We were asked to produce a whole-program analysis to guide specialisation, rather than relying on manually inserted SPECIALISE pragmas or on flags like specialise-aggressively and expose-all-unfoldings that result in an explosion in compilation time and executable size.
We believe that there have been recent significant improvements to specialisation that may address the needs of the requester, and we hope to bridge the gap by improving the documentation and potentially adding flags to make it easier to diagnose situations where specialisation is desired but has not yet occurred. We will initiate a dialog with the requester.
4. Requests that will Remain Unfulfilled for now
Making GHC a lot faster. We don’t believe that we have the possibility to make GHC significantly faster in the next three to six months. All of the low-hanging fruit has been harvested, and what remains require significant investments in R&D that we don’t believe are immediately feasible. We watch compile times obsessively through CI, and that ensures that there are no major regressions, at least.
Making it easier to use the GHCi debugger, especially on executable projects, would be very useful. Unfortunately, that code presently has no owner, and the team does not understand it well enough to iterate quickly on it. We really need a volunteer to take it over.
One respondent requested that GHC produce diffs in cases where a fix for a problem is readily apparent. The GHC developers would rather focus on enabling other tools (such as HLS) to do this. We endeavor to include enough information in the structured error representations to make this possible, and we invite requests for more data as needed to achieve this goal.
It was requested that GHC development use git-subtree instead of Git submodules. We do not plan to adopt this recommendation, because we think that it would trade one set of problems for another, and that it would not yield a net improvement. Relevant discussion can be found in #16642.
We would very much like to improve the ABI compatibility situation. However, we don’t see a technical way forward that would preserve cross-module optimization while still enabling Template Haskell to use compiled code. It seems that the biggest issues with ABI incompatibility are related to HLS and GHC bindists - perhaps we can ameliorate these issues some other way.
We received feedback that our release cadence is too fast, and other feedback that it is too slow. There seems to be no consensus as to how often major releases are desired by users. However, we don’t think we can release any faster than we do today, as a release is a lot of work, so that places a natural upper bound on the frequency of releases.
5. Breaking Changes
We were asked to reduce the number of breaking changes. We hear you. There are several distinct strands:
-
The Haskell Language, as implemented by GHC, is the responsibility of the GHC Steering Committee. There is not much that the GHC team can do here, other than working to ensure that our own proposals are as backwards-compatible as possible.
-
The base library is the responsibility of the Core Libraries Committee. When changes are initiated by the GHC team, we’ll make proposals to the CLC that include mitigations (e.g. deprecation warnings, pattern synonyms, whatever) whenever we can.
-
The GHC API, which has in practice been the GHC implementation, remains a sore point. To begin with, it will be the responsibility of the new HF working group (see above). The GHC team cannot reasonably promise to keep every internal function stable. But when the working group does establish the API, we will work hard to keep it stable and to have as pleasant a migration path as possible when breaking changes are necessary.