Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
GHC
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Locked Files
Issues
4,267
Issues
4,267
List
Boards
Labels
Service Desk
Milestones
Iterations
Merge Requests
408
Merge Requests
408
Requirements
Requirements
List
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Security & Compliance
Security & Compliance
Dependency List
License Compliance
Operations
Operations
Incidents
Environments
Analytics
Analytics
CI / CD
Code Review
Insights
Issue
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
e9a587a1
Commit
e9a587a1
authored
Aug 05, 2012
by
ian@well-typed.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
De-orphan the Outputable Fingerprint instance
parent
be691e1f
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
7 deletions
+5
-7
compiler/utils/Fingerprint.hsc
compiler/utils/Fingerprint.hsc
+0
-7
compiler/utils/Outputable.lhs
compiler/utils/Outputable.lhs
+5
-0
No files found.
compiler/utils/Fingerprint.hsc
View file @
e9a587a1
...
@@ -8,7 +8,6 @@
...
@@ -8,7 +8,6 @@
--
--
-- ----------------------------------------------------------------------------
-- ----------------------------------------------------------------------------
{-# OPTIONS_GHC -fno-warn-orphans #-}
module Fingerprint (
module Fingerprint (
Fingerprint(..), fingerprint0,
Fingerprint(..), fingerprint0,
readHexFingerprint,
readHexFingerprint,
...
@@ -19,16 +18,10 @@ module Fingerprint (
...
@@ -19,16 +18,10 @@ module Fingerprint (
#include "md5.h"
#include "md5.h"
##include "HsVersions.h"
##include "HsVersions.h"
import Outputable
import Text.Printf
import Numeric ( readHex )
import Numeric ( readHex )
import GHC.Fingerprint
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.
-- useful for parsing the output of 'md5sum', should we want to do that.
readHexFingerprint :: String -> Fingerprint
readHexFingerprint :: String -> Fingerprint
readHexFingerprint s = Fingerprint w1 w2
readHexFingerprint s = Fingerprint w1 w2
...
...
compiler/utils/Outputable.lhs
View file @
e9a587a1
...
@@ -92,7 +92,9 @@ import qualified Data.Set as Set
...
@@ -92,7 +92,9 @@ import qualified Data.Set as Set
import Data.Word
import Data.Word
import System.IO ( Handle )
import System.IO ( Handle )
import System.FilePath
import System.FilePath
import Text.Printf
import GHC.Fingerprint
import GHC.Show ( showMultiLineString )
import GHC.Show ( showMultiLineString )
\end{code}
\end{code}
...
@@ -689,6 +691,9 @@ instance (Outputable key, Outputable elt) => Outputable (M.Map key elt) where
...
@@ -689,6 +691,9 @@ instance (Outputable key, Outputable elt) => Outputable (M.Map key elt) where
ppr m = ppr (M.toList m)
ppr m = ppr (M.toList m)
instance (Outputable elt) => Outputable (IM.IntMap elt) where
instance (Outputable elt) => Outputable (IM.IntMap elt) where
ppr m = ppr (IM.toList m)
ppr m = ppr (IM.toList m)
instance Outputable Fingerprint where
ppr (Fingerprint w1 w2) = text (printf "%016x%016x" w1 w2)
\end{code}
\end{code}
%************************************************************************
%************************************************************************
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment