Haskell/Primes: Optimize