added haskell codes to perform permutation test