On Tue, Nov 24, 2009 at 9:36 PM, Ganesh Sittampalam <[email protected]> wrote:
> On Tue, 24 Nov 2009, Jason Dagit wrote: > > On Sun, Nov 15, 2009 at 8:15 AM, Ganesh Sittampalam <[email protected]> >> wrote: >> >> On Sun, 15 Nov 2009, Jason Dagit wrote: >>> >>> toCommute and fromCommute are not the best function names, but I think >>> >>>> a future refactor can get rid of both of them or give them better >>>> names. I've also tried to make their types sufficiently general such >>>> that they may be able to transform the type of commuteFL, although I >>>> haven't actually tried it. >>>> >>>> >>> A little while ago I started adding some general infrastructure for >>> handling commutes between different types of patches in >>> Darcs.Patch.Permutations - in particular there's >>> >>> type CommuteFn p1 p2 = FORALL(x y) (p1 :> p2) C(x y) -> Maybe ((p2 :> p1) >>> C(x y)) >>> >>> I think it would make sense to combine this stuff with your toCommute and >>> fromCommute code, and put it in an appropriate module (perhaps a new >>> one). >>> >>> >> Ganesh, >> >> It's unclear to me: Were you going to apply this? I see it hasn't made >> it >> into darcs.net yet, and the status is "amend-requested" >> > > it's "review-in-progress" - I've had a quick look but not finished yet. Oh, maybe I misremembered it. I checked the status then hopped on transit where I wrote the email (without access to the tracker). > > > but I thought you >> were commenting on future work above. Did you feel that I need to include >> a >> usage of CommuteFn at the same time? >> > > No, but I didn't really like the toCommute/fromCommute names at all, so was > erring towards asking that they be changed before it's applied. Hadn't > thought of good alternatives yet which is part of the reason I haven't > finished the review yet. I struggled with the names too. They transform the argument tuples. Similar to curry/uncurry. So the better names might be, forwardCommute and reverseCommute. Or, toForwardCommute/toReverseCommute, but those are getting pretty long. I think eventually we can make all the tuples go the same way. Which would probably reduce some duplication. Having a 'flip' function for this might be nice too. Just some ideas to help you get unstuck on this. Thanks, Jason
_______________________________________________ darcs-users mailing list [email protected] http://lists.osuosl.org/mailman/listinfo/darcs-users
