RULES and strictness

John Meacham john at repetae.net
Thu Nov 30 23:01:00 EST 2006


when performing strictness/abscence/one-shot analysis, are rule bodies
taken into account? like, would the following cause trouble making const
no longer absent in its second argument?

const x y = x

{-# RULE "const/seq" forall a b . const a b = seq b a #-}

by trouble I mean the compiler failing or producing bad code in some
way, rather than the obvious trouble of changing the meaning of const.

it is noted in the deforestation papers that rules can change the
sharing properties of code and we are okay with that. I was wondering if
they could safely change the strictness or abscence properties of code
as well?

        John

-- 
John Meacham - ⑆repetae.net⑆john⑈


More information about the Glasgow-haskell-users mailing list