| 8 | | * '''Simon PJ: New coercions''' |
| | 8 | * GHC's intermediate language (which we call "Core") is a simple, |
| | 9 | explicitly-typed lambda in the style of System F. Core is far, |
| | 10 | far simpler than Haskell (`CoreExpr` has only eight data |
| | 11 | constructors), so GHC can type-check Core very fast and reliably. |
| | 12 | In theory, such a typecheck is redundant (since the original |
| | 13 | Haskell program was typechecked), but in practice, typechecking |
| | 14 | Core is a very powerful internal consistency check on GHC itself: |
| | 15 | many compiler bugs generate type-incorrect Core. This consistency |
| | 16 | check is run by `-dcore-lint`. |
| 10 | | * '''Simon PJ: generics''' |
| | 18 | With the advent of GADTs and type families, the type system of the |
| | 19 | Core necessarily has to become a bit more complicated. For a few |
| | 20 | years wa have been using an extension of System F, called System |
| | 21 | FC, as described in our paper [FC}. However, the way that System FC |
| | 22 | was actually ''implemented'' in GHC's Core language was a bit unsatisfactory |
| | 23 | so, with help from Brent Yorgey, Simon PJ is busy re-engineering it. |
| | 24 | In particular, FC has ''coercion terms'', and these will now |
| | 25 | be represented by their own data type `Coercion`, rather than being |
| | 26 | squeezed into `Type`. Moreover, these coercion terms can get big, |
| | 27 | so there's a new "coercion optimiser" to replace big coercions by |
| | 28 | equivalent smaller ones. All this is described in our new paper [New FC]. |
| | 29 | These changes will (finally) complete the type-family story by |
| | 30 | making so-called "equality superclasses" work for the first time. |
| | 31 | |
| | 32 | * In the autumn, Dimitrios and Simon PJ implemented a completely |
| | 33 | new constraint solver for the type checker; we also complete an |
| | 34 | epic JFP paper describing how it works [OutsideIn]. The new |
| | 35 | solver is far more tractable and maintainable than the old type |
| | 36 | checker, and has fixed many outstanding problems. We are still |
| | 37 | shaking out the last bugs, and we have some ideas for improving |
| | 38 | performance. Based on this new foundation, we are planning to |
| | 39 | develop the type system further, notably by adding a richer kind |
| | 40 | system along the lines of Conor McBride's SHE system [SHE]. |
| | 41 | |
| | 42 | * Pedro Magalhaes has nearly completed his implementation of the |
| | 43 | '''derivable type classes''' mechanism described in his 2010 |
| | 44 | Haskell Symposium paper [Derivable]. It will be in GHC 7.2. |
| | 45 | |
| | 46 | * Edward Yang has done a lot of work on the long-promised new |
| | 47 | code-generation path. Hoopl is now fully part of GHC, and |
| | 48 | the new path uses it extensively. We are now working on making |
| | 49 | the new pipeline generate better code than the old one. Stay |
| | 50 | tuned. * '''Simon PJ: New coercions''' |
| | 51 | |
| | 52 | |