instance Outputable IntMap
authorsimonpj@microsoft.com <unknown>
Mon, 25 Oct 2010 14:07:04 +0000 (14:07 +0000)
committersimonpj@microsoft.com <unknown>
Mon, 25 Oct 2010 14:07:04 +0000 (14:07 +0000)
compiler/utils/Outputable.lhs

index 73c6bd3..ed02ab6 100644 (file)
@@ -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}
 
 %************************************************************************