Remove (most of) the FiniteMap wrapper
[ghc-hetmet.git] / compiler / utils / Outputable.lhs
index 7a643d7..73c6bd3 100644 (file)
@@ -75,6 +75,8 @@ import Pretty         ( Doc, Mode(..) )
 import Panic
 
 import Data.Char
+import Data.Map (Map)
+import qualified Data.Map as M
 import Data.Word
 import System.IO       ( Handle, stderr, stdout, hFlush )
 import System.FilePath
@@ -564,6 +566,9 @@ instance (Outputable a, Outputable b, Outputable c, Outputable d, Outputable e)
 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
+    ppr m = ppr (M.toList m)
 \end{code}
 
 %************************************************************************