Copyright | Copyright 2017 Awake Security |
---|---|
License | Apache-2.0 |
Maintainer | opensource@awakesecurity.com |
Stability | experimental |
Safe Haskell | None |
Language | Haskell2010 |
Language.Ninja.IR.Pool0.1.0
Description
Types relating to Ninja pool
s.
- 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.
Instances
Eq Pool | #Source | |
Ord Pool | #Source | |
Read Pool | #Source | |
Show Pool | #Source | |
Generic Pool | #Source | |
Hashable Pool | #Source | |
ToJSON Pool | #Source | Converts to |
FromJSON Pool | #Source | Inverse of the |
NFData Pool | #Source | |
(Monad m, Serial m Text) => Serial m Pool | #Source | Uses the underlying instances.0.1.0 |
(Monad m, CoSerial m Text) => CoSerial m Pool | #Source | Uses the underlying instances.0.1.0 |
type Rep Pool | #Source | |
makePool :: PoolName -> PoolDepth -> Maybe Pool Source 0.1.0#
Construct a Pool
, given its name and depth.
makePoolDefault :: Pool Source 0.1.0#
The default pool, i.e.: the one whose name is the empty string.
makePoolConsole :: Pool Source 0.1.0#
The console
pool.
makePoolCustom Source 0.1.0#
Create a pool with the given name and depth.
PoolName
The name of a Ninja pool.
More information is available here.
Instances
Eq PoolName | #Source | |
Ord PoolName | #Source | |
Read PoolName | #Source | |
Show PoolName | #Source | |
IsString PoolName | #Source | Converts from string via |
Generic PoolName | #Source | |
Hashable PoolName | #Source | |
ToJSON PoolName | #Source | Converts to JSON string via |
ToJSONKey PoolName | #Source | Converts to JSON string via |
FromJSON PoolName | #Source | Inverse of the |
FromJSONKey PoolName | #Source | Inverse of the |
NFData PoolName | #Source | |
(Monad m, Serial m Text) => Serial m PoolName | #Source | Uses the underlying |
(Monad m, CoSerial m Text) => CoSerial m PoolName | #Source | Uses the underlying |
type Rep PoolName | #Source | |
makePoolNameDefault :: PoolName Source 0.1.0#
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.
makePoolNameConsole :: PoolName Source 0.1.0#
Create a PoolName
corresponding to the built-in console
pool.
makePoolNameCustom :: Text -> PoolName Source 0.1.0#
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.
_PoolNameDefault :: Getter PoolName (Maybe ()) Source 0.1.0#
A one-way prism corresponding to the poolNameDefault
constructor.
_PoolNameConsole :: Getter PoolName (Maybe ()) Source 0.1.0#
A one-way prism corresponding to the poolNameConsole
constructor.
_PoolNameCustom :: Getter PoolName (Maybe Text) Source 0.1.0#
A one-way prism corresponding to the poolNameConsole
constructor.
poolNameText :: Iso' PoolName Text Source 0.1.0#
An isomorphism between a PoolName
and the corresponding Text
.
Equivalent to
.iso
printPoolName
parsePoolName
printPoolName :: PoolName -> Text Source 0.1.0#
parsePoolName :: Text -> PoolName Source 0.1.0#
Inverse of printPoolName
.
>>>
parsePoolName ""
PoolNameDefault
>>>
parsePoolName "console"
PoolNameConsole
>>>
parsePoolName "foobar"
PoolNameCustom "foobar"
PoolDepth
The depth of a Ninja pool.
More information is available here.
Instances
Eq PoolDepth | #Source | |
Ord PoolDepth | #Source | |
Read PoolDepth | #Source | |
Show PoolDepth | #Source | |
Generic PoolDepth | #Source | |
Hashable PoolDepth | #Source | |
ToJSON PoolDepth | #Source | Converts |
FromJSON PoolDepth | #Source | Inverse of the |
NFData PoolDepth | #Source | |
Monad m => Serial m PoolDepth | #Source | |
Monad m => CoSerial m PoolDepth | #Source | |
type Rep PoolDepth | #Source | |
makePoolDepth :: Positive -> PoolDepth Source 0.1.0#
Construct a finite PoolDepth
from an integer, which should be a number
greater than or equal to 1.
makePoolInfinite :: PoolDepth Source 0.1.0#
Construct an infinite PoolDepth
. This constructor is needed for the
default pool (pool = ""
), which has an infinite depth.
poolDepthPositive :: Iso' PoolDepth (Maybe Positive) Source 0.1.0#
An isomorphism between a PoolDepth
and a
;
the Maybe
Positive
Nothing
case maps to makePoolInfinite
and the Just
case
maps to makePoolDepth
.