[darcs-devel] [patch1335] resolve issue 1721
Ganesh Sittampalam
bugs at darcs.net
Tue May 12 06:54:13 UTC 2015
New submission from Ganesh Sittampalam <ganesh at earth.li>:
Thanks a lot for your patches!
Would it be possible to resubmit them as native Darcs patches? You can do this with the 'darcs
send' command.
I haven't been through them in detail yet but I noticed one thing in this patch:
> toobig :: Int -> [a] -> Bool
> - toobig 0 _ = True
> - toobig _ [] = False
> - toobig n (_ : xs) = toobig (n - 1) xs
> + toobig s v = ((length v) > s)
I think the existing code is the way it is for laziness: as soon as it sees that the list is
longer than 'n' elements, it stops evaluating it further. With the change, the whole list would
first have to be evaluated before we knew if it was too big or not.
__________________________________
Darcs bug tracker <bugs at darcs.net>
<http://bugs.darcs.net/patch1335>
__________________________________
More information about the darcs-devel
mailing list