[Haskell Huffman coding] finished encoding part