Spintax-0.3.6.1: Random text generation based on spintax
Safe HaskellSafe-Inferred
LanguageHaskell2010

Text.Spintax

Synopsis

Documentation

spintax :: Text -> IO (Either String Text) Source #

Generate random texts based on a spinning syntax template, with nested alternatives and empty options.

λ> spintax "{{Oh my God|Awesome|Can't believe that}, {a|the}|A|The} {quick {and dirty |||}||}{brown |pink |grey |black |yellow }{fox|flea|elephant|panther|bear} jumps over {the|a} {lazy |smelly |sleepy |grouchy }{dog|cat|whale}{|||, that's {really |||}amazing}{.|!|...}"
 Right "Awesome, the quick pink fox jumps over a sleepy whale."