Looks good.  Short and to the point, explains the things a user of these
functions needs to know.  Thanks!

Adding some haddock to Cache.hs
-------------------------------
> builes.ado...@googlemail.com**20100810215116
>  Ignore-this: 34560d0bfcf1da1690742421b835caf
> ] hunk ./src/Darcs/Repository/Cache.hs 155
>                | length h == 75 = B.length s == read (take 10 h) && sha256sum 
> s == drop 11 h
>                | otherwise = False
>  
> -
> +-- |@fetchFileUsingCache cache dir hash@ receives a list of caches
> +--  @cache@, the directory for which that file belongs @dir@ and the
> +--  @hash@ of the file to fetch.  It tries to fetch the file from one
> +--  of the sources, trying them in order one by one.  If the file
> +--  cannot be fetched from any of the sources, this operation fails.
>  fetchFileUsingCache :: Cache -> HashedDir -> String -> IO (String, 
> B.ByteString)
>  fetchFileUsingCache = fetchFileUsingCachePrivate Anywhere
>  
> hunk ./src/Darcs/Repository/Cache.hs 209
>  
>  data OrOnlySpeculate = ActuallyCopy | OnlySpeculate deriving ( Eq )
>  
> +-- | @copyFileUsingCache oos cache subdir f@ copy or hardlinks the
> +--   file @f@ to one of the caches in @cache@,usually the global cache.
> +--   If a writable cache doesn't exist the function will fail.
>  copyFileUsingCache :: OrOnlySpeculate -> Cache -> HashedDir -> String -> IO 
> ()
>  copyFileUsingCache oos (Ca cache) subdir f =
>      do debugMessage $ "I'm doing copyFileUsingCache on "++(hashedDir 
> subdir)++"/"++f
> 

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
For a faster response, please try +44 (0)1273 64 2905.

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
darcs-users@darcs.net
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to