ormolu-0.5.3.0: A formatter for Haskell source code

Safe Haskell | Safe-Inferred
Language | Haskell2010

Ormolu.Printer.Meat.Declaration.OpTree

Description

Printing of operator trees.

Synopsis

- p_exprOpTree :: BracketStyle -> OpTree (LHsExpr GhcPs) (OpInfo (LHsExpr GhcPs)) -> R ()
- exprOpTree :: LHsExpr GhcPs -> OpTree (LHsExpr GhcPs) (LHsExpr GhcPs)
- p_cmdOpTree :: BracketStyle -> OpTree (LHsCmdTop GhcPs) (OpInfo (LHsExpr GhcPs)) -> R ()
- cmdOpTree :: LHsCmdTop GhcPs -> OpTree (LHsCmdTop GhcPs) (LHsExpr GhcPs)
- p_tyOpTree :: OpTree (LHsType GhcPs) (OpInfo (LocatedN RdrName)) -> R ()
- tyOpTree :: LHsType GhcPs -> OpTree (LHsType GhcPs) (LocatedN RdrName)
- getOpName :: HsExpr GhcPs -> Maybe RdrName
- getOpNameStr :: RdrName -> String

# Documentation

p_exprOpTree Source #

Arguments

:: BracketStyle | Bracket style to use
-> OpTree (LHsExpr GhcPs) (OpInfo (LHsExpr GhcPs)) | N-ary `OpTree` to render, enhanced with information regarding operator fixity
-> R () |

Print an operator tree where leaves are values.

exprOpTree :: LHsExpr GhcPs -> OpTree (LHsExpr GhcPs) (LHsExpr GhcPs) Source #

Convert a `LHsExpr` containing an operator tree to the `OpTree` intermediate representation.

p_cmdOpTree Source #

Arguments

:: BracketStyle | Bracket style to use
-> OpTree (LHsCmdTop GhcPs) (OpInfo (LHsExpr GhcPs)) | N-ary OpTree to render, enhanced with information regarding operator fixity
-> R () |

Print an operator tree where leaves are commands.

cmdOpTree :: LHsCmdTop GhcPs -> OpTree (LHsCmdTop GhcPs) (LHsExpr GhcPs) Source #

Convert a `LHsCmdTop` containing an operator tree to the `OpTree` intermediate representation.

p_tyOpTree Source #

Arguments

:: OpTree (LHsType GhcPs) (OpInfo (LocatedN RdrName)) | N-ary `OpTree` to render, enhanced with information regarding operator fixity
-> R () |

Print an operator tree where leaves are types.

tyOpTree :: LHsType GhcPs -> OpTree (LHsType GhcPs) (LocatedN RdrName) Source #

Convert a LHsType containing an operator tree to the `OpTree` intermediate representation.

getOpName :: HsExpr GhcPs -> Maybe RdrName Source #

Extract the operator name of the specified `HsExpr` if this expression corresponds to an operator.

getOpNameStr :: RdrName -> String Source #

Convert an operator name to a `String`.