Foldable instance defaults can cause CycleInDeclaration error
jmatsushita opened this issue · comments
I just bumped into the problem mentioned here https://stackoverflow.com/a/38490637/3237351 and the solution was also indeed to go from foldl = foldlDefault
to fold f = foldlDefault f
. It feels like this could be better documented in the Foldable instance. Maybe by simply giving a trivial example like the one in SO.
File this documentation issue on the foldable-traversable repo purescript/purescript-foldable-traversable#139 but thought that it would be also good to have this (probably common) case mentioned in the possible causes, or maybe as a note?
I think this is worth having. It's sort of special casing for that situation, but it would be nice to know about this quirky situation sooner.