[Haskell-cafe] how to Enumerate without lists?

Johannes Waldmann johannes.waldmann at htwk-leipzig.de
Wed Sep 5 10:55:34 UTC 2018

Hi David,

Thanks for responding.
Let me re-phrase the technical question: in some hypothetical

>       instance Foldable Enumerator where ...

the methods (e.g., foldMap) would be overconstrained.
Is there a way to still write something like it?

It seems not, as shown by these examples:

Data.EnumSet cannot implement Foldable because of  Enum k.

Data.IntSet cannot implement Foldable because of   k ~ Int.

- J.

More information about the Haskell-Cafe mailing list