[Template-haskell] Ppr instance for Dec.

Lemmih lemmih at gmail.com
Fri Apr 1 08:19:15 EST 2005


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


More information about the template-haskell mailing list