ormolu-0.5.3.0: A formatter for Haskell source code

Safe Haskell | Safe-Inferred
Language | Haskell2010

Ormolu.Utils.Fixity

Synopsis

- getFixityOverridesForSourceFile :: MonadIO m => CabalInfo -> m FixityMap
- parseFixityDeclarationStr :: String -> Either String [(OpName, FixityInfo)]

# Documentation

getFixityOverridesForSourceFile Source #

Arguments

:: MonadIO m |
=> CabalInfo | `CabalInfo` already obtained for this source file
-> m FixityMap |

Attempt to locate and parse an `.ormolu` file. If it does not exist, empty fixity map is returned. This function maintains a cache of fixity overrides 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.