packages feed

regex 0.13.0.0 → 0.14.0.0

raw patch · 9 files changed

+58/−60 lines, 9 filesPVP ok

version bump matches the API change (PVP)

API changes (from Hackage documentation)

- Text.RE.REOptions: class IsOption o r c e | e -> r, c -> e, e -> c, r -> c, c -> r, r -> e
- Text.RE.REOptions: makeREOptions :: IsOption o r c e => o -> REOptions_ r c e
- Text.RE.Tools: findMatches :: IsRegex re s => FindMethods s -> re -> s -> IO [s]
- Text.RE.Tools: findMatches' :: IsRegex re s => FindMethods s -> ([s] -> [s]) -> (Match s -> Bool) -> re -> s -> IO [s]
- Text.RE.Tools.Find: findMatches :: IsRegex re s => FindMethods s -> re -> s -> IO [s]
- Text.RE.Tools.Find: findMatches' :: IsRegex re s => FindMethods s -> ([s] -> [s]) -> (Match s -> Bool) -> re -> s -> IO [s]
- Text.RE.ZeInternals.TDFA: instance Text.RE.REOptions.IsOption () Text.RE.ZeInternals.TDFA.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
- Text.RE.ZeInternals.TDFA: instance Text.RE.REOptions.IsOption (Text.RE.REOptions.Macros Text.RE.ZeInternals.TDFA.RE) Text.RE.ZeInternals.TDFA.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
- Text.RE.ZeInternals.TDFA: instance Text.RE.REOptions.IsOption Text.RE.REOptions.SimpleREOptions Text.RE.ZeInternals.TDFA.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
- Text.RE.ZeInternals.TDFA: instance Text.RE.REOptions.IsOption Text.RE.ZeInternals.TDFA.REOptions Text.RE.ZeInternals.TDFA.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
- Text.RE.ZeInternals.TDFA: instance Text.RE.REOptions.IsOption Text.Regex.TDFA.Common.CompOption Text.RE.ZeInternals.TDFA.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
- Text.RE.ZeInternals.TDFA: instance Text.RE.REOptions.IsOption Text.Regex.TDFA.Common.ExecOption Text.RE.ZeInternals.TDFA.RE Text.Regex.TDFA.Common.CompOption Text.Regex.TDFA.Common.ExecOption
+ Text.RE.Tools: findMatches_ :: IsRegex re s => FindMethods s -> re -> s -> IO [s]
+ Text.RE.Tools: findMatches_' :: IsRegex re s => FindMethods s -> ([s] -> [s]) -> (Match s -> Bool) -> re -> s -> IO [s]
+ Text.RE.Tools.Find: findMatches_ :: IsRegex re s => FindMethods s -> re -> s -> IO [s]
+ Text.RE.Tools.Find: findMatches_' :: IsRegex re s => FindMethods s -> ([s] -> [s]) -> (Match s -> Bool) -> re -> s -> IO [s]
+ Text.RE.ZeInternals.TDFA: class IsOption o
+ Text.RE.ZeInternals.TDFA: instance Text.RE.ZeInternals.TDFA.IsOption ()
+ Text.RE.ZeInternals.TDFA: instance Text.RE.ZeInternals.TDFA.IsOption (Text.RE.REOptions.Macros Text.RE.ZeInternals.TDFA.RE)
+ Text.RE.ZeInternals.TDFA: instance Text.RE.ZeInternals.TDFA.IsOption Text.RE.REOptions.SimpleREOptions
+ Text.RE.ZeInternals.TDFA: instance Text.RE.ZeInternals.TDFA.IsOption Text.RE.ZeInternals.TDFA.REOptions
+ Text.RE.ZeInternals.TDFA: instance Text.RE.ZeInternals.TDFA.IsOption Text.Regex.TDFA.Common.CompOption
+ Text.RE.ZeInternals.TDFA: instance Text.RE.ZeInternals.TDFA.IsOption Text.Regex.TDFA.Common.ExecOption
+ Text.RE.ZeInternals.TDFA: makeREOptions :: IsOption o => o -> REOptions
- Text.RE.ZeInternals.TDFA: compileRegexWithOptions :: (IsOption o RE CompOption ExecOption, Functor m, Monad m) => o -> String -> m RE
+ Text.RE.ZeInternals.TDFA: compileRegexWithOptions :: (IsOption o, Functor m, Monad m) => o -> String -> m RE
- Text.RE.ZeInternals.TDFA: escapeWithOptions :: (IsOption o RE CompOption ExecOption, Functor m, Monad m) => o -> (String -> String) -> String -> m RE
+ Text.RE.ZeInternals.TDFA: escapeWithOptions :: (IsOption o, Functor m, Monad m) => o -> (String -> String) -> String -> m RE

Files

README.markdown view
@@ -74,9 +74,11 @@      ☒  2017-03-31  v0.12.0.0 [Move IsRegex into Text.RE](https://github.com/iconnect/regex/milestone/16) -    ☒  2017-04-02  v0.13.0.0 [Protect findCaptureID and add Find, re-sort-imports, tutorials](https://github.com/iconnect/regex/milestone/17)+    ☒  2017-04-03  v0.13.0.0 [Protect findCaptureID and add Find, re-sort-imports](https://github.com/iconnect/regex/milestone/17) -    ☐  2017-04-03  v1.0.0.0  [First stable release](https://github.com/iconnect/regex/milestone/3)+    ☒  2017-04-04  v0.14.0.0 [Move IsOption, rename Find functions](https://github.com/iconnect/regex/milestone/18)++    ☐  2017-04-10  v1.0.0.0  [First stable release](https://github.com/iconnect/regex/milestone/3)      ☐  2017-08-31  v2.0.0.0  [Fast text replacement with benchmarks](https://github.com/iconnect/regex/milestone/4) 
Text/RE.hs view
@@ -37,6 +37,8 @@   , IsRegex(..)   , searchReplaceAll   , searchReplaceFirst+  -- * IsRegex Instances+  -- $instances   , module Text.RE.TDFA   ) where @@ -100,3 +102,6 @@ -- getting the source @t@ back again. The 'Replace' superclass of -- @IsRegex@ contains a useful toolkit for converting between @t@ and -- 'String' abd @Text@.++-- $instances+-- This module import just imports the @IsRegex TDFA s@ instances.
Text/RE/REOptions.lhs view
@@ -15,8 +15,6 @@   -- * RE Options     SimpleREOptions(..)   , REOptions_(..)-  -- * The IsOption Class-  , IsOption(..)   -- * The Macro Tables   , Macros   , MacroID(..)@@ -70,19 +68,6 @@     , optionsExec :: !e             -- ^ the back end execution-time options     }   deriving (Show)-\end{code}---The IsOption Class---------------------\begin{code}--- | a number of types can be used to encode 'REOptions_', each of which--- is made a member of this class-class IsOption o r c e |-    e -> r, c -> e , e -> c, r -> c, c -> r, r -> e where-  -- | convert the @o@ type into an @REOptions r c e@-  makeREOptions :: o -> REOptions_ r c e \end{code}  
Text/RE/Tools.hs view
@@ -21,8 +21,8 @@   , alex'   -- * Find   , FindMethods(..)-  , findMatches-  , findMatches'+  , findMatches_+  , findMatches_'   -- * IsRegex   , IsRegex(..)   -- * Edit
Text/RE/Tools/Find.lhs view
@@ -8,8 +8,8 @@  module Text.RE.Tools.Find   ( FindMethods(..)-  , findMatches-  , findMatches'+  , findMatches_+  , findMatches_'   -- * Text.RE   , module Text.RE   ) where@@ -34,21 +34,21 @@   -- | recursively list all files whose filename matches given RE,--- sorting the list into ascending order;--- if the argument path has a trailing '/' then it will be removed-findMatches :: IsRegex re s => FindMethods s -> re -> s -> IO [s]-findMatches fm = findMatches' fm L.sort matched+-- sorting the list into ascending order; if the argument path has a+-- trailing '/' then it will be removed+findMatches_ :: IsRegex re s => FindMethods s -> re -> s -> IO [s]+findMatches_ fm = findMatches_' fm L.sort matched  -- | recursively list all files whose filename matches given RE,--- using the given function to determine which matches to accept;-findMatches' :: IsRegex re s-             => FindMethods s         -- ^ the directory and filepath methods-             -> ([s]->[s])            -- ^ result post-processing function-             -> (Match s->Bool)       -- ^ filtering function-             -> re                    -- ^ re to be matched against the leaf filename-             -> s                     -- ^ root directory of the search-             -> IO [s]-findMatches' fm srt tst re fp = srt <$> find_ fm tst re (packR "") fp+-- using the given function to determine which matches to accept+findMatches_' :: IsRegex re s+              => FindMethods s         -- ^ the directory and filepath methods+              -> ([s]->[s])            -- ^ result post-processing function+              -> (Match s->Bool)       -- ^ filtering function+              -> re                    -- ^ re to be matched against the leaf filename+              -> s                     -- ^ root directory of the search+              -> IO [s]+findMatches_' fm srt tst re fp = srt <$> find_ fm tst re (packR "") fp  find_ :: IsRegex re s       => FindMethods s
Text/RE/ZeInternals/SearchReplace/TDFAEdPrime.hs view
@@ -22,7 +22,6 @@ import           Text.RE.ZeInternals.SearchReplace import           Text.RE.ZeInternals.TDFA import           Text.RE.ZeInternals.Types.IsRegex-import           Text.Regex.TDFA   -- | construct a quasi quoter from a casting function and @Just sro@@@ -52,11 +51,9 @@ unsafe_compile_sr_simple sro =     unsafe_compile_sr $ unpackSimpleREOptions sro -unsafe_compile_sr :: ( IsOption o RE CompOption ExecOption-                              , IsRegex RE s-                              )-                           => o-                           -> String-                           -> SearchReplace RE s+unsafe_compile_sr :: (IsOption o, IsRegex RE s)+                  => o+                  -> String+                  -> SearchReplace RE s unsafe_compile_sr os =     unsafeCompileSearchReplace_ packR $ compileRegexWithOptions os
Text/RE/ZeInternals/TDFA.hs view
@@ -25,7 +25,8 @@   , reSource   , reCaptureNames   , reRegex-  -- * REOptions Type+  -- * IsOptions Class and REOptions Type+  , IsOption(..)   , REOptions   , defaultREOptions   , noPreludeREOptions@@ -117,29 +118,35 @@   --------------------------------------------------------------------------- REOptions+-- IsOption & REOptions ------------------------------------------------------------------------ +-- | a number of types can be used to encode 'REOptions_', each of which+-- is made a member of this class+class IsOption o where+  -- | convert the @o@ type into an @REOptions@+  makeREOptions :: o -> REOptions+ -- | and the REOptions for this back end (see "Text.RE.REOptions" -- for details) type REOptions = REOptions_ RE CompOption ExecOption -instance IsOption SimpleREOptions RE CompOption ExecOption where+instance IsOption SimpleREOptions where   makeREOptions    = unpackSimpleREOptions -instance IsOption (Macros RE) RE CompOption ExecOption where+instance IsOption (Macros RE) where   makeREOptions ms = REOptions ms def_comp_option def_exec_option -instance IsOption CompOption  RE CompOption ExecOption where+instance IsOption CompOption where   makeREOptions co = REOptions prelude co def_exec_option -instance IsOption ExecOption  RE CompOption ExecOption where+instance IsOption ExecOption where   makeREOptions eo = REOptions prelude def_comp_option eo -instance IsOption REOptions     RE CompOption ExecOption where+instance IsOption REOptions where   makeREOptions    = id -instance IsOption ()          RE CompOption ExecOption where+instance IsOption () where   makeREOptions _  = unpackSimpleREOptions minBound  -- | the default 'REOptions'@@ -188,10 +195,7 @@  -- | compile a 'String' into a 'RE' using the given @SimpleREOptions@, -- generating an error if the RE is not well formed-compileRegexWithOptions :: ( IsOption o RE CompOption ExecOption-                           , Functor m-                           , Monad   m-                           )+compileRegexWithOptions :: (IsOption o, Functor m, Monad   m)                         => o                         -> String                         -> m RE@@ -257,10 +261,7 @@  -- | a variant of 'escapeWith' that allows an 'IsOption' RE option -- to be specified-escapeWithOptions :: ( IsOption o RE CompOption ExecOption-                     , Functor m-                     , Monad m-                     )+escapeWithOptions :: ( IsOption o, Functor m, Monad m)                   => o                   -> (String->String)                   -> String@@ -370,7 +371,7 @@   where     os = unpackSimpleREOptions sro -unsafeCompileRegex :: IsOption o RE CompOption ExecOption+unsafeCompileRegex :: IsOption o                    => o                    -> String                    -> RE
changelog view
@@ -1,5 +1,13 @@ -*-change-log-*- +0.14.0.0 Chris Dornan <chris.dornan@irisconnect.co.uk> 2017-04-05+  * Move IsOption into the back ends (#115)+  * Rename Find functions (#116)+  * re-gen-cabals: 'sdist' to prepare final commit message (#117)+  * re-prep: 'blog-badge' to update the blog badge (#118)+  * re-prep: include_code_pp for all .lhs files (#119)+  * re-gen-cabals: do 'gen' after 'bump-version' (#120)+ 0.13.0.0 Chris Dornan <chris.dornan@irisconnect.co.uk> 2017-04-03   * Add a Find Tool (#106)   * TestBench to export Text.RE (#107)
regex.cabal view
@@ -1,5 +1,5 @@ Name:                   regex-Version:                0.13.0.0+Version:                0.14.0.0 Synopsis:               Toolkit for regex-base Description:            A regular expression toolkit for regex-base with                         compile-time checking of RE syntax, data types for@@ -32,7 +32,7 @@ Source-Repository this     Type:               git     Location:           https://github.com/iconnect/regex.git-    Tag:                0.13.0.0+    Tag:                0.14.0.0