Commit e1cdaf38 authored by Simon Peyton Jones's avatar Simon Peyton Jones
Browse files

White space and ordering only

parent e662c62e
...@@ -357,15 +357,12 @@ getInitialKind :: TopLevelFlag -> TyClDecl Name -> TcM [(Name, TcTyThing)] ...@@ -357,15 +357,12 @@ getInitialKind :: TopLevelFlag -> TyClDecl Name -> TcM [(Name, TcTyThing)]
-- --
-- No family instances are passed to getInitialKinds -- 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 }) getInitialKind _ (ClassDecl { tcdLName = L _ name, tcdTyVars = ktvs, tcdATs = ats })
= kcHsTyVarBndrs False ktvs $ \ arg_kinds -> = kcHsTyVarBndrs False ktvs $ \ arg_kinds ->
do { inner_prs <- getFamDeclInitialKinds ats do { inner_prs <- getFamDeclInitialKinds ats
; let main_pr = (name, AThing (mkArrowKinds arg_kinds constraintKind)) ; let main_pr = (name, AThing (mkArrowKinds arg_kinds constraintKind))
; return (main_pr : inner_prs) } ; 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 }) getInitialKind top_lvl (DataDecl { tcdLName = L _ name, tcdTyVars = ktvs, tcdDataDefn = defn })
| HsDataDefn { dd_kindSig = Just ksig, dd_cons = cons } <- defn | HsDataDefn { dd_kindSig = Just ksig, dd_cons = cons } <- defn
= ASSERT( isTopLevel top_lvl ) = ASSERT( isTopLevel top_lvl )
...@@ -386,9 +383,16 @@ getInitialKind top_lvl (DataDecl { tcdLName = L _ name, tcdTyVars = ktvs, tcdDat ...@@ -386,9 +383,16 @@ getInitialKind top_lvl (DataDecl { tcdLName = L _ name, tcdTyVars = ktvs, tcdDat
-- See Note [Recusion and promoting data constructors] -- See Note [Recusion and promoting data constructors]
; return (main_pr : inner_prs) } ; return (main_pr : inner_prs) }
getInitialKind top_lvl (FamDecl { tcdFam = decl })
= getFamDeclInitialKind top_lvl decl
getInitialKind _ (ForeignType { tcdLName = L _ name }) getInitialKind _ (ForeignType { tcdLName = L _ name })
= return [(name, AThing liftedTypeKind)] = return [(name, AThing liftedTypeKind)]
getInitialKind _top_lvl decl@(SynDecl {})
= pprPanic "getInitialKind" (ppr decl)
---------------------------------
getFamDeclInitialKinds :: [LFamilyDecl Name] -> TcM [(Name, TcTyThing)] getFamDeclInitialKinds :: [LFamilyDecl Name] -> TcM [(Name, TcTyThing)]
getFamDeclInitialKinds decls getFamDeclInitialKinds decls
= tcExtendTcTyThingEnv [ (n, APromotionErr TyConPE) = tcExtendTcTyThingEnv [ (n, APromotionErr TyConPE)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment