GHC.Utils.Fingerprint

ghc-lib-parser-9.14.1.20251220: The GHC API, decoupled from GHC versions

Safe Haskell | Ignore
Language | GHC2021

GHC.Utils.Fingerprint

Contents

- Re-exported from GHC.Fingerprint

Synopsis

- readHexFingerprint :: String -> Fingerprint
- fingerprintByteString :: ByteString -> Fingerprint
- data Fingerprint = Fingerprint !Word64 !Word64
- fingerprint0 :: Fingerprint
- fingerprintFingerprints :: [Fingerprint] -> Fingerprint
- fingerprintData :: Ptr Word8 -> Int -> IO Fingerprint
- fingerprintString :: String -> Fingerprint
- fingerprintStrings :: [String] -> Fingerprint
- getFileHash :: FilePath -> IO Fingerprint

# Documentation

readHexFingerprint :: String -> Fingerprint #

fingerprintByteString :: ByteString -> Fingerprint #

# Re-exported from GHC.Fingerprint

data Fingerprint #

Constructors

Fingerprint !Word64 !Word64 |

#### Instances

Instances details

Binary Fingerprint | Since: binary-0.7.6.0
Instance details Defined in Data.Binary.Class Methods put :: Fingerprint -> Put # get :: Get Fingerprint # putList :: [Fingerprint] -> Put #
NFData Fingerprint | Since: deepseq-1.4.0.0
Instance details Defined in Control.DeepSeq Methods rnf :: Fingerprint -> () #
Storable Fingerprint | @since base-4.4.0.0
Instance details Defined in GHC.Internal.Foreign.Storable Methods sizeOf :: Fingerprint -> Int # alignment :: Fingerprint -> Int # peekElemOff :: Ptr Fingerprint -> Int -> IO Fingerprint # pokeElemOff :: Ptr Fingerprint -> Int -> Fingerprint -> IO () # peekByteOff :: Ptr b -> Int -> IO Fingerprint # pokeByteOff :: Ptr b -> Int -> Fingerprint -> IO () # peek :: Ptr Fingerprint -> IO Fingerprint # poke :: Ptr Fingerprint -> Fingerprint -> IO () #
Generic Fingerprint |
Instance details Defined in GHC.Internal.Generics Associated Types
type Rep Fingerprint | @since base-4.15.0.0
Instance details Defined in GHC.Internal.Generics type Rep Fingerprint = D1 ('MetaData "Fingerprint" "GHC.Internal.Fingerprint.Type" "ghc-internal" 'False) (C1 ('MetaCons "Fingerprint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64)))
Methods from :: Fingerprint -> Rep Fingerprint x # to :: Rep Fingerprint x -> Fingerprint #
Show Fingerprint | @since base-4.7.0.0
Instance details Defined in GHC.Internal.Fingerprint.Type Methods showsPrec :: Int -> Fingerprint -> ShowS # show :: Fingerprint -> String # showList :: [Fingerprint] -> ShowS #
Binary Fingerprint # |
Instance details Defined in GHC.Utils.Binary Methods put_ :: WriteBinHandle -> Fingerprint -> IO () # put :: WriteBinHandle -> Fingerprint -> IO (Bin Fingerprint) # get :: ReadBinHandle -> IO Fingerprint #
Outputable Fingerprint # |
Instance details Defined in GHC.Utils.Outputable Methods ppr :: Fingerprint -> SDoc #
Eq Fingerprint | @since base-4.4.0.0
Instance details Defined in GHC.Internal.Fingerprint.Type Methods (==) :: Fingerprint -> Fingerprint -> Bool # (/=) :: Fingerprint -> Fingerprint -> Bool #
Ord Fingerprint | @since base-4.4.0.0
Instance details Defined in GHC.Internal.Fingerprint.Type Methods compare :: Fingerprint -> Fingerprint -> Ordering # (<) :: Fingerprint -> Fingerprint -> Bool # (<=) :: Fingerprint -> Fingerprint -> Bool # (>) :: Fingerprint -> Fingerprint -> Bool # (>=) :: Fingerprint -> Fingerprint -> Bool # max :: Fingerprint -> Fingerprint -> Fingerprint # min :: Fingerprint -> Fingerprint -> Fingerprint #
type Rep Fingerprint | @since base-4.15.0.0
Instance details Defined in GHC.Internal.Generics type Rep Fingerprint = D1 ('MetaData "Fingerprint" "GHC.Internal.Fingerprint.Type" "ghc-internal" 'False) (C1 ('MetaCons "Fingerprint" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64) :*: S1 ('MetaSel ('Nothing :: Maybe Symbol) 'SourceUnpack 'SourceStrict 'DecidedUnpack) (Rec0 Word64)))

fingerprint0 :: Fingerprint #

fingerprintFingerprints :: [Fingerprint] -> Fingerprint #

fingerprintData :: Ptr Word8 -> Int -> IO Fingerprint #

fingerprintString :: String -> Fingerprint #

fingerprintStrings :: [String] -> Fingerprint #

getFileHash :: FilePath -> IO Fingerprint #

Computes the hash of a given file. This function loops over the handle, running in constant memory.

@since base-4.7.0.0