diff options
| author | John Ericson <git@JohnEricson.me> | 2019-09-09 21:28:37 -0400 |
|---|---|---|
| committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2019-09-13 11:25:29 -0400 |
| commit | ccb4e646e0bd18d2664aeb1163ab2852b0844f2c (patch) | |
| tree | d2afcd3f4e8336aa23622cfff97814cf03902e7f /compiler/utils/Fingerprint.hsc | |
| parent | 71428a43bf122a24650af1fdf84a64543f267b8b (diff) | |
| download | haskell-ccb4e646e0bd18d2664aeb1163ab2852b0844f2c.tar.gz | |
Compiler should always get fingerprinting impl from base
07ee15915d5a0d6d1aeee137541eec6e9c153e65 started the transition, but the
job was never finished.
Diffstat (limited to 'compiler/utils/Fingerprint.hsc')
| -rw-r--r-- | compiler/utils/Fingerprint.hsc | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/compiler/utils/Fingerprint.hsc b/compiler/utils/Fingerprint.hsc deleted file mode 100644 index 377a378bb9..0000000000 --- a/compiler/utils/Fingerprint.hsc +++ /dev/null @@ -1,47 +0,0 @@ -{-# LANGUAGE CPP #-} - --- ---------------------------------------------------------------------------- --- --- (c) The University of Glasgow 2006 --- --- Fingerprints for recompilation checking and ABI versioning. --- --- https://gitlab.haskell.org/ghc/ghc/wikis/commentary/compiler/recompilation-avoidance --- --- ---------------------------------------------------------------------------- - -module Fingerprint ( - readHexFingerprint, - fingerprintByteString, - -- * Re-exported from GHC.Fingerprint - Fingerprint(..), fingerprint0, - fingerprintFingerprints, - fingerprintData, - fingerprintString, - getFileHash - ) where - -#include "md5.h" -##include "HsVersions.h" - -import GhcPrelude - -import Foreign -import GHC.IO -import Numeric ( readHex ) - -import qualified Data.ByteString as BS -import qualified Data.ByteString.Unsafe as BS - -import GHC.Fingerprint - --- useful for parsing the output of 'md5sum', should we want to do that. -readHexFingerprint :: String -> Fingerprint -readHexFingerprint s = Fingerprint w1 w2 - where (s1,s2) = splitAt 16 s - [(w1,"")] = readHex s1 - [(w2,"")] = readHex (take 16 s2) - -fingerprintByteString :: BS.ByteString -> Fingerprint -fingerprintByteString bs = unsafeDupablePerformIO $ - BS.unsafeUseAsCStringLen bs $ \(ptr, len) -> fingerprintData (castPtr ptr) len |
