haskell-checkers/checkers

Why aren't there laws for Foldable in the library?

Closed this issue · 1 comments

Documentation for Foldable contains a few laws, for example:

foldr f z t = appEndo (foldMap (Endo . f) t ) z
foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z
fold = foldMap id
length = getSum . foldMap (Sum . const  1)
conal commented

I'd consider a compelling PR, including the checkable laws and a reference.

I maintain Checkers only passively these days. Since there's still active interest, we might want to find another maintainer.