RE: [Template-haskell] Ppr instance for Dec.
It looks to me as if the where clause should be indented in all contexts. So I've added the 'nest nestDepth' in the defn of where_clause. Others feel free to make it look neater! Simon | -----Original Message----- | From: template-haskell-bounces@haskell.org [mailto:template-haskell-bounces@haskell.org] On | Behalf Of Lemmih | Sent: 01 April 2005 14:19 | To: template-haskell@haskell.org | Subject: [Template-haskell] Ppr instance for Dec. | | Greetings, | | I noticed this code in Language.Haskell.TH.Ppr: | | > ppr (ClassD ctxt c xs fds ds) = text "class" <+> pprCxt ctxt | > <+> ppr c <+> hsep (map ppr xs) <+> ppr fds | > $$ where_clause ds | > ppr (InstanceD ctxt i ds) = text "instance" <+> pprCxt ctxt <+> ppr i | > $$ where_clause ds | | shouldn't it be: | | > ppr (ClassD ctxt c xs fds ds) = text "class" <+> pprCxt ctxt | > <+> ppr c <+> hsep (map ppr xs) <+> ppr fds | > $$ nest nestDepth (where_clause ds) | > ppr (InstanceD ctxt i ds) = text "instance" <+> pprCxt ctxt <+> ppr i | > $$ nest nestDepth (where_clause ds) | | -- | Friendly, | Lemmih | _______________________________________________ | template-haskell mailing list | template-haskell@haskell.org | http://www.haskell.org/mailman/listinfo/template-haskell
participants (1)
-
Simon Peyton-Jones