[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36
John Goerzen
jgoerzen at complete.org
Fri Apr 23 14:49:33 UTC 2010
The following commit has been merged in the master branch:
commit 415443fae9afaae4df10272e88c5da1593f0cd79
Author: John Goerzen <jgoerzen at complete.org>
Date: Sat Dec 4 04:18:44 2004 +0100
Little bit of hacking on Inflate to make it work nicer
Keywords:
(jgoerzen at complete.org--projects/missingh--head--0.7--patch-16)
diff --git a/ChangeLog b/ChangeLog
index ea5388f..4231232 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
# arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.7
#
+2004-12-03 21:18:44 GMT John Goerzen <jgoerzen at complete.org> patch-16
+
+ Summary:
+ Little bit of hacking on Inflate to make it work nicer
+ Revision:
+ missingh--head--0.7--patch-16
+
+
+ modified files:
+ ChangeLog libsrc/MissingH/Compression/Inflate.hs
+
+
2004-12-03 20:48:08 GMT John Goerzen <jgoerzen at complete.org> patch-15
Summary:
diff --git a/libsrc/MissingH/Compression/Inflate.hs b/libsrc/MissingH/Compression/Inflate.hs
index aabf14c..77f95ff 100644
--- a/libsrc/MissingH/Compression/Inflate.hs
+++ b/libsrc/MissingH/Compression/Inflate.hs
@@ -12,15 +12,38 @@ This module provides a Haskell implementation of the inflate function,
as described by RFC 1951.
-}
-module Inflate (inflate) where
-import Array
-import List
-import Maybe
-import Monad
+{- |
+ Module : MissingH.Compression.Inflate
+ Copyright : Copyright (C) 2004 Ian Lynagh
+ License : 3-clause BSD
-import Bits
-import Word
+ Maintainer : Ian Lynagh,
+ Maintainer : <igloo at earth.li>
+ Stability : provisional
+ Portability: portable
+
+Configuration file parsing, generation, and manipulation
+
+Copyright (C) 2004 Ian Lynagh
+-}
+
+module MissingH.Compression.Inflate (inflate_string,
+ inflate, Output, Bit,
+ bits_to_word32) where
+
+import Data.Array
+import Data.List
+import Data.Maybe
+import qualified Data.Char
+import Control.Monad
+
+import Data.Bits
+import Data.Word
+
+inflate_string :: String -> String
+inflate_string s =
+ map (Data.Char.chr . fromIntegral) $ fst $ inflate $ map Data.Char.ord s
{-
\section{Types}
@@ -106,7 +129,7 @@ get_bits n = InfM $ \s -> case need n (bits s) of
offset = (n + offset s) `mod` 8 } )
where need 0 xs = ([], xs)
need _ [] = error "get_bits: Don't have enough!"
- need (i+1) (x:xs) = let (ys, zs) = need i xs in (x:ys, zs)
+ need i (x:xs) = let (ys, zs) = need (i-1) xs in (x:ys, zs)
extract_InfM :: InfM a -> (a, [Bit])
extract_InfM (InfM f) = let (x, s) = f undefined in (x, bits s)
--
haskell-testpack
More information about the Pkg-haskell-commits
mailing list