Richard Eisenberg writes:
> Hi devs,
>
> In the work on simplifying the error-message infrastructure (heavy lifting by
> Alfredo, in cc), I've been tempted (twice!) to add
>
>> instance Semigroup (Bag a) where
>> (<>) = unionBags
>>
>> instance Monoid (Bag a) where
>> mempty = emptyBag
>
>
Viktor Dukhovni writes:
> On Wed, Apr 14, 2021 at 06:26:38PM +, Richard Eisenberg wrote:
>
>> In the work on simplifying the error-message infrastructure (heavy
>> lifting by Alfredo, in cc), I've been tempted (twice!) to add
>>
>> > instance Semigroup (Bag a) where
>> > (<>) = unionBags
+1 to add from me, seems sensible
On Wed, Apr 14, 2021, 14:31 Viktor Dukhovni wrote:
> On Wed, Apr 14, 2021 at 06:26:38PM +, Richard Eisenberg wrote:
>
> > In the work on simplifying the error-message infrastructure (heavy
> > lifting by Alfredo, in cc), I've been tempted (twice!) to add
>
On Wed, Apr 14, 2021 at 06:26:38PM +, Richard Eisenberg wrote:
> In the work on simplifying the error-message infrastructure (heavy
> lifting by Alfredo, in cc), I've been tempted (twice!) to add
>
> > instance Semigroup (Bag a) where
> > (<>) = unionBags
> >
> > instance Monoid (Bag a)
Hi Richard,
I've been guilty of slipping in similar instances myself. In fact, I like
OrdList better than Bag precisely because it has more instances and thus a
far better interface.
Not being able to see whether mempty denotes a Bag should be as simple as a
mouse hover with HLS set up.
So a +99
I wonder if it would be possible to have an hlint rule to check for mempty
instead of emptyBag.
On Wed, 14 Apr 2021 at 19:27, Richard Eisenberg wrote:
> Hi devs,
>
> In the work on simplifying the error-message infrastructure (heavy lifting
> by Alfredo, in cc), I've been tempted (twice!) to
Hi devs,
In the work on simplifying the error-message infrastructure (heavy lifting by
Alfredo, in cc), I've been tempted (twice!) to add
> instance Semigroup (Bag a) where
> (<>) = unionBags
>
> instance Monoid (Bag a) where
> mempty = emptyBag
to GHC.Data.Bag.
The downside to writing