Huffman Encoding in Haskell