[commit: ghc] ghc-kinds: Merge branch 'master' into step2 (a52bd1d)

Julien Cretin julien at galois.com
Mon Sep 12 15:12:28 CEST 2011


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

On branch  : ghc-kinds

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

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

commit a52bd1da8c3ae2613b2e616e8aeb344f9762f93e
Merge: 9de64d1... c2bd94c...
Author: Julien Cretin <ghc at ia0.eu>
Date:   Fri Sep 9 12:24:16 2011 +0200

    Merge branch 'master' into step2

 compiler/codeGen/CgTicky.hs         |    7 +-
 compiler/coreSyn/CoreArity.lhs      |   14 +-
 compiler/simplCore/Simplify.lhs     |   17 --
 compiler/typecheck/TcInstDcls.lhs   |  176 ++++++++++++++++
 compiler/typecheck/TcMType.lhs      |   16 +-
 compiler/typecheck/TcTyClsDecls.lhs |  383 ++++++++++------------------------
 6 files changed, 312 insertions(+), 301 deletions(-)

diff --cc compiler/typecheck/TcTyClsDecls.lhs
index 4d9c111,ad3e4ec..a26a535
--- a/compiler/typecheck/TcTyClsDecls.lhs
+++ b/compiler/typecheck/TcTyClsDecls.lhs
@@@ -562,8 -562,26 +565,24 @@@ tcTyClDecl1 _parent calc_isre
  tcTyClDecl1 _ _
    (ForeignType {tcdLName = L _ tc_name, tcdExtName = tc_ext_name})
    = return [ATyCon (mkForeignTyCon tc_name tc_ext_name liftedTypeKind 0)]
 -
 -tcTyClDecl1 _ _ d = pprPanic "tcTyClDecl1" (ppr d)
  \end{code}
  
+ %************************************************************************
+ %*									*
+                Typechecking associated types (in class decls)
+ 	       (including the associated-type defaults)
+ %*									*
+ %************************************************************************
+ 
+ Example:     class C a where
+                data D a 
+ 
+                type F a b :: *
+                type F a Z = [a]        -- Default
+                type F a (S n) = F a n  -- Default
+ 
+ We can get default defns only for type families, not data families
+ 	
  \begin{code}
  tcClassATs :: Class            -- The class
             -> [TyVar]          -- Class type variables (can't look them up in class b/c its knot-tied)





More information about the Cvs-ghc mailing list