Re: HasCallStack constraint for maximum in Prelude?

Tom Ellis <[email protected]> Wed, 25 Mar 2026 10:23:37 +0000
Newsgroups gmane.comp.lang.haskell.cafe
Message-ID <acO3qZ24dDpwYpuU@cloudinit-builder>
On Wed, Mar 25, 2026 at 11:19:20AM +0100, Olaf Klinke via Haskell-Cafe wrote:
> For (Bounded a, Ord a) one should replace maximum by an ordinary fold,
> given a suitable newtype wrapper with a Monoid instance, e.g. 
> 
> (Ord a, Bounded a) => Monoid (Data.Semigroup.Max a)

For a Semigroup surely it doesn't need Bounded?  (A Monoid would
need Bounded).

Tom
_______________________________________________
Haskell-Cafe mailing list -- [email protected]
To (un)subscribe, modify options or view archives go to:
Only members subscribed via the mailman list are allowed to post.