On Mon, Oct 09, 2006 at 03:54:41PM +0100, Ian Lynagh wrote: > It might be possible, but it sounds tricky. I guess it would have to go > something like "try inlining this, run the simplifier, see if it got > small enough, if not back out", which could waste a lot of work if it > fails in lots of cases.
I would think the easiest way to go about this would be to extend the rules pragma. {-# RULES "shift/const-inline" forall x y# . shift x y# = ... #-} where variables ending in # will only match constants known at compile time. or perhaps.. {-# RULES "shift/const-inline" forall x (y::const Int) . shift x y# = ... #-} or something like that. I imagine such a thing would have other uses as well... John -- John Meacham - ⑆repetae.net⑆john⑈ _______________________________________________ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users