Safe Haskell | None |
---|---|
Language | GHC2021 |
Cabal.Matrix.Matrix
Synopsis
- type Matrix = Rectangle Flavor Text (Maybe Text)
- timesMatrix :: Matrix -> Matrix -> Matrix
- addMatrix :: Matrix -> Matrix -> Matrix
- subtractMatrix :: Matrix -> Matrix -> Matrix
- seqMatrix :: Matrix -> Matrix -> Matrix
- unitMatrix :: Matrix
- newtype Compiler = Compiler FilePath
- compilersMatrix :: [Compiler] -> Matrix
- data Prefer
- preferMatrix :: [Prefer] -> Matrix
- packageVersionMatrix :: PackageName -> [Version] -> Matrix
- customUnorderedOptions :: Text -> [Text] -> Matrix
- customOrderedOptions :: Text -> [Text] -> Matrix
- data MatrixExpr
- = TimesExpr MatrixExpr MatrixExpr
- | AddExpr MatrixExpr MatrixExpr
- | SubtractExpr MatrixExpr MatrixExpr
- | SeqExpr MatrixExpr MatrixExpr
- | UnitExpr
- | CompilersExpr [Compiler]
- | PreferExpr [Prefer]
- | PackageVersionExpr PackageName [Either Version VersionRange]
- | CustomUnorderedExpr Text [Text]
- | CustomOrderedExpr Text [Text]
- data EvalM a
- = EvalPure a
- | EvalWithDB (SourcePackageDb -> a)
- runEvalM :: EvalM a -> IO a
- evalVersionRanges :: PackageName -> [Either Version VersionRange] -> EvalM [Version]
- evalMatrixExpr :: MatrixExpr -> IO Matrix
- resolveMatrixExpr :: MatrixExpr -> IO MatrixExpr
Documentation
type Matrix = Rectangle Flavor Text (Maybe Text) Source #
A build matrix is represented by a rectangle, where properties that we
iterate over correspond to columns (first Text
), and desired combinations
of values of those properties (second Text
) correspond to rows. Each row is
then marked with the collection of options that this combination of choices
produces (the Flavor
).
unitMatrix :: Matrix Source #
compilersMatrix :: [Compiler] -> Matrix Source #
Constructors
PreferOldest | |
PreferNewest |
preferMatrix :: [Prefer] -> Matrix Source #
packageVersionMatrix :: PackageName -> [Version] -> Matrix Source #
data MatrixExpr Source #
An unevaluated build matrix expression. Matrices can contain exponentially many rows in the worst case, so it makes sense to delay converting into an evaluated representation.
Constructors
Evaluating the build matrix expression may require access to the source package DB, but if it doesn't, we'd like to avoid loading it.
Constructors
EvalPure a | |
EvalWithDB (SourcePackageDb -> a) |
evalVersionRanges :: PackageName -> [Either Version VersionRange] -> EvalM [Version] Source #
evalMatrixExpr :: MatrixExpr -> IO Matrix Source #