purescript-foldable-traversable
purescript-foldable-traversable copied to clipboard
Document possible CyclesInDeclaration error when using defaults
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.
Possibly adding this case to the error documentation at https://github.com/purescript/documentation/blob/master/errors/CycleInDeclaration.md would also be a good idea. I'll submit an issue there too.
I think this is worth adding as a clarification to the docs as it can easily trip you up if you're not aware of it.