derive-enumerable: Generic instances for enumerating complex data types

[ data, generics, gpl, library ] [ Propose Tags ]

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]

[Skip to Readme]

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.1.0, 0.2.0
Dependencies base (>=4.7 && <4.8), data-default (>=0.5.0) [details]
License GPL-3.0-only
Copyright (c) 2015 Maciej Goszczycki
Author Maciej Goszczycki <mgoszcz2@gmail.com>
Maintainer Maciej Goszczycki <mgoszcz2@gmail.com>
Category Data, Generics
Home page https://github.com/mgoszcz2/derive-enumerable
Bug tracker https://github.com/mgoszcz2/derive-enumerable/issues
Source repo head: git clone git://github.com/mgoszcz2/derive-enumerable.git
Uploaded by mgoszcz2 at 2015-05-27T23:02:50Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1628 total (7 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2015-05-27 [all 1 reports]

Readme for derive-enumerable-0.1.1.0

[back to package description]

Derive-enumerable

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]