derive-enumerable: Generic instances for enumerating complex data types

[ data, generics, gpl, library ] [ Propose Tags ] [ Report a vulnerability ]

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

[Last Documentation]

  • Data
    • Enumerable
      • Data.Enumerable.Generic

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-2023 Maciej Goszczycki, Evan Cofsky
Author Evan Cofsky <evan@theunixman.com>
Maintainer Evan Cofsky <evan@theunixman.com>
Category Data, Generics
Home page https://github.com/theunixman/derive-enumerable
Bug tracker https://github.com/theunixman/derive-enumerable
Source repo head: git clone git@github.com:theunixman/derive-enumerable.git
Uploaded by mgoszcz2 at 2022-11-18T22:55:27Z
Distributions
Reverse Dependencies 1 direct, 0 indirect [details]
Downloads 1647 total (4 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs not available [build log]
All reported builds failed as of 2022-11-19 [all 2 reports]

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