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


The following commit has been merged in the master branch:
commit 4cec52913d062dbd3c9f53169d9d9bdd412af26e
Author: John Goerzen <jgoerzen at complete.org>
Date:   Sat Oct 23 00:46:52 2004 +0100

    Removed List.trunc
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--1.0--patch-100)

diff --git a/ChangeLog b/ChangeLog
index 144812c..22dfb37 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,19 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--1.0
 #
 
+2004-10-22 18:46:52 GMT	John Goerzen <jgoerzen at complete.org>	patch-100
+
+    Summary:
+      Removed List.trunc
+    Revision:
+      missingh--head--1.0--patch-100
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/List.hs libsrc/MissingH/Str.hs
+     testsrc/Listtest.hs
+
+
 2004-10-22 18:44:01 GMT	John Goerzen <jgoerzen at complete.org>	patch-99
 
     Summary:
diff --git a/libsrc/MissingH/List.hs b/libsrc/MissingH/List.hs
index 4d2fcec..781f821 100644
--- a/libsrc/MissingH/List.hs
+++ b/libsrc/MissingH/List.hs
@@ -40,7 +40,7 @@ module MissingH.List(-- * Tests
                      for association lists. -}
                      addToAL, delFromAL, flipAL,
                      -- * Conversions
-                     split, join, genericJoin, trunc,
+                     split, join, genericJoin,
                      -- * Miscellaneous
                      countElem, elemRIndex, alwaysElemRIndex
                      -- -- * Sub-List Selection
@@ -137,18 +137,6 @@ contains sub searchlist =
                              True -> True
                              False -> contains sub (tail searchlist)
 
-{- | Given a length and a list, remove any elements at the end of the list
-that make it longer than the length.  If the list is shorter than the
-length, do nothing.
-
-> trunc 2 "Hello" -> "He"
-
-This is the same as Data.List.take.
--}
-
-trunc :: Int -> [a] -> [a]
-trunc = take
-
 {- | Adds the specified (key, value) pair to the given list, removing any
 existing pair with the same key already present. -}
 addToAL :: Eq key => [(key, elt)] -> key -> elt -> [(key, elt)]
diff --git a/libsrc/MissingH/Str.hs b/libsrc/MissingH/Str.hs
index 7e9ae8a..2dfde68 100644
--- a/libsrc/MissingH/Str.hs
+++ b/libsrc/MissingH/Str.hs
@@ -40,9 +40,9 @@ module MissingH.Str(-- * Whitespace Removal
                         -- * Conversions
                         -- | Note: Some of these functions are aliases for functions
                         -- in "MissingH.List".
-                        join, split, trunc
+                        join, split
                        ) where
-import MissingH.List(startswith, endswith, join, split, trunc)
+import MissingH.List(startswith, endswith, join, split)
 import Text.Regex
 
 wschars = " \t\r\n"
@@ -93,4 +93,4 @@ splitRe delim str =
             else prefix : splitRe delim postfix
         Nothing -> [str]
 
--}
\ No newline at end of file
+-}
diff --git a/testsrc/Listtest.hs b/testsrc/Listtest.hs
index 872a398..1159944 100644
--- a/testsrc/Listtest.hs
+++ b/testsrc/Listtest.hs
@@ -78,7 +78,7 @@ test_flipAL =
                         ("e", ["d"])]
 
 test_trunc =
-    let f len inp exp = exp @=? trunc len inp in
+    let f len inp exp = exp @=? take len inp in
         do
         f 2 "Hello" "He"
         f 1 "Hello" "H"

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list