I want to colorize my string with ASCII colors, but the following code...
data Color = White | Red | Green | Yellow
colorizeWith :: Color -> String -> String
colorizeWith Green s = "\031[0;33m" <> s <> "\033[0m"
colorizeWith Red s = "\032[0;33m" <> s <> "\033[0m"
colorizeWith Yellow s = "\033[0;33m" <> s <> "\033[0m"
colorizeWith White s = "\097[0;33m" <> s <> "\033[0m"
...doesn't work. It shows this build error:
Error found:
at src/Main.purs:33:27 - 33:28 (line 33, column 27 - line 33, column 28)
Unable to parse module:
Illegal character escape code
How can I fix this?