Commits

Maxime Henrion committed dbdc788

Fix a warning by not bringing an unused binding into scope.

Comments (0)

Files changed (1)

Data/Compression/Huffman.hs

 -- Derive the binary code from a huffman tree.
 code :: HuffmanTree a -> [(a,[Bit])]
 code = code' []
-  where code' bits Empty      = []
+  where code' _    Empty      = []
         code' bits (Leaf x)   = [(x,bits)]
         code' bits (Node l r) = map (second (Zero:)) (code' bits l) ++
                                 map (second (One:)) (code' bits r)