Skip to content
  • Simon Peyton Jones's avatar
    Add OverloadedLists, allowing list syntax to be overloaded · 3234a4ad
    Simon Peyton Jones authored
    This work was all done by
       Achim Krause <achim.t.krause@gmail.com>
       George Giorgidze <giorgidze@gmail.com>
       Weijers Jeroen <jeroen.weijers@uni-tuebingen.de>
    
    It allows list syntax, such as [a,b], [a..b] and so on, to be
    overloaded so that it works for a variety of types.
    
    The design is described here:
        http://hackage.haskell.org/trac/ghc/wiki/OverloadedLists
    
    Eg. you can use it for maps, so that
            [(1,"foo"), (4,"bar")] :: Map Int String
    
    The main changes
     * The ExplicitList constructor of HsExpr gets witness field
     * Ditto ArithSeq constructor
     * Ditto the ListPat constructor of HsPat
    
    Everything else flows from this.
    3234a4ad