| Safe Haskell | Safe-Inferred |
|---|
Data.Semigroup.Act.Enum
- newtype EnumIntAct a = EnumIntAct a
- newtype EnumBoundedIntAct a = EnumBoundedIntAct a
Documentation
newtype EnumIntAct a Source
A wrapper for an integer acting on an Enum. If the resulting index is
out of the enum bounds, an exception is raised.
Constructors
| EnumIntAct a |
Instances
| Functor EnumIntAct | |
| Eq a => Eq (EnumIntAct a) | |
| (Eq (EnumIntAct a), Ord a) => Ord (EnumIntAct a) | |
| Read a => Read (EnumIntAct a) | |
| Show a => Show (EnumIntAct a) | |
| (Semigroup (Sum n), Integral n, Enum a) => SemigroupAct (Sum n) (EnumIntAct a) |
newtype EnumBoundedIntAct a Source
A wrapper for an integer acting on an instance of both Enum and Bounded.
The index wrap around the bounds, so
Sum 1 etc.
act (EnumBoundedIntAct maxBound) == (EnumBoundedIntAct minBound)
Constructors
| EnumBoundedIntAct a |
Instances
| Functor EnumBoundedIntAct | |
| Eq a => Eq (EnumBoundedIntAct a) | |
| (Eq (EnumBoundedIntAct a), Ord a) => Ord (EnumBoundedIntAct a) | |
| Read a => Read (EnumBoundedIntAct a) | |
| Show a => Show (EnumBoundedIntAct a) | |
| (Semigroup (Sum n), Bounded a, Enum a, Integral n) => SemigroupAct (Sum n) (EnumBoundedIntAct a) |