ormolu-0.8.0.0: A formatter for Haskell source code

Safe Haskell | None
Language | GHC2021

Ormolu.Printer.Meat.Declaration.Value

Synopsis

- p_valDecl :: HsBind GhcPs -> R ()
- p_pat :: Pat GhcPs -> R ()
- p_hsExpr :: HsExpr GhcPs -> R ()
- p_hsUntypedSplice :: SpliceDecoration -> HsUntypedSplice GhcPs -> R ()
- data IsApplicand
  - = Applicand
  - | NotApplicand
- p_hsExpr' :: IsApplicand -> BracketStyle -> HsExpr GhcPs -> R ()
- p_hsCmdTop :: BracketStyle -> HsCmdTop GhcPs -> R ()
- exprPlacement :: HsExpr GhcPs -> Placement
- cmdTopPlacement :: HsCmdTop GhcPs -> Placement

# Documentation

p_valDecl :: HsBind GhcPs -> R () Source #

p_pat :: Pat GhcPs -> R () Source #

p_hsExpr :: HsExpr GhcPs -> R () Source #

p_hsUntypedSplice :: SpliceDecoration -> HsUntypedSplice GhcPs -> R () Source #

data IsApplicand Source #

An applicand is the left-hand side in a function application, i.e. `f` in `f a`. We need to track this in order to add extra identation in cases like

    foo =
      do
          succ
        1

Constructors

Applicand |
NotApplicand |

p_hsExpr' :: IsApplicand -> BracketStyle -> HsExpr GhcPs -> R () Source #

p_hsCmdTop :: BracketStyle -> HsCmdTop GhcPs -> R () Source #

Print a top-level command.

exprPlacement :: HsExpr GhcPs -> Placement Source #

Check if given expression has a hanging form.

cmdTopPlacement :: HsCmdTop GhcPs -> Placement Source #

Determine placement of a top level command.