GHC.Fingerprint

base-4.12.0.0: Basic libraries

Safe Haskell | Trustworthy
Language | Haskell2010

GHC.Fingerprint

Synopsis

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

# Documentation

data Fingerprint Source #

Constructors

Fingerprint !Word64 !Word64 |

Instances

Eq Fingerprint # | Since: base-4.4.0.0
Instance details Defined in GHC.Fingerprint.Type Methods (==) :: Fingerprint -> Fingerprint -> Bool Source # (/=) :: Fingerprint -> Fingerprint -> Bool Source #
Ord Fingerprint # | Since: base-4.4.0.0
Instance details Defined in GHC.Fingerprint.Type Methods compare :: Fingerprint -> Fingerprint -> Ordering Source # (<) :: Fingerprint -> Fingerprint -> Bool Source # (<=) :: Fingerprint -> Fingerprint -> Bool Source # (>) :: Fingerprint -> Fingerprint -> Bool Source # (>=) :: Fingerprint -> Fingerprint -> Bool Source # max :: Fingerprint -> Fingerprint -> Fingerprint Source # min :: Fingerprint -> Fingerprint -> Fingerprint Source #
Show Fingerprint # | Since: base-4.7.0.0
Instance details Defined in GHC.Fingerprint.Type Methods showsPrec :: Int -> Fingerprint -> ShowS Source # show :: Fingerprint -> String Source # showList :: [Fingerprint] -> ShowS Source #
Storable Fingerprint # | Since: base-4.4.0.0
Instance details Defined in Foreign.Storable Methods sizeOf :: Fingerprint -> Int Source # alignment :: Fingerprint -> Int Source # peekElemOff :: Ptr Fingerprint -> Int -> IO Fingerprint Source # pokeElemOff :: Ptr Fingerprint -> Int -> Fingerprint -> IO () Source # peekByteOff :: Ptr b -> Int -> IO Fingerprint Source # pokeByteOff :: Ptr b -> Int -> Fingerprint -> IO () Source # peek :: Ptr Fingerprint -> IO Fingerprint Source # poke :: Ptr Fingerprint -> Fingerprint -> IO () Source #

fingerprint0 :: Fingerprint Source #

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

fingerprintString :: String -> Fingerprint Source #

fingerprintFingerprints :: [Fingerprint] -> Fingerprint Source #

getFileHash :: FilePath -> IO Fingerprint Source #

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

Since: base-4.7.0.0