summaryrefslogtreecommitdiff
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/utils/Fingerprint.hsc7
-rw-r--r--compiler/utils/Outputable.lhs5
2 files changed, 5 insertions, 7 deletions
diff --git a/compiler/utils/Fingerprint.hsc b/compiler/utils/Fingerprint.hsc
index 5f9bef18b1..e006598e45 100644
--- a/compiler/utils/Fingerprint.hsc
+++ b/compiler/utils/Fingerprint.hsc
@@ -8,7 +8,6 @@
--
-- ----------------------------------------------------------------------------
-{-# OPTIONS_GHC -fno-warn-orphans #-}
module Fingerprint (
Fingerprint(..), fingerprint0,
readHexFingerprint,
@@ -19,16 +18,10 @@ module Fingerprint (
#include "md5.h"
##include "HsVersions.h"
-import Outputable
-
-import Text.Printf
import Numeric ( readHex )
import GHC.Fingerprint
-instance Outputable Fingerprint where
- ppr (Fingerprint w1 w2) = text (printf "%016x%016x" w1 w2)
-
-- useful for parsing the output of 'md5sum', should we want to do that.
readHexFingerprint :: String -> Fingerprint
readHexFingerprint s = Fingerprint w1 w2
diff --git a/compiler/utils/Outputable.lhs b/compiler/utils/Outputable.lhs
index 8b49d30fde..a6d188ab54 100644
--- a/compiler/utils/Outputable.lhs
+++ b/compiler/utils/Outputable.lhs
@@ -92,7 +92,9 @@ import qualified Data.Set as Set
import Data.Word
import System.IO ( Handle )
import System.FilePath
+import Text.Printf
+import GHC.Fingerprint
import GHC.Show ( showMultiLineString )
\end{code}
@@ -689,6 +691,9 @@ 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)
+
+instance Outputable Fingerprint where
+ ppr (Fingerprint w1 w2) = text (printf "%016x%016x" w1 w2)
\end{code}
%************************************************************************