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


The following commit has been merged in the master branch:
commit 2d2a7444536077271f522ea901da15b8a036d9b2
Author: John Goerzen <jgoerzen at complete.org>
Date:   Fri Nov 19 09:13:18 2004 +0100

    Added allg
    
    Keywords:
    
    
    (jgoerzen at complete.org--projects/missingh--head--0.5--patch-95)

diff --git a/ChangeLog b/ChangeLog
index e7bf0a5..62eff41 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,18 @@
 # arch-tag: automatic-ChangeLog--jgoerzen at complete.org--projects/missingh--head--0.5
 #
 
+2004-11-19 02:13:18 GMT	John Goerzen <jgoerzen at complete.org>	patch-95
+
+    Summary:
+      Added allg
+    Revision:
+      missingh--head--0.5--patch-95
+
+
+    modified files:
+     ChangeLog libsrc/MissingH/Parsec.hs
+
+
 2004-11-19 01:40:16 GMT	John Goerzen <jgoerzen at complete.org>	patch-94
 
     Summary:
diff --git a/libsrc/MissingH/Parsec.hs b/libsrc/MissingH/Parsec.hs
index fd46117..64172de 100644
--- a/libsrc/MissingH/Parsec.hs
+++ b/libsrc/MissingH/Parsec.hs
@@ -35,7 +35,7 @@ module MissingH.Parsec(-- * Generalized Utilities
                        -- ones you might see in the Char parser.
                        GeneralizedToken, GeneralizedTokenParser,
                        togtok, tokeng, satisfyg, oneOfg, noneOfg,
-                       specificg,
+                       specificg, allg,
                        -- * Other Utilities
                        notMatching)
 where
@@ -68,6 +68,10 @@ satisfyg test = tokeng (\t -> if test t then Just t else Nothing)
 oneOfg :: (Eq a) => [a] -> GeneralizedTokenParser a st a
 oneOfg i = satisfyg (\x -> elem x i)
 
+{- | Matches all items and returns them -}
+allg :: GeneralizedTokenParser a st [a]
+allg = many $ satisfyg (\_ -> True)
+
 {- | Matches one item not in a list and returns it. -}
 noneOfg :: (Eq a) => [a] -> GeneralizedTokenParser a st a
 noneOfg l = satisfyg (\x -> not (elem x l))

-- 
haskell-testpack



More information about the Pkg-haskell-commits mailing list