[darcs-users] [PATCH, RESEND] Eliminate HopefullyPrivate (rename over Hopefully)

Eric Y. Kow eric.kow at gmail.com
Sun Aug 10 08:03:29 UTC 2008


> Thinking more about it, though, I don't really understand why Hopefully
> exists.

I'm guessing you have seen these change log entries

Sun Dec 10 23:16:23 GMT 2006  David Roundy <droundy at darcs.net>
  * don't use HopefullyPrivate outside of Hopefully.
  The idea is to hide the Hopefully constructors, so I can hide some more
  information in there, if I like, which should be handy for the hashed
  inventories, and may also come in handy (for similar reasons) with git
  repositories.

Sun Dec 10 21:35:36 GMT 2006  David Roundy <droundy at darcs.net>
  * change Maybe Patch to Hopefully Patch.
  This rather pervasive change move us to using a new Hopefully type, which
  is similar to Either String for storing patches that may or may not exist.
  This should improve error reporting.  At a minimum it'll making easier to
  improve error reporting.

I don't know enough to comment on the below.  Maybe David has things to say.

> > data Hopefully a C(x y) = Hopefully (SimpleHopefully a C(x y))
> >                         | Hashed  String (SimpleHopefully a C(x y))
> 
> seems equivalent to
> 
> > SimpleHopefully a C(x y) * Maybe String
> 
> which should be
> 
> > Maybe (a C(x y)) * Maybe String
> 
> But, AFAICT, the only reason for the Maybe String seems to be because
> PatchInfo structures don't store the hashed-repository ("new") hash value --
> the root complication with issue861.
> 
> Is it silly to think that PatchInfos should, even for old repositories,
> store (potentially unevaluated thunks -- hooray laziness) their new hash
> value?  Am I missing something obvious?

-- 
Eric Kow <http://www.nltg.brighton.ac.uk/home/Eric.Kow>
PGP Key ID: 08AC04F9
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
Url : http://lists.osuosl.org/pipermail/darcs-users/attachments/20080810/43a80b2b/attachment.pgp 


More information about the darcs-users mailing list