Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data NixDoc = NixDoc {}
- simpleExpr :: Doc -> NixDoc
- leastPrecedence :: Doc -> NixDoc
- appOpNonAssoc :: OperatorInfo
- wrapParens :: OperatorInfo -> NixDoc -> Doc
- prettyString :: NString NixDoc -> Doc
- prettyParams :: Params NixDoc -> Doc
- prettyParamSet :: ParamSet NixDoc -> Doc
- prettyBind :: Binding NixDoc -> Doc
- prettyKeyName :: NKeyName NixDoc -> Doc
- prettySelector :: NAttrPath NixDoc -> Doc
- atomText :: NAtom -> Text
- prettyAtom :: NAtom -> NixDoc
- prettyNix :: NExpr -> Doc
Documentation
This type represents a pretty printed nix expression together with some information about the expression.
NixDoc | |
|
simpleExpr :: Doc -> NixDoc Source #
A simple expression is never wrapped in parentheses. The expression behaves as if its root operator had a precedence higher than all other operators (including function application).
leastPrecedence :: Doc -> NixDoc Source #
An expression that behaves as if its root operator had a precedence lower than all other operators. That ensures that the expression is wrapped in parantheses in almost always, but it's still rendered without parentheses in cases where parentheses are never required (such as in the LHS of a binding).
wrapParens :: OperatorInfo -> NixDoc -> Doc Source #
prettyAtom :: NAtom -> NixDoc Source #