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


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

    Added Makefile
    
    
    
    (jgoerzen at complete.org--projects/missingh--head--1.0--patch-3)

diff --git a/Makefile b/Makefile
new file mode 100644
index 0000000..c56ecd6
--- /dev/null
+++ b/Makefile
@@ -0,0 +1,30 @@
+# arch-tag: Main Makefile
+# Copyright (C) 2004 John Goerzen <jgoerzen at complete.org>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+
+SOURCES := $(wildcard MissingH/*.hs)
+OBJS := $(SOURCES:.hs=.o)
+
+all: libmissingH.a
+
+libmissingH.a: $(OBJS)
+	-rm -f libmissingH.a
+	ar q libmissingH.a $(OBJS)
+
+%.o: %.hs
+	ghc -c -o $@ $<
+
+
diff --git a/MissingH/Strutil.hs b/MissingH/Strutil.hs
index 4878499..807e7d9 100644
--- a/MissingH/Strutil.hs
+++ b/MissingH/Strutil.hs
@@ -16,20 +16,29 @@ along with this program; if not, write to the Free Software
 Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 -}
 
-module Strutil(strip, lstrip, rstrip) where
+module MissingH.Strutil(strip, lstrip, rstrip) where
+
+wschars = " \t\r\n"
 
 -- | This module provides various helpful utilities for dealing with strings.
 -- John Goerzen <jgoerzen at complete.org>
 
 -- * Whitespace removal
 
--- | 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: 
---
--- 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.
+-- | 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:
+
+-- 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.
 
 strip :: String -> String
 strip = lstrip . rstrip
@@ -43,3 +52,4 @@ lstrip s = case s of
 
 -- | Same as strip, but applies only to the right side of the string.
 rstrip s = reverse . lstrip . reverse
+

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list