and / or

David Feuer david.feuer at gmail.com
Tue Aug 19 06:24:20 UTC 2014


First question: how bad would it be to use the Prelude definitions of
and and or? I assume if there's a problem it's probably excessive
duplication by the inliner?

Second question: if that would be bad, why not rewrite them to foldr
forms, then write them back, like other things do?

Statement: if the current arrangement really is the best, then we
should add two additional rules:

"and/augment"   forall (g::forall b.(Bool->b->b)->b->b) (xs::[Bool]) .
                and (augment g xs) = g (&&) (and xs)

"or/augment"    forall (g::forall b.(Bool->b->b)->b->b) (xs::[Bool]) .
                or (augment g) = g (||) (or xs)


More information about the Libraries mailing list