| Safe Haskell | None |
|---|---|
| Language | GHC2021 |
Ormolu.Utils.Cabal
Synopsis
- data CabalSearchResult
- data CabalInfo = CabalInfo {
- ciPackageName :: !PackageName
- ciDynOpts :: ![DynOption]
- ciDependencies :: !(Set PackageName)
- ciCabalFilePath :: !FilePath
- ciModules :: ![ModuleName]
- 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 #
The result of searching for a .cabal file.
Since: 0.5.3.0
Constructors
| 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 # | |
Defined in Ormolu.Utils.Cabal Methods showsPrec :: Int -> CabalSearchResult -> ShowS # show :: CabalSearchResult -> String # showList :: [CabalSearchResult] -> ShowS # | |
| Eq CabalSearchResult # | |
Defined in Ormolu.Utils.Cabal Methods (==) :: CabalSearchResult -> CabalSearchResult -> Bool # (/=) :: CabalSearchResult -> CabalSearchResult -> Bool # | |
Cabal information of interest to Ormolu.
Constructors
| CabalInfo | |
Fields
| |
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.
Constructors
| EnableExtension KnownExtension | Enable a known extension |
| DisableExtension KnownExtension | Disable a known extension |
| UnknownExtension String | An unknown extension, identified by the name of its |
Instances
Arguments
| :: 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.
Arguments
| :: MonadIO m | |
| => FilePath | Path to a Haskell source file in a project with a |
| -> m (Maybe FilePath) | Absolute path to the |
Find the path to an appropriate .cabal file for a Haskell source
file, if available.