Changes between Version 25 and Version 26 of Status/Oct13


Ignore:
Timestamp:
Oct 19, 2013 12:55:38 AM (9 months ago)
Author:
thoughtpolice
Comment:

Add TypeHoles notes.

Legend:

Unmodified
Added
Removed
Modified
  • Status/Oct13

    v25 v26  
    2525 
    2626 * **New and improved I/O manager** - Earlier this year, Andreas Voellmy and Kazu Yamamoto worked on a host of improvements to our I/O manager, making it scale significantly better on multicore machines. Since then, it's seen some other performance tweaks, and many bugfixes. As a result, the new I/O manager should scale linearly up to about 40 cores. Andreas reports their !McNettle Software-defined-network (SDN) implementation can now achieve over ''twenty million connections per second'', making it the fastest SDN implementation around - an incredible feat! 
     27 
     28 * **Type Holes** - Thijs Alkemade and Simon PJ got an implementation of `TypeHoles` in GHC, meaning it's possible to tell GHC there is a 'hole' in a program, and have the compiler spit out an error stating what types are in scope. As a trivial example 
     29{{{ 
     30Prelude> :set -XTypeHoles  
     31Prelude> let f :: a -> a; f x = _ 
     32 
     33<interactive>:6:24: 
     34    Found hole ‛_’ with type: a 
     35    Where: ‛a’ is a rigid type variable bound by 
     36               the type signature for f :: a -> a at <interactive>:6:10 
     37    Relevant bindings include 
     38      x :: a (bound at <interactive>:6:20) 
     39      f :: a -> a (bound at <interactive>:6:18) 
     40    In the expression: _ 
     41    In an equation for ‛f’: f x = _ 
     42}}} 
     43  GHC now tells us that the term `f` has a hole of type `a`, and there is a term `x :: a` in scope. So the definition is clear: `f x = x`. Holes are originally a concept borrowed from [http://wiki.portal.chalmers.se/agda/pmwiki.php Agda], and we hope they will be useful to Haskell programmers too! 
    2744 
    2845 * **New Template Haskell** - Geoffrey Mainland implemented support for New Template Haskell, fixing a lot of long-standing bugs with the TH implementation, while making it significantly more expressive, including support for typed quotes, pattern splices and more. This allows us to write for example a typed, staged power function. For details and examples, you can see Geoff's blog [NewTH1] and the GHC wiki pages describing the design [NewTH2]. 
     
    7895 * **Overloaded record fields ** - Adam Gundry implemented the overloaded records field proposal as part of the Haskell.org 2013 GSoC. This work will make it possible to not only have overloaded record field names, but also enable a wealth of other nice features, like polymorphic update/lookup, and automatically turning record fields into lens. More detail can be found on the GHC wiki [ORF]. 
    7996 
    80  * **Pattern synonyms** - Gergö Érdi worked on an implementation of pattern synonyms for GHC, which will finally give us the power to abstract over patterns and give them names. While the design is not final (see the wiki for details[PS]), the results look promising, and hopefully fix a long-standing 'abstraction hole' in the term language for Haskell. 
     97 * **Pattern synonyms** - Gergö Érdi worked on an implementation of pattern synonyms for GHC, which will finally give us the power to abstract over patterns and give them names. While the design is not final (see the wiki for details[PS]), the results look promising, and will hopefully fix a long-standing 'abstraction hole' in the term language for Haskell. 
    8198 
    8299 * **Explicit Type Application** - Stephanie Weirich, Richard Eisenberg and Hamidhasan Ahmed have been working on adding explicit type applications to GHC. This allows the programmer to specify the ''types'' that should be instantiated for arguments to a function application, where normally they would be inferred. While this capability already exists in GHC's internal language, System FC -- indeed, every FC-pro program has function application with explicitly applied types -- it has not been available in Haskell itself. While a lot of the syntax and design is not quite final, there are some details about the design available on the wiki [TA].