ormolu-0.7.4.0: A formatter for Haskell source code
Safe HaskellSafe-Inferred
LanguageGHC2021

Ormolu.Fixity.Parser

Description

Parser for fixity maps.

Synopsis

Documentation

parseDotOrmolu Source #

Arguments

:: FilePath

Location of the file we are parsing (only for parse errors)

-> Text

File contents to parse

-> Either (ParseErrorBundle Text Void) (FixityOverrides, ModuleReexports)

Parse result

Parse textual representation of FixityOverrides.

parseFixityDeclaration Source #

Arguments

:: Text

Text to parse

-> Either (ParseErrorBundle Text Void) [(OpName, FixityInfo)]

Parse result

Parse a single self-contained fixity declaration.

parseModuleReexportDeclaration Source #

Arguments

:: Text

Text to parse

-> Either (ParseErrorBundle Text Void) (ModuleName, NonEmpty (Maybe PackageName, ModuleName))

Parse result

Parse a single self-contained module re-export declaration.

Raw parsers

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

Parse a single fixity declaration, such as

infixr 4 +++, >>>

Internal