Haskell heap sort