regexdot 0.10.2.1 → 0.10.2.2
raw patch · 4 files changed
+21/−11 lines, 4 filesdep ~toolshed
Dependency ranges changed: toolshed
Files
- changelog +5/−0
- makefile +5/−1
- regexdot.cabal +8/−6
- src/RegExDot/Repeatable.hs +3/−4
changelog view
@@ -23,3 +23,8 @@ * Added manually controlled "llvm" flag to "regexdot.cabal". * Changed identifier for type-parameters, to better reflect its role. * Reacted to the creation of module "ToolShed.Defaultable".+ * Uploaded to <http://hackage.haskell.org/packages/hackage.html>.+0.10.2.2+ * Amended 'regexdot.cabal' to more correctly specify dependency on package 'toolshed'.+ * Used new module "ToolShed.Pair" from package toolshed-0.12.0.0.+ * Guarded 'eager-blackholing' flag in cabal file.
makefile view
@@ -13,7 +13,7 @@ # You should have received a copy of the GNU General Public License # along with this program. If not, see <http://www.gnu.org/licenses/>. -.PHONY: all build clean configure copy haddock help hlint install prof sdist+.PHONY: all build check clean configure copy haddock help hlint install prof sdist all: install @@ -45,8 +45,12 @@ sdist: configure runhaskell Setup.hs $@ +check: sdist+ cabal upload --check --verbose=3 dist/*.tar.gz;+ clean: runhaskell Setup.hs $@+ find src -type f \( -name '*.o' -o -name '*.hi' \) -delete help: @grep '^[a-zA-Z].*:' makefile | sed -e 's/:.*//'
regexdot.cabal view
@@ -1,13 +1,13 @@ --Package-properties Name: regexdot-Version: 0.10.2.1+Version: 0.10.2.2 Cabal-Version: >= 1.6 Copyright: (C) 2010 Dr. Alistair Ward License: GPL License-file: LICENSE Author: Dr. Alistair Ward Stability: Unstable interface, incomplete features.-Synopsis: A /polymorphic/, POSIX, extended regular-expression engine.+Synopsis: A polymorphic, POSIX, extended regex-engine. Build-Type: Simple Description: Provides a portable, POSIX, extended regex-engine, designed to process a list of /arbitrary/ objects. Category: Search, Regex@@ -18,11 +18,11 @@ Extra-Source-Files: changelog, copyright, makefile flag haveDeepSeq- Description: Use 'Control.DeepSeq' rather than the older module 'Control.Parallel.Strategies'.+ Description: Import the type-class 'NFData' from module 'Control.DeepSeq' rather than 'Control.Parallel.Strategies'. Default: True flag llvm- Description: Whether the 'llvm' backend has been installed and is required for code-generation.+ Description: Whether the 'llvm' compiler-backend has been installed and is required for code-generation. manual: True default: False @@ -58,7 +58,7 @@ Build-depends: base == 4.*, parsec == 3.*,- toolshed == 0.11.*+ toolshed >= 0.12 GHC-options: -Wall -O2 GHC-prof-options: -prof -auto-all -caf-all@@ -71,7 +71,9 @@ if flag(threaded) Build-depends: parallel >= 3.0- GHC-options: -feager-blackholing++ if impl(ghc >= 6.12)+ GHC-options: -feager-blackholing else Build-depends: parallel
src/RegExDot/Repeatable.hs view
@@ -88,6 +88,7 @@ import qualified RegExDot.Consumer as Consumer import qualified RegExDot.ConsumptionProfile as ConsumptionProfile import qualified Text.ParserCombinators.Parsec as Parsec+import qualified ToolShed.Pair as Pair import qualified ToolShed.SelfValidate as SelfValidate #ifdef HAVE_DEEPSEQ@@ -135,9 +136,7 @@ (Parsec.char oneOrMoreToken <?> "Repeatable.oneOrMoreToken " ++ show oneOrMoreToken) >> return {-to GenParser-monad-} (oneOrMore b), (Parsec.char zeroOrOneToken <?> "Repeatable.zeroOrOneToken " ++ show zeroOrOneToken) >> return {-to GenParser-monad-} (zeroOrOne b), (Parsec.char zeroOrMoreToken <?> "Repeatable.zeroOrMoreToken " ++ show zeroOrMoreToken) >> return {-to GenParser-monad-} (zeroOrMore b),- (b ^#->#) {-arbitrarily greedy for now-} <$> uncurry Parsec.between (- Parsec.char *** Parsec.char $ rangeDelimiters- ) (+ (b ^#->#) {-arbitrarily greedy for now-} <$> uncurry Parsec.between (Pair.mirror Parsec.char rangeDelimiters) ( do fewest <- Parsec.skipMany Parsec.space >> (read <$> Parsec.many1 Parsec.digit <?> "Repetition-range minimum") most <- Parsec.skipMany Parsec.space >> Parsec.option (@@ -174,7 +173,7 @@ showSuffix :: Repeatable a -> ShowS showSuffix repeatable = let showRange :: ShowS -> ShowS- showRange x = (\(begin, end) -> begin . x . end) $ (showChar *** showChar) rangeDelimiters+ showRange x = (\(begin, end) -> begin . x . end) $ Pair.mirror showChar rangeDelimiters in ( case repetitionBounds repeatable of (0, Nothing) -> showChar zeroOrMoreToken