Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Synopsis
- class (Eq h, IsSizeHash h) => ValidHash h where
- dirofValidHash :: h -> HashedDir
- calcValidHash :: ByteString -> h
- data InventoryHash
- data PatchHash
- data PristineHash
- data HashedDir
- encodeValidHash :: ValidHash h => h -> String
- decodeValidHash :: ValidHash h => String -> Maybe h
- parseValidHash :: ValidHash h => Parser h
- getHash :: ValidHash h => h -> Hash
- getSize :: ValidHash h => h -> Maybe Int
- fromHash :: ValidHash h => Hash -> h
- fromSizeAndHash :: ValidHash h => Int -> Hash -> h
- checkHash :: ValidHash h => h -> ByteString -> Bool
- okayHash :: String -> Bool
Documentation
class (Eq h, IsSizeHash h) => ValidHash h where Source #
External API for the various hash types.
dirofValidHash :: h -> HashedDir Source #
The HashedDir
belonging to this type of hash
calcValidHash :: ByteString -> h Source #
Compute hash from file content.
Instances
ValidHash InventoryHash Source # | |
Defined in Darcs.Util.ValidHash | |
ValidHash PatchHash Source # | |
Defined in Darcs.Util.ValidHash dirofValidHash :: PatchHash -> HashedDir Source # calcValidHash :: ByteString -> PatchHash Source # | |
ValidHash PristineHash Source # | |
Defined in Darcs.Util.ValidHash |
data InventoryHash Source #
Instances
Show InventoryHash Source # | |
Defined in Darcs.Util.ValidHash showsPrec :: Int -> InventoryHash -> ShowS # show :: InventoryHash -> String # showList :: [InventoryHash] -> ShowS # | |
ValidHash InventoryHash Source # | |
Defined in Darcs.Util.ValidHash | |
Eq InventoryHash Source # | |
Defined in Darcs.Util.ValidHash (==) :: InventoryHash -> InventoryHash -> Bool # (/=) :: InventoryHash -> InventoryHash -> Bool # |
data PristineHash Source #
Instances
Show PristineHash Source # | |
Defined in Darcs.Util.ValidHash showsPrec :: Int -> PristineHash -> ShowS # show :: PristineHash -> String # showList :: [PristineHash] -> ShowS # | |
ValidHash PristineHash Source # | |
Defined in Darcs.Util.ValidHash | |
Eq PristineHash Source # | |
Defined in Darcs.Util.ValidHash (==) :: PristineHash -> PristineHash -> Bool # (/=) :: PristineHash -> PristineHash -> Bool # |
Semantically, this is the type of hashed objects. Git has a type tag inside the hashed file itself, whereas in Darcs the type is determined by the subdirectory.
encodeValidHash :: ValidHash h => h -> String Source #
parseValidHash :: ValidHash h => Parser h Source #