Repository : ssh://darcs.haskell.org//srv/darcs/ghc

On branch  : master

http://hackage.haskell.org/trac/ghc/changeset/de8c8d68cabb5f24304fad2f03caa41fdf182b4f

>---------------------------------------------------------------

commit de8c8d68cabb5f24304fad2f03caa41fdf182b4f
Author: Max Bolingbroke <[email protected]>
Date:   Tue Sep 6 09:04:37 2011 +0100

    Implement associated type defaults
    
    Basically, now you can write:
    
      class Cls a where
        type Typ a
        type Typ a = Just a
    
    And now if an instance does not specify an explicit associated type
    instance, one will be generated afresh based on that default. So for
    example this instance:
    
      instance Cls Int where
    
    Will be equivalent to this one:
    
      instance Cls Int where
        type Typ Int = Just Int

 compiler/basicTypes/OccName.lhs     |    2 +-
 compiler/deSugar/DsMeta.hs          |    2 +-
 compiler/hsSyn/Convert.lhs          |    2 +-
 compiler/hsSyn/HsDecls.lhs          |    8 +-
 compiler/iface/BinIface.hs          |   15 ++
 compiler/iface/BuildTyCl.lhs        |    7 +-
 compiler/iface/IfaceSyn.lhs         |   36 +++-
 compiler/iface/MkIface.lhs          |   13 +-
 compiler/iface/TcIface.lhs          |   14 ++-
 compiler/parser/RdrHsSyn.lhs        |   11 +-
 compiler/rename/RnSource.lhs        |   14 +-
 compiler/typecheck/TcClassDcl.lhs   |    2 +-
 compiler/typecheck/TcEnv.lhs        |    4 +-
 compiler/typecheck/TcInstDcls.lhs   |  329 +++--------------------------
 compiler/typecheck/TcRnDriver.lhs   |   12 +-
 compiler/typecheck/TcTyClsDecls.lhs |  390 ++++++++++++++++++++++++++++++++++-
 compiler/types/Class.lhs            |   44 +++--
 compiler/utils/Util.lhs             |   11 +-
 18 files changed, 564 insertions(+), 352 deletions(-)


Diff suppressed because of size. To see it, use:

    git show de8c8d68cabb5f24304fad2f03caa41fdf182b4f

_______________________________________________
Cvs-ghc mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/cvs-ghc

Reply via email to