stan-0.2.0.0: Haskell STatic ANalyser

Copyright | (c) 2020 Kowainik
License | MPL-2.0
Maintainer | Kowainik <xrom.xkov@gmail.com>
Safe Haskell | None
Language | Haskell2010

Stan.Cabal

Description

Functions to work with cabal files and cabal extension maps.

Synopsis

- createCabalExtensionsMap :: Bool -> [FilePath] -> [HieFile] -> IO (Map FilePath (Either ExtensionsError ParsedExtensions))
- usedCabalFiles :: [FilePath] -> IO [FilePath]
- mergeParsedExtensions :: Either ExtensionsError ParsedExtensions -> Either ExtensionsError ParsedExtensions -> ExtensionsResult

# Documentation

createCabalExtensionsMap #

Arguments

:: Bool | Do print into terminal?
-> [FilePath] | `.cabal` files
-> [HieFile] |
-> IO (Map FilePath (Either ExtensionsError ParsedExtensions)) |

From a given path to cabal files and `HieFile`s create the map from modules (that are in .cabal file) to the resulting parsed extensions for each.

usedCabalFiles :: [FilePath] -> IO [FilePath] #

Gets the list of `.cabal` file paths that were used in the project.

mergeParsedExtensions :: Either ExtensionsError ParsedExtensions -> Either ExtensionsError ParsedExtensions -> ExtensionsResult #