Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- data CabalSearchResult
- data CabalInfo = CabalInfo {
- ciPackageName :: !PackageName
- ciDynOpts :: ![DynOption]
- ciDependencies :: !(Set PackageName)
- ciCabalFilePath :: !FilePath
- data Extension
- getCabalInfoForSourceFile :: MonadIO m => FilePath -> m CabalSearchResult
- findCabalFile :: MonadIO m => FilePath -> m (Maybe FilePath)
- parseCabalInfo :: MonadIO m => FilePath -> FilePath -> m (Bool, CabalInfo)
Documentation
data CabalSearchResult Source #
The result of searching for a .cabal
file.
Since: 0.5.3.0
CabalNotFound | Cabal file could not be found |
CabalDidNotMention CabalInfo | Cabal file was found, but it did not mention the source file in question |
CabalFound CabalInfo | Cabal file was found and it mentions the source file in question |
Instances
Show CabalSearchResult Source # | |
Defined in Ormolu.Utils.Cabal showsPrec :: Int -> CabalSearchResult -> ShowS # show :: CabalSearchResult -> String # showList :: [CabalSearchResult] -> ShowS # | |
Eq CabalSearchResult Source # | |
Defined in Ormolu.Utils.Cabal (==) :: CabalSearchResult -> CabalSearchResult -> Bool # (/=) :: CabalSearchResult -> CabalSearchResult -> Bool # |
Cabal information of interest to Ormolu.
CabalInfo | |
|
Instances
This represents language extensions beyond a base Language
definition
(such as Haskell98
) that are supported by some implementations, usually
in some special mode.
Where applicable, references are given to an implementation's official documentation.
EnableExtension KnownExtension | Enable a known extension |
DisableExtension KnownExtension | Disable a known extension |
UnknownExtension String | An unknown extension, identified by the name of its |
Instances
getCabalInfoForSourceFile Source #
:: MonadIO m | |
=> FilePath | Haskell source file |
-> m CabalSearchResult | Extracted cabal info, if any |
Locate a .cabal
file corresponding to the given Haskell source file
and obtain CabalInfo
from it.