fourmolu-0.18.0.0: A formatter for Haskell source code

Safe Haskell | None
Language | GHC2021

Ormolu.Printer.Meat.Common

Description

Rendering of commonly useful bits.

Synopsis

- data FamilyStyle
  - = Associated
  - | Free
- p_hsmodName :: ModuleName -> R ()
- p_ieWrappedName :: IEWrappedName GhcPs -> R ()
- p_rdrName :: LocatedN RdrName -> R ()
- p_qualName :: ModuleName -> OccName -> R ()
- p_infixDefHelper :: Bool -> Bool -> R () -> [R ()] -> R ()
- p_hsDoc :: HaddockStyle -> Choice "endNewline" -> LHsDoc GhcPs -> R ()
- p_hsDoc' :: HaddockPrintStyle -> HaddockStyle -> Choice "endNewline" -> LHsDoc GhcPs -> R ()
- p_sourceText :: SourceText -> R ()
- p_namespaceSpec :: NamespaceSpecifier -> R ()
- p_arrow :: (mult -> R ()) -> HsArrowOf mult GhcPs -> R ()

# Documentation

data FamilyStyle Source #

Data and type family style.

Constructors

Associated | Declarations in type classes
Free | Top-level declarations

p_hsmodName :: ModuleName -> R () Source #

Outputs the name of the module-like entity, preceeded by the correct prefix ("module" or "signature").

p_ieWrappedName :: IEWrappedName GhcPs -> R () Source #

p_rdrName :: LocatedN RdrName -> R () Source #

Render a ``LocatedN` `RdrName``.

p_qualName :: ModuleName -> OccName -> R () Source #

p_infixDefHelper Source #

Arguments

:: Bool | Whether to format in infix style
-> Bool | Whether to bump indentation for arguments
-> R () | How to print the operator/name
-> [R ()] | How to print the arguments
-> R () |

A helper for formatting infix constructions in lhs of definitions.

p_hsDoc Source #

Arguments

:: HaddockStyle | Haddock style
-> Choice "endNewline" | Finish the doc string with a newline
-> LHsDoc GhcPs | The `LHsDoc` to render
-> R () |

Print a Haddock.

p_hsDoc' Source #

Arguments

:: HaddockPrintStyle | 'haddock-style' configuration option
-> HaddockStyle | Haddock style
-> Choice "endNewline" | Finish the doc string with a newline
-> LHsDoc GhcPs | The `LHsDoc` to render
-> R () |

Print a Haddock.

p_sourceText :: SourceText -> R () Source #

p_namespaceSpec :: NamespaceSpecifier -> R () Source #

p_arrow :: (mult -> R ()) -> HsArrowOf mult GhcPs -> R () Source #