[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:42:20 UTC 2010


The following commit has been merged in the master branch:
commit cc893948d1701d98a6081df2027097a519207a30
Author: John Goerzen <jgoerzen at complete.org>
Date:   Tue Oct 5 08:48:33 2004 +0100

    Updated docs
    
    
    
    (jgoerzen at complete.org--projects/missingh--head--1.0--patch-5)

diff --git a/Makefile b/Makefile
index 2f68da1..f6abdeb 100644
--- a/Makefile
+++ b/Makefile
@@ -28,7 +28,7 @@ libmissingH.a: $(OBJS)
 	ghc -c -o $@ $<
 
 doc:
-	-rm -f html
+	-rm -rf html
 	mkdir html
 	haddock -h -o html $(SOURCES)
 
diff --git a/MissingH/Strutil.hs b/MissingH/Strutil.hs
index 8335c90..1a34c36 100644
--- a/MissingH/Strutil.hs
+++ b/MissingH/Strutil.hs
@@ -16,40 +16,45 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 -}
 
-module MissingH.Strutil(strip, lstrip, rstrip) where
+{- | This module provides various helpful utilities for dealing with strings.
 
-wschars = " \t\r\n"
+Written by John Goerzen, jgoerzen at complete.org
+-}
 
--- | This module provides various helpful utilities for dealing with strings.
--- John Goerzen <jgoerzen at complete.org>
+module MissingH.Strutil(
+                        -- * Whitespace Removal
+                        strip, lstrip, rstrip) where
 
--- * Whitespace removal
+wschars = " \t\r\n"
 
--- | Removes any whitespace characters that are present at the start
---or end of a string. Does not alter the internal contents of a
---string. If no whitespace characters are present at the start or end
---of a string, returns the original string unmodified. Safe to use on
---any string.
+{- | Removes any whitespace characters that are present at the start
+or end of a string. Does not alter the internal contents of a
+string. If no whitespace characters are present at the start or end
+of a string, returns the original string unmodified. Safe to use on
+any string.
 
--- Note that this may differ from some other similar
---functions from other authors in that:
+Note that this may differ from some other similar
+functions from other authors in that:
 
--- 1. If multiple whitespace
---characters are present all in a row, they are all removed;
+1. If multiple whitespace
+characters are present all in a row, they are all removed;
 
--- 2. If no
---whitespace characters are present, nothing is done.
+2. If no
+whitespace characters are present, nothing is done.
+-}
 
 strip :: String -> String
 strip = lstrip . rstrip
 
--- | Same as strip, but applies only to the left side of the string.
+-- | Same as 'strip', but applies only to the left side of the string.
+lstrip :: String -> String
 lstrip s = case s of
                   [] -> []
                   (x:xs) -> if elem x wschars
                             then lstrip xs
                             else s
 
--- | Same as strip, but applies only to the right side of the string.
+-- | Same as 'strip', but applies only to the right side of the string.
+rstrip :: String -> String
 rstrip = reverse . lstrip . reverse
 

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list