Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
This module contains some commonly used function for working
with Doc
s and pretty printing.
Synopsis
- showDoc :: Doc ann -> Text
- wrapParens :: Doc ann -> Doc ann
- arrow :: Doc ann
- mkQualified :: Text -> Doc ann
- typeWithVarsDoc :: Bool -> Text -> [Text] -> Doc ann
- qualifiedTypeWithVarsDoc :: Text -> [Text] -> Doc ann
Documentation
wrapParens :: Doc ann -> Doc ann Source #
Wraps given document in parens if it contains more than single word.
mkQualified :: Text -> Doc ann Source #
Add qualified prefix to the type names or functions:
T.MyType T.showMyType
Here we add T.
prefix as we only use qualified imports
for Types as T
module.
Creates a Doc
of the type with its type variables (if any).