prettyprint: align inherit args

This commit is contained in:
Domen Kožar 2018-01-28 21:45:38 +00:00
parent a28a8397cd
commit afa7585009
No known key found for this signature in database
GPG key ID: C2FFBCAFD2C24246

View file

@ -95,7 +95,7 @@ prettyParamSet params = encloseSep (lbrace <> space) (align rbrace) sep prettyAr
prettyBind :: Binding NixDoc -> Doc
prettyBind (NamedVar n v) = prettySelector n <+> equals <+> withoutParens v <> semi
prettyBind (Inherit s ns)
= text "inherit" <+> scope <> fillSep (map prettyKeyName ns) <> semi
= text "inherit" <+> scope <> align (fillSep (map prettyKeyName ns)) <> semi
where scope = maybe empty ((<> space) . parens . withoutParens) s
prettyKeyName :: NKeyName NixDoc -> Doc