Copyright | (C) MLabs 2025 |
---|---|
License | Apache 2.0 |
Maintainer | koz@mlabs.city, sean@mlabs.city |
Safe Haskell | None |
Language | Haskell2010 |
Covenant.Index
Description
Positional indexes, starting from 0, and cardinality indicators.
Since: 1.0.0
Synopsis
- data Index (ofWhat :: Symbol)
- data Count (ofWhat :: Symbol)
- intIndex :: forall (ofWhat :: Symbol). Prism' Int (Index ofWhat)
- intCount :: forall (ofWhat :: Symbol). Prism' Int (Count ofWhat)
- ix0 :: forall (ofWhat :: Symbol). Index ofWhat
- count0 :: forall (ofWhat :: Symbol). Count ofWhat
- ix1 :: forall (ofWhat :: Symbol). Index ofWhat
- count1 :: forall (ofWhat :: Symbol). Count ofWhat
- ix2 :: forall (ofWhat :: Symbol). Index ofWhat
- count2 :: forall (ofWhat :: Symbol). Count ofWhat
- ix3 :: forall (ofWhat :: Symbol). Index ofWhat
- count3 :: forall (ofWhat :: Symbol). Count ofWhat
Documentation
data Index (ofWhat :: Symbol) Source #
A positional index, starting from zero. The label allows distinguishing different flavours of indices.
Since: 1.0.0
Instances
Arbitrary (Index ofWhat) Source # | Since: 1.0.0 |
Monoid (Index ofWhat) Source # | Since: 1.0.0 |
Semigroup (Index ofWhat) Source # | Enables some manner of arithmetic with Since: 1.0.0 |
Show (Index ofWhat) Source # | Since: 1.0.0 |
Eq (Index ofWhat) Source # | Since: 1.0.0 |
Ord (Index ofWhat) Source # | Since: 1.0.0 |
Defined in Covenant.Index |
data Count (ofWhat :: Symbol) Source #
An indicator of the cardinality of something. Meant to be paired with
Index
to specify which unique something you mean.
Since: 1.0.0
Instances
Show (Count ofWhat) Source # | Since: 1.0.0 |
Eq (Count ofWhat) Source # | Since: 1.0.0 |
Ord (Count ofWhat) Source # | Since: 1.0.0 |
Defined in Covenant.Index |
count0 :: forall (ofWhat :: Symbol). Count ofWhat Source #
Helper for a count of zero items.
Since: 1.0.0
count1 :: forall (ofWhat :: Symbol). Count ofWhat Source #
Helper for a count of one item.
Since: 1.0.0