[commit: ghc] master: White space and ordering only (e1cdaf3)
Simon Peyton Jones
simonpj at microsoft.com
Mon Jun 24 19:03:22 CEST 2013
Repository : http://darcs.haskell.org/ghc.git/
On branch : master
https://github.com/ghc/ghc/commit/e1cdaf388d3ac4a7041cf29da32669f577922e33
>---------------------------------------------------------------
commit e1cdaf388d3ac4a7041cf29da32669f577922e33
Author: Simon Peyton Jones <simonpj at microsoft.com>
Date: Mon Jun 24 13:10:17 2013 +0100
White space and ordering only
>---------------------------------------------------------------
compiler/typecheck/TcTyClsDecls.lhs | 10 +++++++---
1 file changed, 7 insertions(+), 3 deletions(-)
diff --git a/compiler/typecheck/TcTyClsDecls.lhs b/compiler/typecheck/TcTyClsDecls.lhs
index 044086d..ae59787 100644
--- a/compiler/typecheck/TcTyClsDecls.lhs
+++ b/compiler/typecheck/TcTyClsDecls.lhs
@@ -357,15 +357,12 @@ getInitialKind :: TopLevelFlag -> TyClDecl Name -> TcM [(Name, TcTyThing)]
--
-- No family instances are passed to getInitialKinds
-getInitialKind top_lvl (FamDecl { tcdFam = decl }) = getFamDeclInitialKind top_lvl decl
getInitialKind _ (ClassDecl { tcdLName = L _ name, tcdTyVars = ktvs, tcdATs = ats })
= kcHsTyVarBndrs False ktvs $ \ arg_kinds ->
do { inner_prs <- getFamDeclInitialKinds ats
; let main_pr = (name, AThing (mkArrowKinds arg_kinds constraintKind))
; return (main_pr : inner_prs) }
-getInitialKind _top_lvl decl@(SynDecl {}) = pprPanic "getInitialKind" (ppr decl)
-
getInitialKind top_lvl (DataDecl { tcdLName = L _ name, tcdTyVars = ktvs, tcdDataDefn = defn })
| HsDataDefn { dd_kindSig = Just ksig, dd_cons = cons } <- defn
= ASSERT( isTopLevel top_lvl )
@@ -386,9 +383,16 @@ getInitialKind top_lvl (DataDecl { tcdLName = L _ name, tcdTyVars = ktvs, tcdDat
-- See Note [Recusion and promoting data constructors]
; return (main_pr : inner_prs) }
+getInitialKind top_lvl (FamDecl { tcdFam = decl })
+ = getFamDeclInitialKind top_lvl decl
+
getInitialKind _ (ForeignType { tcdLName = L _ name })
= return [(name, AThing liftedTypeKind)]
+getInitialKind _top_lvl decl@(SynDecl {})
+ = pprPanic "getInitialKind" (ppr decl)
+
+---------------------------------
getFamDeclInitialKinds :: [LFamilyDecl Name] -> TcM [(Name, TcTyThing)]
getFamDeclInitialKinds decls
= tcExtendTcTyThingEnv [ (n, APromotionErr TyConPE)
More information about the ghc-commits
mailing list