[darcs-users] [issue1208] wish: darcs trackdown --bisect
ganesh at earth.li
Thu Dec 3 22:21:13 UTC 2009
On Thu, 3 Dec 2009, Matthias Fischmann wrote:
> Hi again, quick question: I have implemented '--last' and it works,
> but I am not sure whether this is how I should do it. Anybody care to
> drop a quick comment, like "yes, that's fine", or "no, use
> ... instead"?
I haven't had time to look properly or thing of an alternative to the
problem I did notice, but will try to have a proper look at the weekend:
> hunk ./src/Darcs/Ordered.hs 145
> +takeRL :: Int -> RL p C(x y) -> RL p C(x y)
> +takeRL i _ | i < 0 = assert False $ error "takeRL: negative argument."
> +takeRL 0 _ = NilRL
> +takeRL _ NilRL = NilRL
> +takeRL i (x:<:xs) = x :<: takeRL (i-1) xs
> +takeFL :: Int -> FL p C(x y) -> FL p C(x y)
> +takeFL i _ | i < 0 = assert False $ error "takeFL: negative argument."
> +takeFL 0 _ = NilFL
> +takeFL _ NilFL = NilFL
> +takeFL i (x:>:xs) = x :>: takeFL (i-1) xs
This bit can't possibly work with type witnesses, unfortunately -
configure with -ftype-witnesses and you'll see this for yourself.
You might be able to make it work by using 'sealing', i.e. the types in
Darcs.Sealed. It's all a bit more fiddly than I'd like, though :-(
Ganesh (who is currently trying to add witnesses to the modules that don't
have it yet...)
More information about the darcs-users