-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Core algorithms and datatypes used by vabal -- -- `vabal-lib` is the library powering vabal, it provides the -- tools to analyze a '.cabal' file and check which versions of -- ghc can comply with the constraints imposed on the following -- dependencies: -- --
@package vabal-lib @version 2.0.0 -- | This module contains the GhcDatabase, which is a Map-like type -- associating to each ghc version its GhcMetadata informations, -- and utility functions to to manipulate and query it. module GhcDatabase -- | Metadata associated to a GHC version data GhcMetadata GhcMetadata :: Version -> Version -> GhcMetadata -- | base version supported by this GHC [baseVersion] :: GhcMetadata -> Version -- | minimum version of Cabal that supports this GHC [minCabalVersion] :: GhcMetadata -> Version -- | Map associating to each GHC version its GhcMetadata data GhcDatabase -- | The URL from which you can download a ready to be used -- GhcDatabase defaultGhcDatabaseURL :: String -- | O(n*log n). Create a GhcDatabase from a list key-value -- pairs. -- -- The key is the ghc version, the value is the GhcMetadata for -- that version dbFromList :: [(Version, GhcMetadata)] -> GhcDatabase -- | O(n). Convert the GhcDatabase to a list of key-value -- pairs dbToList :: GhcDatabase -> [(Version, GhcMetadata)] -- | O(n). Get all ghc versions contained in the database ghcVersions :: GhcDatabase -> Set Version -- | O(1). Check whether the GhcDatabase is empty isEmpty :: GhcDatabase -> Bool -- | O(log n). Get GhcMetadata for a GHC version, if it's in -- the database metadataForGhc :: GhcDatabase -> Version -> Maybe GhcMetadata -- | O(log n). Get base version for a GHC version, if it's in the -- database baseVersionForGhc :: GhcDatabase -> Version -> Maybe Version -- | O(log n). Get Supported Cabal version range for a GHC version, -- if it's in the databasr cabalLibRangeForGhc :: GhcDatabase -> Version -> Maybe VersionRange -- | O(log n). Check whether the database contains a GHC version hasGhcVersion :: GhcDatabase -> Version -> Bool -- | O(log n). Get newest GHC (and its metadata) found in the -- database newest :: GhcDatabase -> Maybe (Version, GhcMetadata) -- | Parse a GhcDatabase from a csv string. The format of the csv -- string must be the following: -- -- The first line is the header, it is expected to contain these three -- columns: ghcVersion, baseVersion, minCabalVersion Each line must at -- least contain values for those three columns. -- -- A simple example: -- ---- ghcVersion,baseVersion,minCabalVersion -- 8.6.3,4.12.0.0,2.4 --parseGhcDatabase :: ByteString -> Either String GhcDatabase -- | O(m*log(nm + 1)), m <= n/. Get a restricted database with -- only a set of GHC versions filterGhcVersions :: GhcDatabase -> Set Version -> GhcDatabase -- | O(m*log(nm + 1)), m <= n/. Exclude all ghc versions in the -- set from the database excludeGhcVersions :: GhcDatabase -> Set Version -> GhcDatabase -- | O(n). Filter database entries with base version in the given -- VersionRange filterBaseVersionIn :: GhcDatabase -> VersionRange -> GhcDatabase -- | O(n). Filter database entries with supported Cabal version -- range in the given VersionRange filterMinCabalVersionIn :: GhcDatabase -> VersionRange -> GhcDatabase instance Data.Csv.Conversion.FromNamedRecord GhcDatabase.MetadataEntry -- | 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: -- --