packages feed

regexdot 0.12.0.1 → 0.12.1.0

raw patch · 7 files changed

+41/−34 lines, 7 filesdep +extraPVP ok

version bump matches the API change (PVP)

Dependencies added: extra

API changes (from Hackage documentation)

Files

.ghci view
@@ -1,1 +1,1 @@-:set -isrc-lib:dist/build/autogen -optP-include -optPdist/build/autogen/cabal_macros.h+:set -isrc-lib:dist/build/autogen -optP-include -optPdist/build/autogen/cabal_macros.h -Wall -fno-warn-tabs
changelog.markdown view
@@ -71,5 +71,9 @@ * Replaced use of module **ToolShed.Defaultable** with **Data.Default**. * Reimplemented **RegExDot.RegEx.deconstruct** using record-syntax. * Tested with **ghc-8.0.1**.+ ## 0.12.0.1 * Checked that pre-processor macros are defined.++## 0.12.1.0+* Replaced the identifer **pattern**, since this becomes a Haskell-keyword when **PatternSynonyms** are enabled.
regexdot.cabal view
@@ -14,7 +14,7 @@ -- along with RegExDot.  If not, see <http://www.gnu.org/licenses/>.  Name:		regexdot-Version:	0.12.0.1+Version:	0.12.1.0 Cabal-version:	>= 1.10 Copyright:	(C) 2010-2015 Dr. Alistair Ward License:	GPL@@ -25,7 +25,7 @@ Build-type:	Simple Description:	Provides a portable, POSIX, extended regex-engine, designed to process a list of /arbitrary/ objects. Category:	Search, Regex-Tested-with:	GHC == 7.4, GHC == 7.6, GHC == 7.8, GHC == 7.10.1, GHC == 8.0.1+Tested-with:	GHC == 7.4, GHC == 7.6, GHC == 7.8, GHC == 7.10, GHC == 8.0, GHC == 8.2 Homepage:	http://functionalley.eu/RegExDot/regExDot.html Maintainer:	mailto:regexdot@functionalley.eu Bug-reports:	mailto:regexdot@functionalley.eu@@ -41,7 +41,7 @@     type:	git     location:	https://github.com/functionalley/RegExDot --- Enable using: 'cabal configure -f llvm'.+-- Enable using: 'runhaskell Setup configure -f llvm --verbose'. flag llvm     Description:	Whether the 'llvm' compiler-backend has been installed and is required for code-generation.     Manual:		True@@ -78,15 +78,20 @@         base == 4.*,         data-default,         deepseq >= 1.1,+        extra,         parallel >= 3.0,         parsec == 3.*,         toolshed >= 0.17 -    if impl(ghc >= 7.4.1)-        GHC-prof-options:	-fprof-auto -fprof-cafs-    else-        GHC-prof-options:	-auto-all -caf-all+    if impl(ghc >= 7.0)+        if flag(llvm)+            GHC-options:	-fllvm -    if impl(ghc >= 7.0) && flag(llvm)-        GHC-options:	-fllvm+        if impl(ghc >= 7.4.1)+            GHC-prof-options:	-fprof-auto -fprof-cafs+    +            if impl(ghc >= 8.0)+                GHC-options:	-j -Wredundant-constraints+        else+            GHC-prof-options:	-auto-all -caf-all 
src-lib/RegExDot/ConsumptionProfile.hs view
@@ -49,7 +49,7 @@ import qualified	RegExDot.ConsumptionBounds	as ConsumptionBounds import qualified	ToolShed.SelfValidate -#if !defined(MIN_VERSION_base) || !MIN_VERSION_base(4,8,0)+#if !MIN_VERSION_base(4,8,0) import	Control.Applicative((<$>), (<*>)) #endif 
src-lib/RegExDot/DSL.hs view
@@ -55,51 +55,51 @@  -- | Prepend an unrepeated 'RegEx.Pattern', to the specified 'RegEx.Concatenation'. (-:) :: RegEx.Pattern a -> RegEx.Concatenation a -> RegEx.Concatenation a-(-:) pattern	= (Repeatable.one pattern :)+(-:) pat	= (Repeatable.one pat :)  -- | Prepend an optional 'RegEx.Pattern', to the specified 'RegEx.Concatenation'. (?:) :: RegEx.Pattern a -> RegEx.Concatenation a -> RegEx.Concatenation a-(?:) pattern	= (Repeatable.zeroOrOne pattern :)+(?:) pat	= (Repeatable.zeroOrOne pat :)  -- | A /non-greedy/ version of '?:'. (??:) :: RegEx.Pattern a -> RegEx.Concatenation a -> RegEx.Concatenation a-(??:) pattern	= (Repeatable.zeroOrOne' pattern :)+(??:) pat	= (Repeatable.zeroOrOne' pat :)  -- | Prepend a 'RegEx.Pattern', repeatable zero or more times, to the specified 'RegEx.Concatenation'. (*:) :: RegEx.Pattern a -> RegEx.Concatenation a -> RegEx.Concatenation a-(*:) pattern	= (Repeatable.zeroOrMore pattern :)+(*:) pat	= (Repeatable.zeroOrMore pat :)  -- | A /non-greedy/ version of '*:'. (*?:) :: RegEx.Pattern a -> RegEx.Concatenation a -> RegEx.Concatenation a-(*?:) pattern	= (Repeatable.zeroOrMore' pattern :)+(*?:) pat	= (Repeatable.zeroOrMore' pat :)  -- | Prepend a 'RegEx.Pattern', repeatable one or more times, to the specified 'RegEx.Concatenation'. (+:) :: RegEx.Pattern a -> RegEx.Concatenation a -> RegEx.Concatenation a-(+:) pattern	= (Repeatable.oneOrMore pattern :)+(+:) pat	= (Repeatable.oneOrMore pat :)  -- | A /non-greedy/ version of '+:'. (+?:) :: RegEx.Pattern a -> RegEx.Concatenation a -> RegEx.Concatenation a-(+?:) pattern	= (Repeatable.oneOrMore' pattern :)+(+?:) pat	= (Repeatable.oneOrMore' pat :)  -- | Prepend a 'RegEx.Pattern', repeated a range of times, to the specified 'RegEx.Concatenation'. ( #->#:) :: (RegEx.Pattern a, Repeatable.RepetitionBounds) -> RegEx.Concatenation a -> RegEx.Concatenation a-( #->#:) (pattern, bounds)	= (pattern ^#-># bounds :)+( #->#:) (pat, bounds)	= (pat ^#-># bounds :)  -- | A /non-greedy/ version of '#->#:'. ( #->#?:) :: (RegEx.Pattern a, Repeatable.RepetitionBounds) -> RegEx.Concatenation a -> RegEx.Concatenation a-( #->#?:) (pattern, bounds)	= (pattern ^#->#? bounds :)+( #->#?:) (pat, bounds)	= (pat ^#->#? bounds :)  -- | Prepend a 'RegEx.Pattern', repeated at least a specified number of times, to the specified 'RegEx.Concatenation'. ( #->:) :: (RegEx.Pattern a, Repeatable.Repetitions) -> RegEx.Concatenation a -> RegEx.Concatenation a-( #->:) (pattern, fewest)	= (pattern ^#-> fewest :)+( #->:) (pat, fewest)	= (pat ^#-> fewest :)  -- | A /non-greedy/ version of '#->:'. ( #->?:) :: (RegEx.Pattern a, Repeatable.Repetitions) -> RegEx.Concatenation a -> RegEx.Concatenation a-( #->?:) (pattern, fewest)	= (pattern ^#->? fewest :)+( #->?:) (pat, fewest)	= (pat ^#->? fewest :)  -- | Prepend a 'RegEx.Pattern', repeated a precise number of times, to the specified 'RegEx.Concatenation'. ( #:) :: (RegEx.Pattern a, Repeatable.Repetitions) -> RegEx.Concatenation a -> RegEx.Concatenation a-( #:) (pattern, r)	= (pattern ^# r :)+( #:) (pat, r)	= (pat ^# r :)  {- | 	* Sandwiches a 'RegEx.Concatenation' between optional 'Anchor.Anchor's to construct a 'RegEx.ExtendedRegEx'.
src-lib/RegExDot/RegEx.hs view
@@ -183,9 +183,9 @@ import qualified	Control.Arrow import qualified	Control.DeepSeq import qualified	Control.Parallel.Strategies-import qualified	Data.Char import qualified	Data.Foldable import qualified	Data.List+import qualified	Data.List.Extra import qualified	Data.Maybe import qualified	Data.Ord import qualified	RegExDot.Anchor			as Anchor@@ -240,7 +240,7 @@ 	readsPrec _ (' ' : s)	= reads s	-- Consume white-space. 	readsPrec _ ('\t' : s)	= reads s	-- Consume white-space. 	readsPrec _ s		= case reads s of-		[(extendedRegEx, s1)]	-> case dropWhile Data.Char.isSpace s1 of+		[(extendedRegEx, s1)]	-> case Data.List.Extra.trimStart s1 of 			'|' : s2	-> Control.Arrow.first (transformAlternatives (extendedRegEx :)) `map` reads s2 {-singleton-} 			_		-> [(MkAlternatives [extendedRegEx], s1)] 		_			-> []	-- No parse.@@ -296,7 +296,7 @@ 	readsPrec _ (' ' : s)	= reads s	-- Consume white-space. 	readsPrec _ ('\t' : s)	= reads s	-- Consume white-space. 	readsPrec _ ('(' : s)	= case {-Alternatives.-} reads s of-		[(alternatives, s1)]	-> case dropWhile Data.Char.isSpace s1 of+		[(alternatives, s1)]	-> case Data.List.Extra.trimStart s1 of 			')' : s2	-> [(CaptureGroup alternatives, s2)] 			_		-> []	-- No parse. 		_			-> []	-- No parse.@@ -334,7 +334,7 @@  -- | The set of distinct 'Meta.Meta', in the specified 'Pattern'. getDistinctMetaDataFromPattern :: Eq m => Pattern m -> MetaDataList m-getDistinctMetaDataFromPattern pattern	= case pattern of+getDistinctMetaDataFromPattern pat	= case pat of 	Require meta			-> [meta] 	CaptureGroup alternatives	-> getDistinctMetaDataFromAlternatives alternatives @@ -662,11 +662,9 @@ 			] = Nothing 			| otherwise	= {-#SCC "findMatchSlave" #-} let 				tailConsumptionProfile :: ConsumptionProfile.ConsumptionProfile-				tailConsumptionProfile@(-					ConsumptionProfile.MkConsumptionProfile {-						ConsumptionProfile.consumptionBounds	= (minConsumptionConcatenationTail, maybeMaxConsumptionConcatenationTail)-					}-				 ) = head accumulatedConsumptionProfilesTail	-- Extract the aggregate consumption-profile, of the tail of the 'Concatenation'.+				tailConsumptionProfile@ConsumptionProfile.MkConsumptionProfile {+					ConsumptionProfile.consumptionBounds	= (minConsumptionConcatenationTail, maybeMaxConsumptionConcatenationTail)+				} = head accumulatedConsumptionProfilesTail	-- Extract the aggregate consumption-profile, of the tail of the 'Concatenation'.  				maxDataAvailable :: ConsumptionBounds.DataLength 				maxDataAvailable	= inputDataLength - minConsumptionConcatenationTail	-- The maximum data available to match 'repeatablePatternHead'.@@ -897,7 +895,7 @@ 													concat $ replicate repetitions consumptionProfileConcatenationFromAlternative, 													concat $ replicate repetitions concatenationFromAlternative	-- Expand all repetitions of the single alternative. 												)-												| otherwise {-choice of Alternatives or has Anchor.Bow-}	=  let+												| otherwise {-choice of Alternatives or has Anchor.Bow-}	= let 													remainingRepetitions :: Repeatable.Repetitions 													remainingRepetitions	= pred repetitions	-- Expand just the first repetition of the set of 'Alternatives'. 
src-lib/RegExDot/Repeatable.hs view
@@ -90,7 +90,7 @@ import qualified	ToolShed.Data.Pair import qualified	ToolShed.SelfValidate -#if !defined(MIN_VERSION_base) || !MIN_VERSION_base(4,8,0)+#if !MIN_VERSION_base(4,8,0) import	Control.Applicative((<$>), (<*>)) #endif