X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2FhsSyn%2FHsDecls.lhs;h=90479ab2abde52c82bc6dfd0fab86e41e7ad8eb2;hb=77ede632bfb1f0df2224b392cd0b7ed009baa9d0;hp=059fe4d3416a0dc074c500ef2b155c2453f75b3f;hpb=589ba227fff5946de91cf3a9b88c80953d95f9c7;p=ghc-hetmet.git diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs index 059fe4d..90479ab 100644 --- a/compiler/hsSyn/HsDecls.lhs +++ b/compiler/hsSyn/HsDecls.lhs @@ -362,7 +362,9 @@ data TyClDecl name tcdTyVars :: [LHsTyVarBndr name], -- Type variables tcdTyPats :: Maybe [LHsType name], -- Type patterns tcdKindSig:: Maybe Kind, -- Optional kind sig; - -- (only for the 'where' form) + -- (only for the + -- 'where' form and + -- indexed type sigs) tcdCons :: [LConDecl name], -- Data constructors -- For data T a = T1 | T2 a the LConDecls all have ResTyH98 @@ -380,7 +382,7 @@ data TyClDecl name | TyFunction {tcdLName :: Located name, -- type constructor tcdTyVars :: [LHsTyVarBndr name], -- type variables tcdIso :: Bool, -- injective type? - tcdKindSig:: Maybe Kind -- result kind + tcdKind :: Kind -- result kind } | TySynonym { tcdLName :: Located name, -- type constructor @@ -493,17 +495,14 @@ instance OutputableBndr name = hsep [ptext SLIT("foreign import type dotnet"), ppr ltycon] ppr (TyFunction {tcdLName = ltycon, tcdTyVars = tyvars, tcdIso = iso, - tcdKindSig = mb_sig}) + tcdKind = kind}) = typeMaybeIso <+> pp_decl_head [] ltycon tyvars Nothing <+> - ppr_sig mb_sig + dcolon <+> pprKind kind where typeMaybeIso = if iso then ptext SLIT("type iso") else ptext SLIT("type") - ppr_sig Nothing = empty - ppr_sig (Just kind) = dcolon <+> pprKind kind - ppr (TySynonym {tcdLName = ltycon, tcdTyVars = tyvars, tcdTyPats = typats, tcdSynRhs = mono_ty}) = hang (ptext SLIT("type") <+> pp_decl_head [] ltycon tyvars typats <+>