Copyright | (c) 2020-2022 Kowainik |
---|---|
License | MPL-2.0 |
Maintainer | Kowainik <xrom.xkov@gmail.com> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Functions to extract extensions from the .cabal
files.
Synopsis
- parseCabalFileExtensions :: FilePath -> IO (Map FilePath ParsedExtensions)
- parseCabalExtensions :: FilePath -> ByteString -> IO (Map FilePath ParsedExtensions)
- extractCabalExtensions :: GenericPackageDescription -> IO (Map FilePath ParsedExtensions)
- cabalToGhcExtension :: Extension -> Maybe (Either SafeHaskellExtension OnOffExtension)
- toGhcExtension :: KnownExtension -> Maybe Extension
- toSafeExtensions :: KnownExtension -> Maybe SafeHaskellExtension
Documentation
parseCabalExtensions :: FilePath -> ByteString -> IO (Map FilePath ParsedExtensions) Source #
Parse default extensions from a .cabal
file content. This
function takes a path to a .cabal
file. The path is only used for error
message. Pass empty string, if you don't have a path to .cabal
file.
Throws:
extractCabalExtensions :: GenericPackageDescription -> IO (Map FilePath ParsedExtensions) Source #
Extract Haskell Language extensions from a Cabal package description.
Bridge between Cabal and GHC extensions
cabalToGhcExtension :: Extension -> Maybe (Either SafeHaskellExtension OnOffExtension) Source #
Convert Extension
to OnOffExtension
or SafeHaskellExtension
.
toGhcExtension :: KnownExtension -> Maybe Extension Source #
Convert KnownExtension
to OnOffExtension
.
toSafeExtensions :: KnownExtension -> Maybe SafeHaskellExtension Source #
Convert KnownExtension
to SafeHaskellExtension
.