Safe Haskell | None |
---|---|
Language | Haskell2010 |
usage:
data A = ... instanceBounded
A where minBound =minBound_enumerable
array_A maxBound =maxBound_enumerable
array_A instanceEnum
A where toEnum =toEnum_enumerable
array_A fromEnum =fromEnum_enumerable
table_A -- CAF array_A ::Array
Int A array_A =array_enumerable
-- CAF table_A ::Map
A Int table_A =table_enumerable
-- we must pass in CAFs -- (i.e. expressions that are top-level and unconstrained), -- which will be shared between all calls to minBoundmaxBoundtoEnum/fromEnum. -- TODO must we?
- -TODO template-haskell
(also see the source of Enumerate.Example)
Documentation
minBound_enumerable :: forall a. Enumerable a => Array Int a -> a Source
maxBound_enumerable :: forall a. Enumerable a => Array Int a -> a Source
toEnum_enumerable :: forall a. Enumerable a => Array Int a -> Int -> a Source
fromEnum_enumerable :: forall a. (Enumerable a, Ord a) => Map a Int -> a -> Int Source
array_enumerable :: forall a. Enumerable a => Array Int a Source
table_enumerable :: forall a. (Enumerable a, Ord a) => Map a Int Source