| Copyright | Copyright 2017 Awake Security |
|---|---|
| License | Apache-2.0 |
| Maintainer | opensource@awakesecurity.com |
| Stability | experimental |
| Safe Haskell | None |
| Language | Haskell2010 |
Language.Ninja.IR.Pool
Description
Types relating to Ninja pools.
Since: 0.1.0
- data Pool
- makePool :: PoolName -> PoolDepth -> Maybe Pool
- makePoolDefault :: Pool
- makePoolConsole :: Pool
- makePoolCustom :: Text -> Positive -> Pool
- poolName :: Getter Pool PoolName
- poolDepth :: Getter Pool PoolDepth
- data PoolName
- makePoolNameDefault :: PoolName
- makePoolNameConsole :: PoolName
- makePoolNameCustom :: Text -> PoolName
- _PoolNameDefault :: Getter PoolName (Maybe ())
- _PoolNameConsole :: Getter PoolName (Maybe ())
- _PoolNameCustom :: Getter PoolName (Maybe Text)
- poolNameText :: Iso' PoolName Text
- printPoolName :: PoolName -> Text
- parsePoolName :: Text -> PoolName
- data PoolDepth
- makePoolDepth :: Positive -> PoolDepth
- makePoolInfinite :: PoolDepth
- poolDepthPositive :: Iso' PoolDepth (Maybe Positive)
Pool
A Ninja pool declaration, as documented
here.
Since: 0.1.0
Instances
| Eq Pool Source # | |
| Ord Pool Source # | |
| Read Pool Source # | |
| Show Pool Source # | |
| Generic Pool Source # | |
| Hashable Pool Source # | Default Since: 0.1.0 |
| ToJSON Pool Source # | Converts to Since: 0.1.0 |
| FromJSON Pool Source # | Inverse of the Since: 0.1.0 |
| NFData Pool Source # | Default Since: 0.1.0 |
| (Monad m, Serial m Text) => Serial m Pool Source # | Uses the underlying instances. Since: 0.1.0 |
| (Monad m, CoSerial m Text) => CoSerial m Pool Source # | Uses the underlying instances. Since: 0.1.0 |
| type Rep Pool Source # | |
makePool :: PoolName -> PoolDepth -> Maybe Pool Source #
Construct a Pool, given its name and depth.
Since: 0.1.0
makePoolDefault :: Pool Source #
The default pool, i.e.: the one whose name is the empty string.
Since: 0.1.0
makePoolConsole :: Pool Source #
The console pool.
Since: 0.1.0
Create a pool with the given name and depth.
Since: 0.1.0
PoolName
Instances
| Eq PoolName Source # | |
| Ord PoolName Source # | |
| Read PoolName Source # | |
| Show PoolName Source # | |
| IsString PoolName Source # | Converts from string via Since: 0.1.0 |
| Generic PoolName Source # | |
| Hashable PoolName Source # | Default Since: 0.1.0 |
| ToJSON PoolName Source # | Converts to JSON string via Since: 0.1.0 |
| ToJSONKey PoolName Source # | Converts to JSON string via Since: 0.1.0 |
| FromJSON PoolName Source # | Inverse of the Since: 0.1.0 |
| FromJSONKey PoolName Source # | Inverse of the Since: 0.1.0 |
| NFData PoolName Source # | Default Since: 0.1.0 |
| (Monad m, Serial m Text) => Serial m PoolName Source # | Uses the underlying Since: 0.1.0 |
| (Monad m, CoSerial m Text) => CoSerial m PoolName Source # | Uses the underlying Since: 0.1.0 |
| type Rep PoolName Source # | |
makePoolNameDefault :: PoolName Source #
Create a PoolName corresponding to the built-in default pool, i.e.: the
pool that is selected if the pool attribute is set to the empty string.
Since: 0.1.0
makePoolNameConsole :: PoolName Source #
Create a PoolName corresponding to the built-in console pool.
Since: 0.1.0
makePoolNameCustom :: Text -> PoolName Source #
Create a PoolName corresponding to a custom pool.
Note: this can fail at runtime if given the empty string or "console",
so you should consider parsePoolName as a safer alternative.
Since: 0.1.0
_PoolNameDefault :: Getter PoolName (Maybe ()) Source #
A one-way prism corresponding to the poolNameDefault constructor.
Since: 0.1.0
_PoolNameConsole :: Getter PoolName (Maybe ()) Source #
A one-way prism corresponding to the poolNameConsole constructor.
Since: 0.1.0
_PoolNameCustom :: Getter PoolName (Maybe Text) Source #
A one-way prism corresponding to the poolNameConsole constructor.
Since: 0.1.0
poolNameText :: Iso' PoolName Text Source #
An isomorphism between a PoolName and the corresponding Text.
Equivalent to .iso printPoolName parsePoolName
Since: 0.1.0
printPoolName :: PoolName -> Text Source #
parsePoolName :: Text -> PoolName Source #
Inverse of printPoolName.
>>>parsePoolName ""PoolNameDefault
>>>parsePoolName "console"PoolNameConsole
>>>parsePoolName "foobar"PoolNameCustom "foobar"
Since: 0.1.0
PoolDepth
Instances
| Eq PoolDepth Source # | |
| Ord PoolDepth Source # | |
| Read PoolDepth Source # | |
| Show PoolDepth Source # | |
| Generic PoolDepth Source # | |
| Hashable PoolDepth Source # | Default Since: 0.1.0 |
| ToJSON PoolDepth Source # | Converts Since: 0.1.0 |
| FromJSON PoolDepth Source # | Inverse of the Since: 0.1.0 |
| NFData PoolDepth Source # | Default Since: 0.1.0 |
| Monad m => Serial m PoolDepth Source # | Default Since: 0.1.0 |
| Monad m => CoSerial m PoolDepth Source # | Default Since: 0.1.0 |
| type Rep PoolDepth Source # | |
makePoolDepth :: Positive -> PoolDepth Source #
Construct a finite PoolDepth from an integer, which should be a number
greater than or equal to 1.
Since: 0.1.0
makePoolInfinite :: PoolDepth Source #
Construct an infinite PoolDepth. This constructor is needed for the
default pool (pool = ""), which has an infinite depth.
Since: 0.1.0
poolDepthPositive :: Iso' PoolDepth (Maybe Positive) Source #
An isomorphism between a PoolDepth and a ;
the Maybe PositiveNothing case maps to makePoolInfinite and the Just case
maps to makePoolDepth.
Since: 0.1.0