id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
6122	INLINE pragma not obeyed	augustss		"GHC seems to decide that it knows better than I when I put INLINE on a recursive function.  Take the following example
{{{
digits10 :: Int
digits10 = count 0 (floatRadix x ^ floatDigits x)
  where {-# INLINE count #-}
        count n v = if v < 10 then n else count (n+1) (v `quot` 10)
        x = 1 :: Double
}}}
This should evaluate to 15 at compile time, but instead it will perform the computation at runtime.  I put INLINE of the count function because I know what I'm doing, but I guess GHC doesn't trust me.

Postponing this calculation to runtime means that other constant folding involving digits10 will not happen.

It can sometimes be very important to compute certain things at compile time rather than runtime, and perhaps an even better way to ensure this would be to have a pragma that specifies that a computation is supposed to be done at compile time."	bug	closed	normal		Compiler	7.4.1	wontfix		mail@…	Unknown/Multiple	Unknown/Multiple	None/Unknown	Unknown				
