On 2019-08-05 2:33 p.m., Jinxuan Zhu wrote:
… Bool can be monoid by either || or && operations, which would lead to ambiguity if Bool is monoid by default.
You can:
- use Maybe Unit instead
- (overkill) Define AndMonoid Bool newtype and use DeriveVia and coerce
Data.Monoid
from base
already has Any
and All
for this.