How are newlines, tabs represented in purescript?
2 answers
The question was based on an old version of the language and related tools. This is currently what you can do.
Use log
from purescript-console
( https://pursuit.purescript.org/packages/purescript-console/4.2.0/docs/Effect.Console#v:log ).
> import Effect.Console
> log "Hello\tSailor!"
Hello Sailor
unit
>
REPL (purs repl) is implicitly used show
to encode values as strings. To get around this, the log effect can be used (as Phil Freeman mentioned in his comment, although there is nothing unsafe to use log
).
0
source to share