|
|
# GHC Status Report, October 2014
|
|
|
# GHC Status Report, May 2015
|
|
|
|
|
|
|
|
|
GHC development is as busy as ever, and 7.10 is going to be no different. Our current release schedule looks like **we'd like an RC by Christmas**, and a **release close to Feburary 2015**, which is something of an adjustment based on the 7.8 release. But we've still got plenty planed for all our users, as usual.
|
|
|
GHC 7.10.1 was released in March this year, shipping several major improvements, and development continues to steam forward as it always does. However, things have been relatively quiet for most of 2015 so far, as people have simply been working away. Currently our `master` branch does not heavily diverge much from GHC 7.10, but that could change soon!
|
|
|
|
|
|
## Major changes in GHC 7.10.1
|
|
|
|
|
|
However, we still need help with it all. GHC is a community project, and as you may be aware, most of this is done by our wonderful contributors. If you want something done, you should certainly try to get in touch and help make it a reality!
|
|
|
|
|
|
## Upcoming plans for the next year
|
|
|
When we shipped GHC 7.10, we incorporated some major new features - but not without some major decision making, it turns out. These included:
|
|
|
|
|
|
## Libraries, source language, type system
|
|
|
- **Making Applicative a superclass of Monad** - Yes, finally!
|
|
|
|
|
|
- **Generalizing Prelude operators** - Known in various circles as 'The Burning-Bridges Proposal' (BBP), 'The Foldable Traversable Proposal' (FTP), this proposal offered to generalize many `Prelude` operations to functions in `Data.Traversable` and `Data.Foldable`. However, this plan stirred up a relatively large amount of debate regarding deviations from the standard, communicative plans, and the implications will be. In the end, Simon Peyton Jones and Simon Marlow ended up making a final decision in February, after hundreds of input votes from the community, and decided to move forward with the plan.
|
|
|
|
|
|
- **`static` values** - Mathieu Boespflug and Facundo Domínguez at TweagIO completely reimplemented their old proposal for `static` values, primarily intended to support Cloud Haskell, and it was merged into GHC 7.10. The support as it stands should be experimental, but the new implementation is much simpler and easier to understand.
|
|
|
|
|
|
- **Applicative is now a superclass of Monad**. After much debate, in GHC 7.10, Applicative is finally a superclass of `Monad`, hence completing the Applicative Monad Proposal.
|
|
|
- **Binary literals** ([\#9224](https://gitlab.haskell.org//ghc/ghc/issues/9224)) - Herbert Valerio Riedel implemented the `-XBinaryLiterals` language extension which finally closes the syntax gap relative to other languages which allow to write base-2 literals such as `0b11001001`.
|
|
|
|
|
|
- **BBP: Foldable/Traversable**. As part of the so-called "Burning-Bridges Proposal", the monomorphic definitions in `Prelude`/`Data.List`/`Control.Monad` that conflict with those from `Data.Foldable` and `Data.Traversable` have been replaced by their respective ones from `Data.Foldable`/`Data.Traversable`. This will be in 7.10
|
|
|
- **Partial type signatures** - Thomas Winant and Dominique Devriese implemented partial type signatures for GHC. A partial type signature is a type signature that can contain *wildcards*, written as underscores. These wildcards can be types unknown to the programmer or types he doesn't care to annotate. The type checker will use the annotated parts of the partial type signature to type check the program, and infer the types for the wildcards. A wildcard can also occur at the end of the constraints part of a type signature, which indicates that an arbitrary number of extra constraints may be inferred. Whereas `-XTypedHoles` allow holes in your terms, `-XPartialTypeSignatures` allow holes in your types!
|
|
|
|
|
|
- **Signature sections**. Lennart Augustsson is implementing `(:: ty)` to work the same as `(\x -> x :: ty)`.
|
|
|
- **Preliminary backpack support** - Edward Yang has been working tirelessly on support for Backpack features in GHC, and GHC 7.10 ships with some preliminary code to support it, including signature file support and some Cabal support. TODO Have Ed clarify?
|
|
|
|
|
|
- **[ApplicativeDo](applicative-do)** - Now that `Applicative` is a superclass of `Monad`, Simon Marlow has plans to implement a new extension for GHC, which will allow `do` notation to be used in the context of `Applicative`, not just `Monad`.
|
|
|
- **Reimplemented GMP-based `Integer` backend ([\#9281](https://gitlab.haskell.org//ghc/ghc/issues/9281))** - Herbert Valerio Riedel completely reimplemented the `integer-gmp` backend, and is now shipping it on all Tier 1 platforms. This should make interoperation with GMP (and C libraries that depend on GMP) radically simpler, while being easier to maintain.
|
|
|
|
|
|
- **Strict language extension**. Johan Tibell is working on a `-XStrict` language extension that will make GHC compile programs in a by-default strict way. [Details here](language-strict).
|
|
|
- **DWARF support for debugging symbols**. Peter Wortmann has gotten the first piece of his long-term work in place: support for GHC to emit DWARF symbols to object files, so debuggers can utilize it. The preliminary support works for simple cases, but is very experimental! (Case in point: it was broken in 7.10.1 due to [\#10236](https://gitlab.haskell.org//ghc/ghc/issues/10236).)
|
|
|
|
|
|
- **Cloud Haskell statics**. Mathieu Boespflug and Facundo Domínguez at TweagIO are working on support for Cloud Haskell's `static` feature. [Details here](static-pointers). The current in-progress code review is available at [ https://phabricator.haskell.org/D119](https://phabricator.haskell.org/D119)
|
|
|
## Upcoming plans for the next release
|
|
|
|
|
|
- **Overloaded record fields** - In 2013, Adam Gundry implemented the new `-XOverloadedRecordFields` extension for GHC, described on the wiki [OverloadedRecordFields](overloaded-record-fields). We're still aiming to make this part of 7.10, but there's still work to be done!
|
|
|
|
|
|
- **Using an SMT Solver in the type-checker** - Iavor Diatchki is working on utilizing an off-the-shelf SMT solver in GHC's constraint solver. Currently, the main focus for this is improved support for reasoning with type-level natural numbers, but it opens the doors to other interesting functionality, such as supported for lifted (i.e., type-level) `(&&)`, and `(||)`, type-level bit-vectors (perhaps this could be used to implement type-level sets of fixed size), and others. This work is happening on branch `wip/ext-solver`.
|
|
|
The current plan is to steam forward to the end of the year, and begin to get ready for a new release, probably in February of 2016. We have some tentative plans marked below - and some of them are huge! In particular - we may ship GHC 8.0 next year, if we're going to change the entire Core language!
|
|
|
|
|
|
- **Kind equality and kind coercions** - Richard Eisenberg (with support from Simon PJ and Stephanie Weirich, among others) is implementing a change to the Core language, as described in a recent paper [ FC](http://www.seas.upenn.edu/~eir/papers/2013/fckinds/fckinds-extended.pdf). When this work is complete, *all* types will be promotable to kinds, and *all* data constructors will be promotable to types. This will include promoting type synonyms and type families. As the details come together, there may be other source language effects, such as the ability to make kind variables explicit. It is not expected for this to be a breaking change -- the change should allow strictly more programs to be accepted.
|
|
|
## Libraries, source language, type system
|
|
|
|
|
|
- **Partial type signatures** - Thomas Winant and Dominique Devriese are working on partial type signatures for GHC. A partial type signature is a type signature that can contain *wildcards*, written as underscores. These wildcards can be types unknown to the programmer or types he doesn't care to annotate. The type checker will use the annotated parts of the partial type signature to type check the program, and infer the types for the wildcards. A wildcard can also occur at the end of the constraints part of a type signature, which indicates that an arbitrary number of extra constraints may be inferred. Whereas `-XTypedHoles` allow holes in your terms, `-XPartialTypeSignatures` allow holes in your types. The design as well as a working implementation are currently being simplified [PartialTypeSignatures](partial-type-signatures). This will
|
|
|
- **Signature sections**. Lennart Augustsson is implementing `(:: ty)` to work the same as `(\x -> x :: ty)`. FIXME is there a ticket for this?
|
|
|
|
|
|
- **Binary literals** ([\#9224](https://gitlab.haskell.org//ghc/ghc/issues/9224)) - Herbert Valerio Riedel implemented the `-XBinaryLiterals` language extension which finally closes the syntax gap relative to other languages which allow to write base-2 literals such as `0b11001001`. This is in GHC 7.10.
|
|
|
- **[ApplicativeDo](applicative-do)** - Now that `Applicative` is a superclass of `Monad`, Simon Marlow has implemented a new extension for GHC, which will allow `do` notation to be used in the context of `Applicative`, not just `Monad`. The patch for review is available at [ https://phabricator.haskell.org/D729](https://phabricator.haskell.org/D729), and Simon Marlow believes it's ready for review and merge.
|
|
|
|
|
|
- **Propositional equality for `GHC.Generics` metadata** - Gabor Greif is working on a conservative approach to retrofit the metadata types generated by `-XDeriveGeneric` with a runtime-observable type equality. The feature is discussed under [GenericsPropositionalEquality](generics-propositional-equality).
|
|
|
- **Overloaded record fields** - After countless more discussions and several revisions, Adam Gundry implemented the new `-XOverloadedRecordFields` extension for GHC - again! - but this time with a new design, described in [ http://www.well-typed.com/blog/2015/03/overloadedrecordfields-revived/](http://www.well-typed.com/blog/2015/03/overloadedrecordfields-revived/) - the first piece of the implementation is up for review at [ https://phabricator.haskell.org/D761](https://phabricator.haskell.org/D761), and we're hoping to review it soon.
|
|
|
|
|
|
- **Backpack module system** - Edward Yang is working on extensions to GHC and Cabal to support Backpack. Details in the [Backpack wiki page](backpack). At the moment, module reexports, the package key infrastructure change, and module thinning and renaming are in GHC HEAD and definitely shipping with 7.10; signatures and Cabal support are coming down the pike. This is in GHC 7.10.
|
|
|
- **Using an SMT Solver as a type-checker plugin** - For GHC 7.10, Iavor Diatchki implemented support for compiler-plugins augmenting the type-checker - and not for no reason. He's also working on implementing support for using SMT solvers in the typechecker with this. Currently, the main focus for this is improved support for reasoning with type-level natural numbers, but it opens the doors to other interesting functionality, such as supported for lifted (i.e., type-level) `(&&)`, and `(||)`, type-level bit-vectors (perhaps this could be used to implement type-level sets of fixed size), and others. This work is happening on branch `wip/ext-solver` (FIXME is that accurate?)
|
|
|
|
|
|
- **More list fusion** - Based on a new compiler transformation by Joachim Breitner, [CallArity](call-arity), `foldl` and related functions now can take part in list fusion. David Feuer then came up with fusion rules for many more functions. This change may not be a unambiguous improvement in all cases, so if you find regressions, we’d like to hear about them. These changes are all in 7.10.
|
|
|
- **Kind equality, kind coercions, and dependently typed Core** - Richard Eisenberg (with support from Simon PJ and Stephanie Weirich, among others) is implementing a change to the Core language, as described in a recent paper [ FC](http://www.seas.upenn.edu/~eir/papers/2013/fckinds/fckinds-extended.pdf). When this work is complete, *all* types will be promotable to kinds, and *all* data constructors will be promotable to types. This will include promoting type synonyms and type families. As the details come together, there may be other source language effects, such as the ability to make kind variables explicit. It is not expected for this to be a breaking change -- the change should allow strictly more programs to be accepted.
|
|
|
This can also go down as one of the **larger** changes in recent memory - [ https://phabricator.haskell.org/D808](https://phabricator.haskell.org/D808) is the biggest Phabricator review we've done to date!
|
|
|
|
|
|
## Back-end and runtime system
|
|
|
|
... | ... | @@ -44,31 +48,14 @@ However, we still need help with it all. GHC is a community project, and as you |
|
|
|
|
|
- **Changes to static closures for faster garbage collection** - Edward Yang is working on an overhaul of how static closures represented at runtime to eliminate some expensive memory dereferences in the GC hotpath. The initial results are encouraging: these changes can result in an up to 8% in the runtime of some GC heavy benchmarks, see [\#8199](https://gitlab.haskell.org//ghc/ghc/issues/8199).
|
|
|
|
|
|
- **New, smaller array type** - Johan Tibell has added a new array type, `SmallArray#`, which uses less memory (2 words) than the `Array#` type, at the cost of being more expensive to garbage collect for array sizes larger than 128 elements. This is in GHC 7.10.
|
|
|
|
|
|
- **Faster small array allocation** - Johan Tibell has made array allocation of arrays of small, statically know size faster by making it inline with the normal heap check, instead of out-of-line in a separate nursery block. This is in GHC 7.10
|
|
|
|
|
|
- **DWARF-based stack tracing** - Peter Wortmann and Arash Rouhani (with support from the Simons) are working on enabling GHC to generate and use DWARF debugging information. This should allow us to obtain stack traces and do profiling without the need for instrumentation. The first stages of this work should land in 7.10, but it's not clear if the full feature set will.
|
|
|
|
|
|
- **Reimplemented GMP-based `Integer` backend ([\#9281](https://gitlab.haskell.org//ghc/ghc/issues/9281))** - Herbert Valerio Riedel is working on this to provide a GMP-based `Integer` backend not relying on registering GHC-specific [ custom GMP memory allocators](https://gmplib.org/manual/Custom-Allocation.html) which cause problems when linking to other C-code also using GMP unaware of GHC's memory management.
|
|
|
- **DWARF-based stack tracing** - Peter Wortmann and Arash Rouhani (with support from the Simons) are working on enabling GHC to now use the DWARF debugging information it generates. This should allow us to obtain stack traces and do profiling without the need for instrumentation, directly from Haskell executables.
|
|
|
|
|
|
## Frontend, build-system, and miscellaneous changes
|
|
|
|
|
|
- **GHC is now using Submodules for all repositories**. For a very long time, GHC has used a mixed method of containing some dependencies as submodules, while others were maintained as floating repositories. Unfortunately, this was a constant source of errors, and made certain things like using `git bisect` in a robust way impossible. As of GHC now and for the future, all dependent repositories are tracked through `git submodule`, making them much more robust and reproducible.
|
|
|
- TODO about Docbook.
|
|
|
|
|
|
- **Phabricator for code review**. For the past few months, many GHC developers have been doing something new - public code review! To facilitate that, Haskell.org now runs a copy of Phabricator \[PHAB\], available at [ https://phabricator.haskell.org](https://phabricator.haskell.org), that we use for continuous integration and code review of incoming patches. Our instance has been tuned to support GHC, and many developers are actively submitting their patches through the queue. This is not only much more robust than trac tickets, it can also do testing of your patches, along with a nifty command line tool for other utilities.
|
|
|
- TODO Write about Shake?
|
|
|
|
|
|
# References
|
|
|
|
|
|
|
|
|
\[AMP\] [ https://github.com/quchen/articles/blob/master/applicative_monad.md](https://github.com/quchen/articles/blob/master/applicative_monad.md)
|
|
|
|
|
|
\[ORF\] [ https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields](https://ghc.haskell.org/trac/ghc/wiki/Records/OverloadedRecordFields)
|
|
|
|
|
|
\[FC\] System FC with Explicit Kind Equality - [ http://www.seas.upenn.edu/\~eir/papers/2013/fckinds/fckinds-extended.pdf](http://www.seas.upenn.edu/~eir/papers/2013/fckinds/fckinds-extended.pdf)
|
|
|
|
|
|
\[PTS\] [ https://ghc.haskell.org/trac/ghc/wiki/PartialTypeSignatures](https://ghc.haskell.org/trac/ghc/wiki/PartialTypeSignatures)
|
|
|
|
|
|
\[HEAPALLOCED\] [ https://ghc.haskell.org/trac/ghc/ticket/8199](https://ghc.haskell.org/trac/ghc/ticket/8199)
|
|
|
|
|
|
\[PHAB\] [ https://ghc.haskell.org/trac/ghc/wiki/Phabricator](https://ghc.haskell.org/trac/ghc/wiki/Phabricator) |
|
|
\ No newline at end of file |
|
|
TODOFIXME. |