generic-deriving-1.6.2: Generic programming library for generalised deriving.

Safe HaskellSafe-Inferred




Generic enum class

class GEnum a whereSource


genum :: [a]Source


GEnum Int 
GEnum a => GEnum [a] 
GEnum a => GEnum (Maybe a) 

Default definitions for GEnum

genumDefault :: (Generic a, Enum' (Rep a)) => [a]Source

toEnumDefault :: (Generic a, Enum' (Rep a)) => Int -> aSource

fromEnumDefault :: (GEq a, Generic a, Enum' (Rep a)) => a -> IntSource

Generic Ix class

class Ord a => GIx a whereSource


range :: (a, a) -> [a]Source

The list of values in the subrange defined by a bounding pair.

index :: (a, a) -> a -> IntSource

The position of a subscript in the subrange.

inRange :: (a, a) -> a -> BoolSource

Returns True the given subscript lies in the range defined the bounding pair.


GIx Int 
(GEq a, GEnum a, GIx a) => GIx [a] 
(GEq a, GEnum a, GIx a) => GIx (Maybe a) 

Default definitions for GIx

rangeDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> [a]Source

indexDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> a -> IntSource

inRangeDefault :: (GEq a, Generic a, Enum' (Rep a)) => (a, a) -> a -> BoolSource