darcs-2.18.2: a distributed, interactive, smart revision control system
Safe HaskellSafe-Inferred
LanguageHaskell2010

Darcs.Util.ValidHash

Synopsis

Documentation

class (Eq h, IsSizeHash h) => ValidHash h where Source #

External API for the various hash types.

Minimal complete definition

dirofValidHash

Methods

dirofValidHash :: h -> HashedDir Source #

The HashedDir belonging to this type of hash

calcValidHash :: ByteString -> h Source #

Compute hash from file content.

data PatchHash Source #

Instances

Instances details
Show PatchHash Source # 
Instance details

Defined in Darcs.Util.ValidHash

ValidHash PatchHash Source # 
Instance details

Defined in Darcs.Util.ValidHash

Eq PatchHash Source # 
Instance details

Defined in Darcs.Util.ValidHash

data HashedDir Source #

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.

Instances

Instances details
Eq HashedDir Source # 
Instance details

Defined in Darcs.Util.ValidHash

checkHash :: ValidHash h => h -> ByteString -> Bool Source #

Verify file content against a given ValidHash.

okayHash :: String -> Bool Source #

Check that the given String is an encoding of some ValidHash.