vabal-lib-2.0.0: Core algorithms and datatypes used by vabal

Safe HaskellNone
LanguageHaskell2010

PackageSolver

Description

This is the central package of vabal-lib, it contains the functions to analyze a cabal package and determine which versions of ghc can comply with the constraints imposed on the following dependencies:

  • base
  • Cabal (only constraints in the setup-depends stanza are important)
Synopsis

Documentation

analyzePackage Source #

Arguments

:: FlagAssignment

Flags to apply when configuring the project

-> GhcDatabase

Database containing metadata for all ghc versions to consider

-> GenericPackageDescription

The raw project description cabal file

-> Set Version

The versions of ghc that comply with the constraints of base and Cabal

analyzePackage uses the provided flag assignment to configure the package description. It returns a set of all ghc versions found in the GhcDatabase that satisfy the base and Cabal (only Cabal in setup-depends is considered) constraints.

doesGhcVersionSupportPackage Source #

Arguments

:: FlagAssignment

Flags to apply when configuring the project

-> GhcDatabase

Database containing metadata for all known ghc versions

-> GenericPackageDescription

The raw project description cabal file

-> Version

The version of ghc the user wants to use

-> Bool

Returns whether the version of ghc the user wants is fine

doesGhcVersionSupportPackage checks that the provided compiler version is able to comply with the constraints of base and Cabal (only Cabal in setup-depends is considered) of the package.