On Sun, Jun 06, 2010 at 21:36:16 +0000, Adolfo Builes wrote:
> Sun Jun  6 16:19:15 COT 2010  [email protected]
>   * Resolve issue1210: global cache gets recorded in _darcs/prefs/sources

Applied, thanks!  Trivial comments below (not a request for amending,
just me making sort of useless comments)

Resolve issue1210: global cache gets recorded in _darcs/prefs/sources
---------------------------------------------------------------------
> +    globalcacheDirectory <- globalCacheDir

There's a useful Hungarian-ish pseudo-convention in Darcs to prefix
Maybe (or similar things like Either) with m.  Here for example, I
might have said something like mglobal.

> +    let repoCache   = extractCache $
> +                      case globalcacheDirectory of
> +                         Just d -> modifyCache repo (dropLocalCache (Cache 
> DarcsCache.Directory Writable d))
> +                         _      -> repo

Two things I would have done differently here are (a) to use an explicit
Nothing and (b) to put the Cache DarcsCache.Directory Writable in the
dropLocalCache function.  People may disagree with me on (b), though.

It doesn't matter much.  For pattern matching on these sum types,
particularly types of my own, I've grown somewhat leery of the catch-all
pattern because what inevitably happens is that I catch something
unexpected (for example, if I later tweak the type and introduce a new
branch).  I don't know what the right answer is, to be honest, but
lately I tend to lean slightly away from the '_'

> hunk ./src/Darcs/Repository/Prefs.lhs 34
>                     boringRegexps, boringFileFilter, darcsdirFilter,
>                     FileType(..), filetypeFunction,
>                     getCaches,
> -                   binariesFileHelp
> +                   binariesFileHelp,
> +                   globalCacheDir
>                   ) where

I *think* you can actually use the trick of appending a comma to
globalCacheDir, which keeps future patches minimal.

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9

Attachment: signature.asc
Description: Digital signature

_______________________________________________
darcs-users mailing list
[email protected]
http://lists.osuosl.org/mailman/listinfo/darcs-users

Reply via email to