From: simonpj@microsoft.com Date: Sat, 4 Aug 2007 17:21:51 +0000 (+0000) Subject: Improve pretty-printing of 'foreign' declarations X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=7df91d495b6072ced7cc5f47b9483b25e0cf0263 Improve pretty-printing of 'foreign' declarations --- diff --git a/compiler/hsSyn/HsDecls.lhs b/compiler/hsSyn/HsDecls.lhs index 4f0fc03..fb6370a 100644 --- a/compiler/hsSyn/HsDecls.lhs +++ b/compiler/hsSyn/HsDecls.lhs @@ -864,11 +864,11 @@ data FoType = DNType -- In due course we'll add subtype stuff instance OutputableBndr name => Outputable (ForeignDecl name) where ppr (ForeignImport n ty fimport) = - ptext SLIT("foreign import") <+> ppr fimport <+> - ppr n <+> dcolon <+> ppr ty + hang (ptext SLIT("foreign import") <+> ppr fimport <+> ppr n) + 2 (dcolon <+> ppr ty) ppr (ForeignExport n ty fexport) = - ptext SLIT("foreign export") <+> ppr fexport <+> - ppr n <+> dcolon <+> ppr ty + hang (ptext SLIT("foreign export") <+> ppr fexport <+> ppr n) + 2 (dcolon <+> ppr ty) instance Outputable ForeignImport where ppr (DNImport spec) =