uusi-0.2.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 (PackageName -> Bool) Source #

Common Action, where the predication p is PackageName.

data Action tag p Source #

Action acting on cabal dependencies.

Constructors

Remove tag p

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

SetVersion tag p VersionRange

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

Replace tag p [VersionedPackage]

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

Instances

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

Defined in Distribution.Uusi.Types

Methods

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

show :: Action tag p -> String #

showList :: [Action tag p] -> ShowS #