packages feed

Spintax 0.3.1 → 0.3.2

raw patch · 2 files changed

+17/−21 lines, 2 filesdep ~extraPVP ok

version bump matches the API change (PVP)

Dependency ranges changed: extra

API changes (from Hackage documentation)

Files

Spintax.cabal view
@@ -1,5 +1,5 @@ name:                Spintax-version:             0.3.1+version:             0.3.2 synopsis:            Random text generation based on spintax description:         Random text generation based on spintax with nested alternatives and empty options. homepage:            https://github.com/MichelBoucey/spintax@@ -7,7 +7,7 @@ license-file:        LICENSE author:              Michel Boucey maintainer:          michel.boucey@cybervisible.fr-copyright:           (c) 2016 - Michel Boucey+copyright:           (c) 2016-2017 - Michel Boucey category:            Text build-type:          Simple cabal-version:       >=1.10@@ -17,7 +17,7 @@   exposed-modules:   Text.Spintax   build-depends:     attoparsec   >= 0.12.1.6 && < 0.14                    , base         >= 4.7 && < 5-                   , extra        >= 1.4.3 && < 1.6+                   , extra        >= 1.4.3 && < 1.7                    , mtl          >= 2.2.1 && < 2.3                    , mwc-random   >= 0.13.3.2 && < 0.14                    , text         >= 1.2.2 && < 1.3
src/Text/Spintax.hs view
@@ -68,22 +68,18 @@               (\r -> (!!) as (r-1)) <$> uniformR (1,E.length _as) _g         go _ _ _ _ = parseFail          parseFail = fail msg--spinSyntax :: Parser T.Text-spinSyntax =-  openBrace <|> closeBrace <|> pipe <|> content-    where-      openBrace = string "{"-      closeBrace = string "}"-      pipe = string "|"-      content =-        takeWhile1 ctt-          where-            ctt '{' = False-            ctt '}' = False-            ctt '|' = False-            ctt _   = True--msg :: String-msg = "Spintax template parsing failure"+        msg = "Spintax template parsing failure"+        spinSyntax =+          openBrace <|> closeBrace <|> pipe <|> content+            where+              openBrace = string "{"+              closeBrace = string "}"+              pipe = string "|"+              content =+                takeWhile1 ctt+                  where+                    ctt '{' = False+                    ctt '}' = False+                    ctt '|' = False+                    ctt _   = True