Z_n in Haskell