Safe Haskell | None |
---|---|
Language | Haskell2010 |
- data NixDoc = NixDoc {}
- simpleExpr :: Doc -> NixDoc
- leastPrecedence :: Doc -> NixDoc
- appOpNonAssoc :: OperatorInfo
- wrapParens :: OperatorInfo -> NixDoc -> Doc
- prettyString :: NString NixDoc -> Doc
- prettyFormals :: Formals NixDoc -> Doc
- prettyParamSet :: FormalParamSet NixDoc -> Doc
- prettyBind :: Binding NixDoc -> Doc
- prettyKeyName :: NKeyName NixDoc -> Doc
- prettySelector :: NSelector NixDoc -> Doc
- prettySetArg :: (Text, Maybe NixDoc) -> Doc
- prettyOper :: NOperF NixDoc -> NixDoc
- 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
prettyString :: NString NixDoc -> Doc Source
prettyFormals :: Formals NixDoc -> Doc Source
prettyBind :: Binding NixDoc -> Doc Source
prettyKeyName :: NKeyName NixDoc -> Doc Source
prettySelector :: NSelector NixDoc -> Doc Source
prettyOper :: NOperF NixDoc -> NixDoc Source
prettyAtom :: NAtom -> NixDoc Source