Name : ghc-both
| |
Version : 0.1.1.0
| Vendor : openSUSE
|
Release : bp150.2.6
| Date : 2018-07-30 20:34:36
|
Group : Development/Libraries/Haskell
| Source RPM : ghc-both-0.1.1.0-bp150.2.6.src.rpm
|
Size : 0.09 MB
| |
Packager : https://bugs_opensuse_org
| |
Summary : Like Maybe, but with a different Monoid instance
|
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.
|
RPM found in directory: /packages/linux-pbone/ftp5.gwdg.de/pub/opensuse/repositories/openSUSE:/Backports:/SLE-15/standard/x86_64 |