| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Ormolu.Printer.Operators
Description
This module helps handle operator chains composed of different operators that may have different precedence and fixities.
Synopsis
- data OpTree ty op
- opTreeLoc :: HasSrcSpan l => OpTree (GenLocated l a) b -> SrcSpan
- reassociateOpTree :: (HasSrcSpan l, HasSrcSpan l') => (op -> Maybe RdrName) -> OpTree (GenLocated l ty) (GenLocated l' op) -> OpTree (GenLocated l ty) (GenLocated l' op)
Documentation
Intermediate representation of operator trees. It has two type
parameters: ty is the type of sub-expressions, while op is the type
of operators.
opTreeLoc :: HasSrcSpan l => OpTree (GenLocated l a) b -> SrcSpan Source #
Arguments
| :: (HasSrcSpan l, HasSrcSpan l') | |
| => (op -> Maybe RdrName) | How to get name of an operator |
| -> OpTree (GenLocated l ty) (GenLocated l' op) | Original |
| -> OpTree (GenLocated l ty) (GenLocated l' op) | Re-associated |