chris-martin / bricks

Bricks is a lazy functional language based on Nix.
https://hackage.haskell.org/package/bricks
6 stars 1 forks source link

Escape sequences in indented strings #3

Closed chris-martin closed 6 years ago

chris-martin commented 6 years ago

https://nixos.org/nix/manual/#idm140737318144528

Since ${ and '' have special meaning in indented strings, you need a way to quote them. ${ can be escaped by prefixing it with '' (that is, two single quotes), i.e., ''${. '' can be escaped by prefixing it with ', i.e., '''. Finally, linefeed, carriage-return and tab characters can be written as ''\n, ''\r, ''\t.

chris-martin commented 6 years ago

That's real dumb, IMO, so I'm not going to to do that.

chris-martin commented 6 years ago

Nevermind, I no longer think indented strings need sequences at all. https://twitter.com/chris__martin/status/908056509115969536