nikita-volkov / neat-interpolation

A quasiquoter for neat and simple multiline text interpolation
http://hackage.haskell.org/package/neat-interpolation
MIT License
55 stars 16 forks source link

Document escaping ${foo} #12

Closed Profpatsch closed 8 years ago

Profpatsch commented 8 years ago

I searched for a way to escape ${foo} (since nix expressions use ${} for string splicing themselves) and I found $${foo} worked. Maybe document that?

nikita-volkov commented 8 years ago

Can you make a PR please?

Profpatsch commented 8 years ago

Can you make a PR please?

Yes, I need to know two things first:

  1. Is that intended behaviour?
  2. Do you set the escape in the module or is it inherited from the way QuasiQuotes work?
nikita-volkov commented 8 years ago

It's intended. The dollar escaping is achieved with double dollar:

https://github.com/nikita-volkov/neat-interpolation/blob/master/library/NeatInterpolation/Parsing.hs#L24