From f9ad735f0b8a3262b273b8d126a65b4caf4d64f5 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Wed, 16 Jan 2008 15:05:25 +0000 Subject: [PATCH] Extra instance for Outputable on 5-tuples --- compiler/utils/Outputable.lhs | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index d6016b0..839eda1 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -472,11 +472,20 @@ instance (Outputable a, Outputable b, Outputable c) => Outputable (a, b, c) wher instance (Outputable a, Outputable b, Outputable c, Outputable d) => Outputable (a, b, c, d) where - ppr (x,y,z,w) = - parens (sep [ppr x <> comma, - ppr y <> comma, - ppr z <> comma, - ppr w]) + ppr (a,b,c,d) = + parens (sep [ppr a <> comma, + ppr b <> comma, + ppr c <> comma, + ppr d]) + +instance (Outputable a, Outputable b, Outputable c, Outputable d, Outputable e) => + Outputable (a, b, c, d, e) where + ppr (a,b,c,d,e) = + parens (sep [ppr a <> comma, + ppr b <> comma, + ppr c <> comma, + ppr d <> comma, + ppr e]) instance Outputable FastString where ppr fs = ftext fs -- Prints an unadorned string, -- 1.7.10.4