[Haskell-cafe] Maintaining laziness
jac at informatik.uni-kiel.de
Mon Jan 12 07:27:26 EST 2009
> Although it seems to be overkill for a single module - How about a
> cabalized version on Hackage and a darcs repository? It would
> simplify using and updating it.
I am not sure whether this would be a good idea. The original version
makes a lot of suggestions which are not satisfiable but it is not at
all trivial to decide which are satisfiable and which are not. I have
rewritten StrictCheck from scratch to overcome this problem. But the
current implementation is not presentable right now and I have no
formal prove that the criterion that I am using is correct.
> Your StrictCheck is really tough! I'm currently checking my
> routines from
> which I designed especially with laziness in mind - and I found a
> lot of laziness breakers using StrictCheck!
> However now I found an example where it probably proposes
> something inefficient:
> So what it proposes is essentially that one should first check the
> length of the lists without looking at the contents.
> [undefined,undefined] can never be a prefix of [undefined].
> However, first constructing the list spine seems to be inefficient.
I know about this problem. It is mentioned in the paper about
StrictCheck. I haven't worked on this right now. With respect to
least-strictness I would say the tool is right. But it is probably
not the kind of advise one wants. When I am sure that I can handle
the other problem I will take a look at this one.
More information about the Haskell-Cafe