Pretty printer was dropping antiquoted selector paths

This commit is contained in:
John Wiegley 2018-04-19 01:20:17 -07:00
parent 9950d917a0
commit aad7bcd525

View file

@ -133,7 +133,8 @@ prettyKeyName (StaticKey key _)
| HashSet.member key reservedNames = dquotes $ text $ unpack key
prettyKeyName (StaticKey key _) = text . unpack $ key
prettyKeyName (DynamicKey key) =
runAntiquoted (DoubleQuoted [Plain "\n"]) prettyString withoutParens key
runAntiquoted (DoubleQuoted [Plain "\n"])
prettyString ((text "$" <>) . braces . withoutParens) key
prettySelector :: NAttrPath NixDoc -> Doc
prettySelector = hcat . punctuate dot . map prettyKeyName . NE.toList