and / or
David Feuer
david.feuer at gmail.com
Tue Aug 19 06:34:22 UTC 2014
Oh, I see now. If it doesn't fuse, it performs extra operations,
because we want foldr1 rather than foldr, and foldr1 is not so nice
for fusion. Whoops! That's no good! But we should take better
advantage of the NOINLINE here with a few more rules. In particular,
we *know* that && and || are tiny little functions, so we can inline
them to our hearts' content:
"and/cons" forall x y . and (x:xs) = x && and xs
"or/cons" forall x y . or (x:xs) = x || or xs
More information about the Libraries
mailing list