Copyright | (c) 2020-2022 Kowainik |
---|---|
License | MPL-2.0 |
Maintainer | Kowainik <[email protected]> |
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Extensions.Package
Contents
Description
Parse Haskell Language Extensions.
Synopsis
- getPackageExtentions :: FilePath -> IO (Map FilePath ExtensionsResult)
- getPackageExtentionsBySources :: FilePath -> Map FilePath ByteString -> IO (Map FilePath ExtensionsResult)
- getModuleAndCabalExtentions :: FilePath -> FilePath -> IO (Either ExtensionsError CabalAndModuleExtensions)
- getModuleExtentions :: FilePath -> FilePath -> IO ExtensionsResult
- getModuleAndCabalExtentionsBySource :: FilePath -> FilePath -> ByteString -> IO (Either ExtensionsError CabalAndModuleExtensions)
- getModuleExtentionsBySource :: FilePath -> FilePath -> ByteString -> IO ExtensionsResult
Package modules
Arguments
:: FilePath | Path to |
-> IO (Map FilePath ExtensionsResult) |
By given path to .cabal
file, analyse extensions for each Haskell module
and return the corresponding Map
with ExtensionsResult
s.
Throws:
getPackageExtentionsBySources Source #
Arguments
:: FilePath | Path to |
-> Map FilePath ByteString | Path to modules with corresponding sources. |
-> IO (Map FilePath ExtensionsResult) |
By given path to .cabal
file and Map
of sources of all Haskell
modules, analyse extensions for each Haskell module and return the corresponding
Map
with ExtensionsResult
s.
Single module
getModuleAndCabalExtentions Source #
Arguments
:: FilePath | Path to |
-> FilePath | Path to Haskell module file. |
-> IO (Either ExtensionsError CabalAndModuleExtensions) |
By given path to .cabal
file and path to Haskell module of the
corresponding package, analyse and return extensions for the
given module separately from .cabal file and from the module itself.
Arguments
:: FilePath | Path to |
-> FilePath | Path to Haskell module file. |
-> IO ExtensionsResult |
By given path to .cabal
file and path to Haskell module of the
corresponding package, analyse and return summary set of extensions for the
given module.
getModuleAndCabalExtentionsBySource Source #
Arguments
:: FilePath | Maybe path to |
-> FilePath | Path to the module's source (needed for matching with cabal file). |
-> ByteString | Source of a Haskell module file. |
-> IO (Either ExtensionsError CabalAndModuleExtensions) |
By given path to .cabal
file and path to Haskell module of the
corresponding package, analyse and return extensions extensions for the
given module separately from .cabal file and from the module itself.
getModuleExtentionsBySource Source #
Arguments
:: FilePath | Maybe path to |
-> FilePath | Path to the module's source (needed for matching with cabal file). |
-> ByteString | Source of a Haskell module file. |
-> IO ExtensionsResult |
By given path to .cabal
file and path to Haskell module of the
corresponding package, analyse and return combined set of extensions for the
given module.