From fa1ac897c0d6fe7f19a4b5219cdbc7b6ced6c324 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Mon, 25 Oct 2010 14:07:04 +0000 Subject: [PATCH] instance Outputable IntMap --- compiler/utils/Outputable.lhs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs index 73c6bd3..ed02ab6 100644 --- a/compiler/utils/Outputable.lhs +++ b/compiler/utils/Outputable.lhs @@ -75,8 +75,8 @@ import Pretty ( Doc, Mode(..) ) import Panic import Data.Char -import Data.Map (Map) import qualified Data.Map as M +import qualified Data.IntMap as IM import Data.Word import System.IO ( Handle, stderr, stdout, hFlush ) import System.FilePath @@ -567,8 +567,10 @@ instance Outputable FastString where ppr fs = ftext fs -- Prints an unadorned string, -- no double quotes or anything -instance (Outputable key, Outputable elt) => Outputable (Map key elt) where +instance (Outputable key, Outputable elt) => Outputable (M.Map key elt) where ppr m = ppr (M.toList m) +instance (Outputable elt) => Outputable (IM.IntMap elt) where + ppr m = ppr (IM.toList m) \end{code} %************************************************************************ -- 1.7.10.4