id	summary	reporter	owner	description	type	status	priority	milestone	component	version	resolution	keywords	cc	os	architecture	failure	difficulty	testcase	blockedby	blocking	related
3981	Value of function differs for arguments of the same value	kirstin		"I'm getting a different result from the same function depending on whether I pass a value or a function that returns that value. This
happens with ghci and ghc.

I would expect to the the same result. 
Given:

{{{
x = [(),(),(),(),(),(),(),(),(),(),(),(),(),(),()]
choose 0 _ = 0
choose _ 0 = 0
choose n m = factorial n `div` (factorial (n - m) * factorial m)
factorial n = product [1..n]
}}}

Then:

{{{
> length x 
=> 15
> choose (length x) 2
=> -5
> choose 15 2
=> 105
}}}


Info:

Debian Squeeze: {{{Linux velox 2.6.32-trunk-686 #1 SMP Sun Jan 10 06:32:16 UTC 2010 i686 GNU/Linux}}}

"	bug	closed	normal		Compiler	6.12.1	invalid			Linux	x86	Incorrect result at runtime					
