shell-conduit icon indicating copy to clipboard operation
shell-conduit copied to clipboard

Add 'Semigroup' and 'Monoid' instances for 'Segment'

Open chshersh opened this issue 8 years ago • 1 comments

These instance would be really useful!

instance Semigroup r => Semigroup (Segment r) where
    (<>) = liftA2 (<>)

instance Monoid r => Monoid (Segment r) where
    mempty  = pure mempty
    mappend = liftA2 mappend

chshersh avatar Nov 09 '17 12:11 chshersh

Sorry for my late reply. The instances sound useful. Can you send a PR ?

psibi avatar Mar 30 '18 17:03 psibi