Safe Haskell | None |
---|---|
Language | Haskell2010 |
Importify.Stack
Description
Utilities which allows to use stack
tools for different
dependencies stuff.
- data QueryPackage = QueryPackage {}
- newtype LocalPackages = LocalPackages [QueryPackage]
- newtype RemotePackages = RemotePackages [QueryPackage]
- ghcIncludePath :: MaybeT IO (Path Abs Dir)
- pkgName :: QueryPackage -> Text
- stackListDependencies :: MonadIO m => m (HashMap Text Text)
- stackListPackages :: forall m. (MonadIO m, MonadCatch m) => m (LocalPackages, RemotePackages)
- stackProjectRoot :: MaybeT IO (Path Abs Dir)
- upgradeWithVersions :: HashMap Text Text -> [Text] -> [Text]
Documentation
data QueryPackage Source #
This data type represents package returned by stack query
command.
Constructors
QueryPackage | |
Instances
newtype LocalPackages Source #
Local subpackages from exactly this project.
Constructors
LocalPackages [QueryPackage] |
Instances
newtype RemotePackages Source #
Remote packages, from GitHub or other locations.
Constructors
RemotePackages [QueryPackage] |
Instances
ghcIncludePath :: MaybeT IO (Path Abs Dir) Source #
This function finds path to directory where include
for ghc lies.
Filepath looks like this:
~.stackprogramsx86_64-linuxghc-8.0.2libghc-8.0.2/include
This function needed to tell dependencies about files like "MachDeps.h"
.
TODO: use GHC path from project?
pkgName :: QueryPackage -> Text Source #
Show full name of QueryPackage
with version.
stackListDependencies :: MonadIO m => m (HashMap Text Text) Source #
Extract all dependencies with versions using
stack list-dependencies
shell command.
stackListPackages :: forall m. (MonadIO m, MonadCatch m) => m (LocalPackages, RemotePackages) Source #
Queries list of all local packages for project. If some errors occur then warning is printed into console and empty list returned.