-
Notifications
You must be signed in to change notification settings - Fork 211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Interpolation and files imported as Text #2078
Comments
@mmhat: The import is working fine (meaning that the import is being imported as raw text). If the import had not been treated as raw text then the import would have failed (because The issue is that the Fortunately, this should be easy to fix by changing the pretty-printer to render the string to something like this:
|
Fixes #2078 Previously the pretty-printer would escape `'${` as `'''${` inside of a multi-line string, but that escape sequence is incorrect because `'''` is itself an escape sequence for `''`. The solution is to instead escape `'${` as `${"'"}${`
Consider this a Bash script called
test.sh
with the following content:Now if we run
dhall <<< "./test.sh as Text"
we getNote that
'${1}'
is not escaped properly. In particulardhall <<< "./test.sh as Text" | dhall
errors complaining that you can only interpolate Text.I expected that
as Text
imports thetest.sh
as raw text, i.e. without interpolation.The text was updated successfully, but these errors were encountered: