purescript-foldable-traversable icon indicating copy to clipboard operation
purescript-foldable-traversable copied to clipboard

Document possible CyclesInDeclaration error when using defaults

Open jmatsushita opened this issue 3 years ago • 1 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.

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.

jmatsushita avatar Jul 27 '21 19:07 jmatsushita

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.

JordanMartinez avatar Jul 27 '21 20:07 JordanMartinez