Module
Data.Enum.Generic
- Package
- purescript-enums
- Repository
- purescript/purescript-enums
#GenericEnum Source
class GenericEnum a whereMembers
genericPred' :: a -> Maybe agenericSucc' :: a -> Maybe a
Instances
GenericEnum NoArguments(Enum a) => GenericEnum (Argument a)(GenericEnum a) => GenericEnum (Constructor name a)(GenericEnum a, GenericTop a, GenericEnum b, GenericBottom b) => GenericEnum (Sum a b)(GenericEnum a, GenericTop a, GenericBottom a, GenericEnum b, GenericTop b, GenericBottom b) => GenericEnum (Product a b)
#genericPred Source
genericPred :: forall a rep. Generic a rep => GenericEnum rep => a -> Maybe aA Generic implementation of the pred member from the Enum type class.
#genericSucc Source
genericSucc :: forall a rep. Generic a rep => GenericEnum rep => a -> Maybe aA Generic implementation of the succ member from the Enum type class.
#GenericBoundedEnum Source
class GenericBoundedEnum a whereMembers
genericCardinality' :: Cardinality agenericToEnum' :: Int -> Maybe agenericFromEnum' :: a -> Int
Instances
GenericBoundedEnum NoArguments(BoundedEnum a) => GenericBoundedEnum (Argument a)(GenericBoundedEnum a) => GenericBoundedEnum (Constructor name a)(GenericBoundedEnum a, GenericBoundedEnum b) => GenericBoundedEnum (Sum a b)(GenericBoundedEnum a, GenericBoundedEnum b) => GenericBoundedEnum (Product a b)
#genericCardinality Source
genericCardinality :: forall a rep. Generic a rep => GenericBoundedEnum rep => Cardinality aA Generic implementation of the cardinality member from the
BoundedEnum type class.
#genericToEnum Source
genericToEnum :: forall a rep. Generic a rep => GenericBoundedEnum rep => Int -> Maybe aA Generic implementation of the toEnum member from the BoundedEnum
type class.
#genericFromEnum Source
genericFromEnum :: forall a rep. Generic a rep => GenericBoundedEnum rep => a -> IntA Generic implementation of the fromEnum member from the BoundedEnum
type class.
- Modules
- Data.
Enum - Data.
Enum. Gen - Data.
Enum. Generic