I wrote a primality test for UniHaskell however, it seems complicated in terms of conditionals.
Here it is, rewritten to not use Unicode and other functions in the code:
-- Primality predicate
isPrime :: Int -> Bool
isPrime 2 = True
isPrime 3 = True
isPrime n
| n `mod` 2 == 0 = False
| n `mod` 3 == 0 = False
| otherwise = check 5 2
where check i w
| i * i <= n = if n `mod` i == 0
then False
else check (i + w) (6 - w)
| otherwise = True
The algorithm is simple: return True
if n
is 2 or 3, False
if n
is a multiple of 2 or 3, and then perform trial division over numbers that are not multiples of 2 or 3.