
10 Sep
2015
10 Sep
'15
7:54 a.m.
On 2015-09-10 09:23, Roelof Wobben wrote:
which I wants to test with this function :
prop_fourDifferent :: Integer -> Integer -> Integer -> Integer -> Bool prop_fourDifferent a b c d = fourDifferent a b c d == ( a == b ) && ( a == c ) && (a == d)
The problem is that (==) has a higher precedence (4) than (&&) (which has precedence 3). So your definition is equivalent to prop_fourDifferent a b c d = (fourDifferent a b c d == ( a == b )) && ( a == c ) && (a == d) You need some extra parentheses there, try prop_fourDifferent a b c d = fourDifferent a b c d == (( a == b ) && ( a == c ) && (a == d)) -- Frerich Raabe - raabe@froglogic.com www.froglogic.com - Multi-Platform GUI Testing