homepage: https://github.com/barrucadu/both
changelog-type: ''
hash: 590bd7d8a6c3acb3f220533fe46a54533a60456092d16cbe661ef5b913a6cbc7
test-bench-deps: {}
maintainer: mike@barrucadu.co.uk
synopsis: Like Maybe, but with a different Monoid instance.
changelog: ''
basic-deps:
  base: ! '>=4.7 && <4.9'
all-versions:
- '0.1.0.0'
author: Michael Walker
latest: '0.1.0.0'
description-type: haddock
description: ! 'The Monoid instance for Maybe behaves like so:


  > instance Monoid a => Monoid (Maybe a) where

  >   mappend (Just x) (Just y) = Just $ x <> y

  >   mappend (Just x) Nothing  = Just x

  >   mappend Nothing  (Just y) = Just y

  >   mappend Nothing  Nothing  = Nothing

  >

  >   mempty = Nothing


  Both is a newtype wrapper around Maybe providing this instance:


  > instance Monoid a => Monoid (Both a) where

  >   mappend (Just x) (Just y) = Just $ x <> y

  >   mappend _ _ = Nothing

  >

  >   mempty = Just mempty'
license-name: MIT

Update from Hackage at 2015-08-22T12:18:23+0000
Update from Hackage at 2015-08-22T12:18:23+0000
