ormolu-0.5.3.0: A formatter for Haskell source code

Safe Haskell | Safe-Inferred
Language | Haskell2010

Ormolu.Fixity.Parser

Contents

- Raw parsers

Description

Parser for fixity maps.

Synopsis

- parseFixityMap :: FilePath -> Text -> Either (ParseErrorBundle Text Void) FixityMap
- parseFixityDeclaration :: Text -> Either (ParseErrorBundle Text Void) [(OpName, FixityInfo)]
- pFixity :: Parser [(OpName, FixityInfo)]
- pOperator :: Parser OpName

# Documentation

parseFixityMap Source #

Arguments

:: FilePath | Location of the file we are parsing (only for parse errors)
-> Text | File contents to parse
-> Either (ParseErrorBundle Text Void) FixityMap | Parse result

Parse textual representation of a `FixityMap`.

parseFixityDeclaration Source #

Arguments

:: Text | Expression to parse
-> Either (ParseErrorBundle Text Void) [(OpName, FixityInfo)] | Parse result

Parse a single self-contained fixity declaration.

# Raw parsers

pFixity :: Parser [(OpName, FixityInfo)] Source #

Parse a single fixity declaration, such as

    infixr 4 +++, >>>

pOperator :: Parser OpName Source #

See https://www.haskell.org/onlinereport/haskell2010/haskellch2.html