ん?GHCiだと通ったけど
Prelude> product [x | x <- [1..10000], mod x 10 /= 0, mod x 10 /= 2, mod x 10 /= 5]