uusi-0.3.0.0: Tweak dependencies in .cabal files
Copyright(c) 2020 berberman
LicenseMIT
Maintainerberberman <1793913507@qq.com>
Stabilityexperimental
Portabilityportable
Safe HaskellNone
LanguageHaskell2010

Distribution.Uusi.Types

Description

Types and lenses used by the library.

Synopsis

Documentation

data VersionedPackage Source #

Super type of three kinds of dependency. Because cabal doesn't define lenses of Dependency, ExeDependency, and LegacyExeDependency, here comes out a general data type to define overloaded lenses. See HasVersionedPackage.

type Op a = a -> a Source #

An endo operation

type SomeUusi = [Uusi] Source #

A list of Uusi

type Uusi = Action Text Source #

Common Action, where the predication p is PackageName.

data Action tag Source #

Action acting on cabal dependencies.

Constructors

Remove tag (PackageName -> Bool)

For a dependency x, if P(x) then remove x

SetVersion tag (PackageName -> Bool) VersionRange

For a dependency x, if P(x) then set x's version range

Replace tag (PackageName -> Bool) [VersionedPackage]

For a dependency x, if P(x) then replace x with a set of packages

SetBuildable tag (UnqualComponentName -> Bool) Bool

For a component x, if P(x) then set the buildable of x

Instances

Instances details
Show tag => Show (Action tag) Source # 
Instance details

Defined in Distribution.Uusi.Types

Methods

showsPrec :: Int -> Action tag -> ShowS #

show :: Action tag -> String #

showList :: [Action tag] -> ShowS #