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

Ormolu.Utils.Fixity

Synopsis

Documentation

getDotOrmoluForSourceFile Source #

Arguments

:: MonadIO m 
=> FilePath

CabalInfo already obtained for this source file

-> m (FixityOverrides, ModuleReexports) 

Attempt to locate and parse an .ormolu file. If it does not exist, default fixity map and module reexports are returned. This function maintains a cache of fixity overrides and module re-exports where cabal file paths act as keys.

parseFixityDeclarationStr Source #

Arguments

:: String

Input to parse

-> Either String [(OpName, FixityInfo)]

Parse result

A wrapper around parseFixityDeclaration for parsing individual fixity definitions.

parseModuleReexportDeclarationStr Source #

Arguments

:: String

Input to parse

-> Either String (ModuleName, NonEmpty (Maybe PackageName, ModuleName))

Parse result

A wrapper around parseModuleReexportDeclaration for parsing a individual module reexport.