Safe Haskell | None |
---|---|
Language | Haskell2010 |
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}, {a|the}|A|The} {quick {and dirty |||}||}{brown |pink |grey |}{fox|flea|elephant} jumps over {the|a} {lazy |smelly |sleepy |}{dog|cat|whale}{.|!|...}" Right "Awesome, the quick pink fox jumps over a sleepy whale."