bash icon indicating copy to clipboard operation
bash copied to clipboard

Extend the Expression type with a constructor for unescaped literals

Open cgohla opened this issue 3 years ago • 0 comments

We add UnescapedLiteral :: ByteString -> Expression t as an escape hatch.

As an example, this is needed to produce this piece of Bash output:

bar="([name]=Bart [age]=12)"
declare -A foo="$bar"

The reason we need the escape hatch here is that the Dict constructor of the Assignment type imposes too much structure on the RHS of the assignment.

cgohla avatar Mar 26 '22 15:03 cgohla