Generic instances for enumerating complex data types

Latest on Hackage:

This package is not currently in any snapshots. If you're interested in using it, we recommend adding it to Stackage Nightly. Doing so will make builds more reliable, and allow to host generated Haddocks.

GPL-3 licensed and maintained by Maciej Goszczycki


Generalized equivalent to doing [minBound..maxBound] but on complex types.

λ :m +Data.Enumerable.Generic
λ :set -XDeriveGeneric
λ data Flag = Flag Bool Word8 deriving (Show, Generic)
λ instance Enumerable Flag
λ instance Default Flag where def = Flag False 0
λ allEnum :: [Flag]
[Flag False 0,Flag True 0,Flag False 1, (..snip..) Flag False 255,Flag True 255]
Depends on 2 packages:
Used by 1 package:
comments powered byDisqus