Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- getDotOrmoluForSourceFile :: MonadIO m => FilePath -> m (FixityOverrides, ModuleReexports)
- parseFixityDeclarationStr :: String -> Either String [(OpName, FixityInfo)]
- parseModuleReexportDeclarationStr :: String -> Either String (ModuleName, NonEmpty (Maybe PackageName, ModuleName))
Documentation
getDotOrmoluForSourceFile Source #
:: MonadIO m | |
=> FilePath |
|
-> 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 #
:: String | Input to parse |
-> Either String [(OpName, FixityInfo)] | Parse result |
A wrapper around parseFixityDeclaration
for parsing individual fixity
definitions.
parseModuleReexportDeclarationStr Source #
:: String | Input to parse |
-> Either String (ModuleName, NonEmpty (Maybe PackageName, ModuleName)) | Parse result |
A wrapper around parseModuleReexportDeclaration
for parsing
a individual module reexport.