fourmolu-0.16.0.0: A formatter for Haskell source code
Safe HaskellSafe-Inferred
LanguageGHC2021

Ormolu.Printer.Meat.Declaration.OpTree

Description

Printing of operator trees.

Synopsis

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.