Sorting algorithms implemented in Haskell