Strict functions

Ian Lynagh igloo@earth.li
Fri, 19 Oct 2001 14:30:59 +0100


Hi all

I've been reading the GHC docs and they say that strict functions are
good for space and time. Section 6.2 goes on to explain how to read the
.hi files to determine the strictness of a function. However, it doesn't
explain all the cases I am seeing. Example of the ones I've noticed are:

V
S(L)V
AAAb
m
C(V)L

What do these mean? And more importantly, how good are they?

Also, the prelude definition of zipWith has LVL whereas the following
definition has LVV. Why is something like the following not used?

> zipWith                 :: (a->b->c) -> [a] -> [b] -> [c]
> zipWith f (a:as) (b:bs) = f a b : zipWith f as bs
> zipWith _ _      []     = []
> zipWith _ _      _      = []


Thanks
Ian