enumset

Sets of enumeration values represented by machine words

Version on this page:0.0.5
LTS Haskell 22.39:0.1
Stackage Nightly 2024-10-31:0.1
Latest on Hackage:0.1

See all snapshots enumset appears in

BSD-3-Clause licensed and maintained by Henning Thielemann
This version can be pinned in stack with:enumset-0.0.5@sha256:9eb17da581c797fc880f71bfdc107eeb0a3ea815e1bf8e63f59e91e08c33c583,1731
Used by 3 packages in nightly-2020-05-16(full list with versions):

With this package you can create a type safe interface to flag sets. It is intended for interfacing to C libraries via FFI, where Word8, Word16, or Word32 types are commonly used to store bit vectors. E.g. the type EnumSet Word16 Ordering represents a flag set stored in a Word16 that supports the flags LT, EQ, GT.

This package is similar to the bitset package and the Data.Edison.Coll.EnumSet module in the edison package, however our implementation allows you to choose the embedding type and thus the maximum size of the set.

See also data-flags and Data.EnumSet in enummapset.