derive-enumerable: Generic instances for enumerating complex data types

This is a package candidate release! Here you can preview how this package release will appear once published to the main package index (which can be accomplished via the 'maintain' link below). Please note that once a package has been published to the main package index it cannot be undone! Please consult the package uploading documentation for more information.

[maintain] [Publish]

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]

Properties

Versions 0.1.0.0, 0.1.0.0, 0.1.1.0, 0.2.0
Change log None available
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-27T17:52:45Z

Modules

[Index]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees


Readme for derive-enumerable-0.1.0.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]