[Pkg-haskell-commits] [SCM] haskell-testpack branch, master, updated. debian/1.0.2-1-4-gb0d6b36

gwern0 gwern0 at gmail.com
Fri Apr 23 15:22:30 UTC 2010


The following commit has been merged in the master branch:
commit 796eb67534f507b39b4defc04cb528f0c6e4e33e
Author: gwern0 <gwern0 at gmail.com>
Date:   Fri Nov 30 12:52:24 2007 +0100

    mv Data.String to Data.MissingHString
    
    This is necessary because the Data.String name is already taken by a module in base, and this clash causes problems for any other programs importing Data.String - like HSH.

diff --git a/src/Data/String.hs b/src/Data/MissingHString.hs
similarity index 94%
rename from src/Data/String.hs
rename to src/Data/MissingHString.hs
index 65fe1f7..39b5ca4 100644
--- a/src/Data/String.hs
+++ b/src/Data/MissingHString.hs
@@ -30,7 +30,7 @@ This module provides various helpful utilities for dealing with strings.
 Written by John Goerzen, jgoerzen\@complete.org
 -}
 
-module Data.String
+module Data.MissingHString
                        (-- * Whitespace Removal
                         strip, lstrip, rstrip,
                         -- * Tests
@@ -42,10 +42,12 @@ module Data.String
                         -- in "Data.List.Utils".
                         join, split, splitWs, replace, escapeRe
                        ) where
-import Data.List.Utils(startswith, endswith, join, split, replace)
-import Data.Char
-import Text.Regex
 
+import Data.List.Utils (startswith, endswith, join, split, replace)
+import Data.Char (isAlpha, isAscii, isDigit)
+import Text.Regex (mkRegex, splitRegex)
+
+wschars :: String
 wschars = " \t\r\n"
 
 {- | Removes any whitespace characters that are present at the start
@@ -63,7 +65,6 @@ 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
 
@@ -94,7 +95,7 @@ escapeRe (x:xs)
     -- Chars that we never escape
     | x `elem` ['\'', '`'] = x : escapeRe xs
     -- General rules for chars we never escape
-    | isDigit x || (isAscii x && isAlpha x) || x `elem` ['<', '>'] 
+    | isDigit x || (isAscii x && isAlpha x) || x `elem` ['<', '>']
         = x : escapeRe xs
     -- Escape everything else
     | otherwise = '\\' : x : escapeRe xs

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list