[Haskell-cafe] String rewriting

Roly Perera roly.perera at dynamicaspects.org
Thu May 20 09:49:59 EDT 2010


I'm looking for a simple way to rewrite strings according to simple
composable rules like:

replace "_" by "\\(\\hole\\)"
replace "-n" where n matches an integer by "^{n}"

so that I can import some pretty-printed output into a LaTeX alltt
environment. I'm guessing that this nice functional stream
transformation problem has been solved thousands of times. Could
anyone point me to a simple package that would do this for me?

many thanks,

More information about the Haskell-Cafe mailing list