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 #

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 # show :: Fingerprint -> String # showList :: [Fingerprint] -> ShowS #
Storable Fingerprint # | Since: base-4.4.0.0
Instance details Defined in 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 () #

fingerprint0 :: Fingerprint #

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

fingerprintString :: String -> Fingerprint #

fingerprintFingerprints :: [Fingerprint] -> 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