1. use hGetContents to read the records of the given file.
2. Then use this function 'unlines (sort(lines inline))' to sort the records the file where inline = hGetContents filehandle