Safe Haskell | None |
---|---|
Language | Haskell2010 |
Utilities for parsing imports from Haskell source files.
Synopsis
- type Parser = Parsec Void String
- padded :: Parser a -> Parser a
- quoted :: Parser a -> Parser a
- ptoken :: String -> Parser String
- operator :: Parser String
- symbolChars :: Parser String
- symbol :: Parser String
- pkgName :: Parser String
- oneImport :: Parser ModuleName
- exposedModules :: Parser (Set ModuleName)
- parseFileImports :: FilePath -> IO (Set ModuleName)
- parseExposedModules :: String -> IO (Set ModuleName)
- getUsedDependencies :: Map ModuleName DependencyName -> Set ModuleName -> Set DependencyName
- getCompilableUsedDependencies :: Map ModuleName DependencyName -> Compilable -> IO (Set DependencyName)
Documentation
exposedModules :: Parser (Set ModuleName) Source #
parseFileImports :: FilePath -> IO (Set ModuleName) Source #
Parse a Haskell source file's imports.
parseExposedModules :: String -> IO (Set ModuleName) Source #
Parse exposed modules from the `ghc-pkg` field description.
getUsedDependencies :: Map ModuleName DependencyName -> Set ModuleName -> Set DependencyName Source #
Get the dependencies used by a list of modules imported by a Haskell source file.
getCompilableUsedDependencies :: Map ModuleName DependencyName -> Compilable -> IO (Set DependencyName) Source #
Get the dependencies used by a thing to compile by (1) parsing each source file's imports, (2) getting the dependencies each of those files use, and (3) smooshing all the dependencies together to return.