ちゃんと書くとこんな感じになる

primes = 2:(section [3..] composites)
 where
  composites = union [multiples p |p<-primes]
  multiples n = map (n*) [n..]

section (x:xs) (y:ys)
 | x < y = x : (section xs (y:ys))
 | x == y = section xs ys
 | x > y = section (x:xs) ys

union = foldr merge []
 where
  merge (x:xs) ys = x:merge' xs ys
  merge' (x:xs) (y:ys)
   | x < y = x : merge' xs (y:ys)
   | x == y = x : merge' xs ys
   | x > y = y : merge' (x:xs) ys