[Haskell-cafe] Custom Enum instance with non-consecutive indices

Nicolas Trangez nicolas at incubaid.com
Sat Nov 17 16:30:44 CET 2012


On Sat, 2012-11-17 at 16:27 +0100, Herbert Valerio Riedel wrote:
> what do you hope to gain from making your flags type an instance of
> the
> Enum class? 

Among others, the ability to list all flags using "[Flag1 ..]"

How is this handled for libraries wrapping C libs which use some bitset
structure?

Nicolas




More information about the Haskell-Cafe mailing list