Cabal-2.0.1.0: A framework for packaging Haskell software

Safe Haskell | None
Language | Haskell2010

Distribution.Compat.Semigroup

Description

Compatibility layer for Data.Semigroup

Synopsis

- class Semigroup a where
- class Monoid a where
- newtype All :: * = All {
  - getAll :: Bool
  }
- newtype Any :: * = Any {
  - getAny :: Bool
  }
- newtype Last' a = Last' {
  - getLast' :: Maybe a
  }
- gmappend :: (Generic a, GSemigroup (Rep a)) => a -> a -> a
- gmempty :: (Generic a, GMonoid (Rep a)) => a

# Documentation

class Semigroup a where Source #

The class of semigroups (types with an associative binary operation).

Since: 4.9.0.0

Methods

(<>) :: a -> a -> a infixr 6 Source #

An associative operation.

    (a <> b) <> c = a <> (b <> c)

If `a` is also a `Monoid` we further require

    (<>) = mappend

Instances

Semigroup Ordering | Since: 4.9.0.0
Methods (<>) :: Ordering -> Ordering -> Ordering Source # sconcat :: NonEmpty Ordering -> Ordering Source # stimes :: Integral b => b -> Ordering -> Ordering Source #
Semigroup () | Since: 4.9.0.0
Methods (<>) :: () -> () -> () Source # sconcat :: NonEmpty () -> () Source # stimes :: Integral b => b -> () -> () Source #
Semigroup Void | Since: 4.9.0.0
Methods (<>) :: Void -> Void -> Void Source # sconcat :: NonEmpty Void -> Void Source # stimes :: Integral b => b -> Void -> Void Source #
Semigroup Event | Since: 4.10.0.0
Methods (<>) :: Event -> Event -> Event Source # sconcat :: NonEmpty Event -> Event Source # stimes :: Integral b => b -> Event -> Event Source #
Semigroup Lifetime | Since: 4.10.0.0
Methods (<>) :: Lifetime -> Lifetime -> Lifetime Source # sconcat :: NonEmpty Lifetime -> Lifetime Source # stimes :: Integral b => b -> Lifetime -> Lifetime Source #
Semigroup All | Since: 4.9.0.0
Methods (<>) :: All -> All -> All Source # sconcat :: NonEmpty All -> All Source # stimes :: Integral b => b -> All -> All Source #
Semigroup Any | Since: 4.9.0.0
Methods (<>) :: Any -> Any -> Any Source # sconcat :: NonEmpty Any -> Any Source # stimes :: Integral b => b -> Any -> Any Source #
Semigroup Builder |
Methods (<>) :: Builder -> Builder -> Builder Source # sconcat :: NonEmpty Builder -> Builder Source # stimes :: Integral b => b -> Builder -> Builder Source #
Semigroup ByteString |
Methods (<>) :: ByteString -> ByteString -> ByteString Source # sconcat :: NonEmpty ByteString -> ByteString Source # stimes :: Integral b => b -> ByteString -> ByteString Source #
Semigroup ShortByteString |
Methods (<>) :: ShortByteString -> ShortByteString -> ShortByteString Source # sconcat :: NonEmpty ShortByteString -> ShortByteString Source # stimes :: Integral b => b -> ShortByteString -> ShortByteString Source #
Semigroup ByteString |
Methods (<>) :: ByteString -> ByteString -> ByteString Source # sconcat :: NonEmpty ByteString -> ByteString Source # stimes :: Integral b => b -> ByteString -> ByteString Source #
Semigroup IntSet |
Methods (<>) :: IntSet -> IntSet -> IntSet Source # sconcat :: NonEmpty IntSet -> IntSet Source # stimes :: Integral b => b -> IntSet -> IntSet Source #
Semigroup Doc |
Methods (<>) :: Doc -> Doc -> Doc Source # sconcat :: NonEmpty Doc -> Doc Source # stimes :: Integral b => b -> Doc -> Doc Source #
Semigroup CDialect # |
Methods (<>) :: CDialect -> CDialect -> CDialect Source # sconcat :: NonEmpty CDialect -> CDialect Source # stimes :: Integral b => b -> CDialect -> CDialect Source #
Semigroup ExecutableScope # |
Methods (<>) :: ExecutableScope -> ExecutableScope -> ExecutableScope Source # sconcat :: NonEmpty ExecutableScope -> ExecutableScope Source # stimes :: Integral b => b -> ExecutableScope -> ExecutableScope Source #
Semigroup ForeignLibType # |
Methods (<>) :: ForeignLibType -> ForeignLibType -> ForeignLibType Source # sconcat :: NonEmpty ForeignLibType -> ForeignLibType Source # stimes :: Integral b => b -> ForeignLibType -> ForeignLibType Source #
Semigroup ShortText # |
Methods (<>) :: ShortText -> ShortText -> ShortText Source # sconcat :: NonEmpty ShortText -> ShortText Source # stimes :: Integral b => b -> ShortText -> ShortText Source #
Semigroup TestSuiteInterface # |
Methods (<>) :: TestSuiteInterface -> TestSuiteInterface -> TestSuiteInterface Source # sconcat :: NonEmpty TestSuiteInterface -> TestSuiteInterface Source # stimes :: Integral b => b -> TestSuiteInterface -> TestSuiteInterface Source #
Semigroup BenchmarkInterface # |
Methods (<>) :: BenchmarkInterface -> BenchmarkInterface -> BenchmarkInterface Source # sconcat :: NonEmpty BenchmarkInterface -> BenchmarkInterface Source # stimes :: Integral b => b -> BenchmarkInterface -> BenchmarkInterface Source #
Semigroup UnqualComponentName # |
Methods (<>) :: UnqualComponentName -> UnqualComponentName -> UnqualComponentName Source # sconcat :: NonEmpty UnqualComponentName -> UnqualComponentName Source # stimes :: Integral b => b -> UnqualComponentName -> UnqualComponentName Source #
Semigroup SetupBuildInfo # |
Methods (<>) :: SetupBuildInfo -> SetupBuildInfo -> SetupBuildInfo Source # sconcat :: NonEmpty SetupBuildInfo -> SetupBuildInfo Source # stimes :: Integral b => b -> SetupBuildInfo -> SetupBuildInfo Source #
Semigroup DependencyMap # |
Methods (<>) :: DependencyMap -> DependencyMap -> DependencyMap Source # sconcat :: NonEmpty DependencyMap -> DependencyMap Source # stimes :: Integral b => b -> DependencyMap -> DependencyMap Source #
Semigroup BuildInfo # |
Methods (<>) :: BuildInfo -> BuildInfo -> BuildInfo Source # sconcat :: NonEmpty BuildInfo -> BuildInfo Source # stimes :: Integral b => b -> BuildInfo -> BuildInfo Source #
Semigroup TestSuite # |
Methods (<>) :: TestSuite -> TestSuite -> TestSuite Source # sconcat :: NonEmpty TestSuite -> TestSuite Source # stimes :: Integral b => b -> TestSuite -> TestSuite Source #
Semigroup Library # |
Methods (<>) :: Library -> Library -> Library Source # sconcat :: NonEmpty Library -> Library Source # stimes :: Integral b => b -> Library -> Library Source #
Semigroup ForeignLib # |
Methods (<>) :: ForeignLib -> ForeignLib -> ForeignLib Source # sconcat :: NonEmpty ForeignLib -> ForeignLib Source # stimes :: Integral b => b -> ForeignLib -> ForeignLib Source #
Semigroup Executable # |
Methods (<>) :: Executable -> Executable -> Executable Source # sconcat :: NonEmpty Executable -> Executable Source # stimes :: Integral b => b -> Executable -> Executable Source #
Semigroup Benchmark # |
Methods (<>) :: Benchmark -> Benchmark -> Benchmark Source # sconcat :: NonEmpty Benchmark -> Benchmark Source # stimes :: Integral b => b -> Benchmark -> Benchmark Source #
Semigroup Component # |
Methods (<>) :: Component -> Component -> Component Source # sconcat :: NonEmpty Component -> Component Source # stimes :: Integral b => b -> Component -> Component Source #
Semigroup BenchmarkFlags # |
Methods (<>) :: BenchmarkFlags -> BenchmarkFlags -> BenchmarkFlags Source # sconcat :: NonEmpty BenchmarkFlags -> BenchmarkFlags Source # stimes :: Integral b => b -> BenchmarkFlags -> BenchmarkFlags Source #
Semigroup TestFlags # |
Methods (<>) :: TestFlags -> TestFlags -> TestFlags Source # sconcat :: NonEmpty TestFlags -> TestFlags Source # stimes :: Integral b => b -> TestFlags -> TestFlags Source #
Semigroup TestShowDetails # |
Methods (<>) :: TestShowDetails -> TestShowDetails -> TestShowDetails Source # sconcat :: NonEmpty TestShowDetails -> TestShowDetails Source # stimes :: Integral b => b -> TestShowDetails -> TestShowDetails Source #
Semigroup ReplFlags # |
Methods (<>) :: ReplFlags -> ReplFlags -> ReplFlags Source # sconcat :: NonEmpty ReplFlags -> ReplFlags Source # stimes :: Integral b => b -> ReplFlags -> ReplFlags Source #
Semigroup BuildFlags # |
Methods (<>) :: BuildFlags -> BuildFlags -> BuildFlags Source # sconcat :: NonEmpty BuildFlags -> BuildFlags Source # stimes :: Integral b => b -> BuildFlags -> BuildFlags Source #
Semigroup CleanFlags # |
Methods (<>) :: CleanFlags -> CleanFlags -> CleanFlags Source # sconcat :: NonEmpty CleanFlags -> CleanFlags Source # stimes :: Integral b => b -> CleanFlags -> CleanFlags Source #
Semigroup HaddockFlags # |
Methods (<>) :: HaddockFlags -> HaddockFlags -> HaddockFlags Source # sconcat :: NonEmpty HaddockFlags -> HaddockFlags Source # stimes :: Integral b => b -> HaddockFlags -> HaddockFlags Source #
Semigroup DoctestFlags # |
Methods (<>) :: DoctestFlags -> DoctestFlags -> DoctestFlags Source # sconcat :: NonEmpty DoctestFlags -> DoctestFlags Source # stimes :: Integral b => b -> DoctestFlags -> DoctestFlags Source #
Semigroup HscolourFlags # |
Methods (<>) :: HscolourFlags -> HscolourFlags -> HscolourFlags Source # sconcat :: NonEmpty HscolourFlags -> HscolourFlags Source # stimes :: Integral b => b -> HscolourFlags -> HscolourFlags Source #
Semigroup RegisterFlags # |
Methods (<>) :: RegisterFlags -> RegisterFlags -> RegisterFlags Source # sconcat :: NonEmpty RegisterFlags -> RegisterFlags Source # stimes :: Integral b => b -> RegisterFlags -> RegisterFlags Source #
Semigroup SDistFlags # |
Methods (<>) :: SDistFlags -> SDistFlags -> SDistFlags Source # sconcat :: NonEmpty SDistFlags -> SDistFlags Source # stimes :: Integral b => b -> SDistFlags -> SDistFlags Source #
Semigroup InstallFlags # |
Methods (<>) :: InstallFlags -> InstallFlags -> InstallFlags Source # sconcat :: NonEmpty InstallFlags -> InstallFlags Source # stimes :: Integral b => b -> InstallFlags -> InstallFlags Source #
Semigroup CopyFlags # |
Methods (<>) :: CopyFlags -> CopyFlags -> CopyFlags Source # sconcat :: NonEmpty CopyFlags -> CopyFlags Source # stimes :: Integral b => b -> CopyFlags -> CopyFlags Source #
Semigroup ConfigFlags # |
Methods (<>) :: ConfigFlags -> ConfigFlags -> ConfigFlags Source # sconcat :: NonEmpty ConfigFlags -> ConfigFlags Source # stimes :: Integral b => b -> ConfigFlags -> ConfigFlags Source #
Semigroup AllowOlder # |
Methods (<>) :: AllowOlder -> AllowOlder -> AllowOlder Source # sconcat :: NonEmpty AllowOlder -> AllowOlder Source # stimes :: Integral b => b -> AllowOlder -> AllowOlder Source #
Semigroup AllowNewer # |
Methods (<>) :: AllowNewer -> AllowNewer -> AllowNewer Source # sconcat :: NonEmpty AllowNewer -> AllowNewer Source # stimes :: Integral b => b -> AllowNewer -> AllowNewer Source #
Semigroup RelaxDeps # |
Methods (<>) :: RelaxDeps -> RelaxDeps -> RelaxDeps Source # sconcat :: NonEmpty RelaxDeps -> RelaxDeps Source # stimes :: Integral b => b -> RelaxDeps -> RelaxDeps Source #
Semigroup GlobalFlags # |
Methods (<>) :: GlobalFlags -> GlobalFlags -> GlobalFlags Source # sconcat :: NonEmpty GlobalFlags -> GlobalFlags Source # stimes :: Integral b => b -> GlobalFlags -> GlobalFlags Source #
Semigroup GhcOptions # |
Methods (<>) :: GhcOptions -> GhcOptions -> GhcOptions Source # sconcat :: NonEmpty GhcOptions -> GhcOptions Source # stimes :: Integral b => b -> GhcOptions -> GhcOptions Source #
Semigroup [a] | Since: 4.9.0.0
Methods (<>) :: [a] -> [a] -> [a] Source # sconcat :: NonEmpty [a] -> [a] Source # stimes :: Integral b => b -> [a] -> [a] Source #
Semigroup a => Semigroup (Maybe a) | Since: 4.9.0.0
Methods (<>) :: Maybe a -> Maybe a -> Maybe a Source # sconcat :: NonEmpty (Maybe a) -> Maybe a Source # stimes :: Integral b => b -> Maybe a -> Maybe a Source #
Semigroup a => Semigroup (IO a) | Since: 4.10.0.0
Methods (<>) :: IO a -> IO a -> IO a Source # sconcat :: NonEmpty (IO a) -> IO a Source # stimes :: Integral b => b -> IO a -> IO a Source #
Ord a => Semigroup (Min a) | Since: 4.9.0.0
Methods (<>) :: Min a -> Min a -> Min a Source # sconcat :: NonEmpty (Min a) -> Min a Source # stimes :: Integral b => b -> Min a -> Min a Source #
Ord a => Semigroup (Max a) | Since: 4.9.0.0
Methods (<>) :: Max a -> Max a -> Max a Source # sconcat :: NonEmpty (Max a) -> Max a Source # stimes :: Integral b => b -> Max a -> Max a Source #
Semigroup (First a) | Since: 4.9.0.0
Methods (<>) :: First a -> First a -> First a Source # sconcat :: NonEmpty (First a) -> First a Source # stimes :: Integral b => b -> First a -> First a Source #
Semigroup (Last a) | Since: 4.9.0.0
Methods (<>) :: Last a -> Last a -> Last a Source # sconcat :: NonEmpty (Last a) -> Last a Source # stimes :: Integral b => b -> Last a -> Last a Source #
Monoid m => Semigroup (WrappedMonoid m) | Since: 4.9.0.0
Methods (<>) :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m Source # sconcat :: NonEmpty (WrappedMonoid m) -> WrappedMonoid m Source # stimes :: Integral b => b -> WrappedMonoid m -> WrappedMonoid m Source #
Semigroup a => Semigroup (Option a) | Since: 4.9.0.0
Methods (<>) :: Option a -> Option a -> Option a Source # sconcat :: NonEmpty (Option a) -> Option a Source # stimes :: Integral b => b -> Option a -> Option a Source #
Semigroup (NonEmpty a) | Since: 4.9.0.0
Methods (<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a Source # sconcat :: NonEmpty (NonEmpty a) -> NonEmpty a Source # stimes :: Integral b => b -> NonEmpty a -> NonEmpty a Source #
Semigroup a => Semigroup (Identity a) | Since: 4.9.0.0
Methods (<>) :: Identity a -> Identity a -> Identity a Source # sconcat :: NonEmpty (Identity a) -> Identity a Source # stimes :: Integral b => b -> Identity a -> Identity a Source #
Semigroup a => Semigroup (Dual a) | Since: 4.9.0.0
Methods (<>) :: Dual a -> Dual a -> Dual a Source # sconcat :: NonEmpty (Dual a) -> Dual a Source # stimes :: Integral b => b -> Dual a -> Dual a Source #
Semigroup (Endo a) | Since: 4.9.0.0
Methods (<>) :: Endo a -> Endo a -> Endo a Source # sconcat :: NonEmpty (Endo a) -> Endo a Source # stimes :: Integral b => b -> Endo a -> Endo a Source #
Num a => Semigroup (Sum a) | Since: 4.9.0.0
Methods (<>) :: Sum a -> Sum a -> Sum a Source # sconcat :: NonEmpty (Sum a) -> Sum a Source # stimes :: Integral b => b -> Sum a -> Sum a Source #
Num a => Semigroup (Product a) | Since: 4.9.0.0
Methods (<>) :: Product a -> Product a -> Product a Source # sconcat :: NonEmpty (Product a) -> Product a Source # stimes :: Integral b => b -> Product a -> Product a Source #
Semigroup (First a) | Since: 4.9.0.0
Methods (<>) :: First a -> First a -> First a Source # sconcat :: NonEmpty (First a) -> First a Source # stimes :: Integral b => b -> First a -> First a Source #
Semigroup (Last a) | Since: 4.9.0.0
Methods (<>) :: Last a -> Last a -> Last a Source # sconcat :: NonEmpty (Last a) -> Last a Source # stimes :: Integral b => b -> Last a -> Last a Source #
Semigroup (IntMap a) |
Methods (<>) :: IntMap a -> IntMap a -> IntMap a Source # sconcat :: NonEmpty (IntMap a) -> IntMap a Source # stimes :: Integral b => b -> IntMap a -> IntMap a Source #
Semigroup (Seq a) |
Methods (<>) :: Seq a -> Seq a -> Seq a Source # sconcat :: NonEmpty (Seq a) -> Seq a Source # stimes :: Integral b => b -> Seq a -> Seq a Source #
Ord a => Semigroup (Set a) |
Methods (<>) :: Set a -> Set a -> Set a Source # sconcat :: NonEmpty (Set a) -> Set a Source # stimes :: Integral b => b -> Set a -> Set a Source #
Semigroup (Doc a) |
Methods (<>) :: Doc a -> Doc a -> Doc a Source # sconcat :: NonEmpty (Doc a) -> Doc a Source # stimes :: Integral b => b -> Doc a -> Doc a Source #
Semigroup (PutM ()) |
Methods (<>) :: PutM () -> PutM () -> PutM () Source # sconcat :: NonEmpty (PutM ()) -> PutM () Source # stimes :: Integral b => b -> PutM () -> PutM () Source #
Semigroup (Last' a) # |
Methods (<>) :: Last' a -> Last' a -> Last' a Source # sconcat :: NonEmpty (Last' a) -> Last' a Source # stimes :: Integral b => b -> Last' a -> Last' a Source #
Semigroup (DList a) # |
Methods (<>) :: DList a -> DList a -> DList a Source # sconcat :: NonEmpty (DList a) -> DList a Source # stimes :: Integral b => b -> DList a -> DList a Source #
Semigroup (Condition a) # |
Methods (<>) :: Condition a -> Condition a -> Condition a Source # sconcat :: NonEmpty (Condition a) -> Condition a Source # stimes :: Integral b => b -> Condition a -> Condition a Source #
Semigroup dir => Semigroup (InstallDirs dir) # |
Methods (<>) :: InstallDirs dir -> InstallDirs dir -> InstallDirs dir Source # sconcat :: NonEmpty (InstallDirs dir) -> InstallDirs dir Source # stimes :: Integral b => b -> InstallDirs dir -> InstallDirs dir Source #
Ord a => Semigroup (NubListR a) # |
Methods (<>) :: NubListR a -> NubListR a -> NubListR a Source # sconcat :: NonEmpty (NubListR a) -> NubListR a Source # stimes :: Integral b => b -> NubListR a -> NubListR a Source #
Ord a => Semigroup (NubList a) # |
Methods (<>) :: NubList a -> NubList a -> NubList a Source # sconcat :: NonEmpty (NubList a) -> NubList a Source # stimes :: Integral b => b -> NubList a -> NubList a Source #
Semigroup (PackageIndex InstalledPackageInfo) # |
Methods (<>) :: PackageIndex InstalledPackageInfo -> PackageIndex InstalledPackageInfo -> PackageIndex InstalledPackageInfo Source # sconcat :: NonEmpty (PackageIndex InstalledPackageInfo) -> PackageIndex InstalledPackageInfo Source # stimes :: Integral b => b -> PackageIndex InstalledPackageInfo -> PackageIndex InstalledPackageInfo Source #
Semigroup (Flag a) # |
Methods (<>) :: Flag a -> Flag a -> Flag a Source # sconcat :: NonEmpty (Flag a) -> Flag a Source # stimes :: Integral b => b -> Flag a -> Flag a Source #
Semigroup b => Semigroup (a -> b) | Since: 4.9.0.0
Methods (<>) :: (a -> b) -> (a -> b) -> a -> b Source # sconcat :: NonEmpty (a -> b) -> a -> b Source # stimes :: Integral b => b -> (a -> b) -> a -> b Source #
Semigroup (Either a b) | Since: 4.9.0.0
Methods (<>) :: Either a b -> Either a b -> Either a b Source # sconcat :: NonEmpty (Either a b) -> Either a b Source # stimes :: Integral b => b -> Either a b -> Either a b Source #
(Semigroup a, Semigroup b) => Semigroup (a, b) | Since: 4.9.0.0
Methods (<>) :: (a, b) -> (a, b) -> (a, b) Source # sconcat :: NonEmpty (a, b) -> (a, b) Source # stimes :: Integral b => b -> (a, b) -> (a, b) Source #
Semigroup (Proxy k s) | Since: 4.9.0.0
Methods (<>) :: Proxy k s -> Proxy k s -> Proxy k s Source # sconcat :: NonEmpty (Proxy k s) -> Proxy k s Source # stimes :: Integral b => b -> Proxy k s -> Proxy k s Source #
Ord k => Semigroup (Map k v) |
Methods (<>) :: Map k v -> Map k v -> Map k v Source # sconcat :: NonEmpty (Map k v) -> Map k v Source # stimes :: Integral b => b -> Map k v -> Map k v Source #
(Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c) | Since: 4.9.0.0
Methods (<>) :: (a, b, c) -> (a, b, c) -> (a, b, c) Source # sconcat :: NonEmpty (a, b, c) -> (a, b, c) Source # stimes :: Integral b => b -> (a, b, c) -> (a, b, c) Source #
Semigroup a => Semigroup (Const k a b) | Since: 4.9.0.0
Methods (<>) :: Const k a b -> Const k a b -> Const k a b Source # sconcat :: NonEmpty (Const k a b) -> Const k a b Source # stimes :: Integral b => b -> Const k a b -> Const k a b Source #
Alternative f => Semigroup (Alt * f a) | Since: 4.9.0.0
Methods (<>) :: Alt * f a -> Alt * f a -> Alt * f a Source # sconcat :: NonEmpty (Alt * f a) -> Alt * f a Source # stimes :: Integral b => b -> Alt * f a -> Alt * f a Source #
(Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d) | Since: 4.9.0.0
Methods (<>) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source # sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) Source # stimes :: Integral b => b -> (a, b, c, d) -> (a, b, c, d) Source #
(Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e) | Since: 4.9.0.0
Methods (<>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source # sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) Source # stimes :: Integral b => b -> (a, b, c, d, e) -> (a, b, c, d, e) Source #

class Monoid a where Source #

The class of monoids (types with an associative binary operation that has an identity). Instances should satisfy the following laws:

-     mappend mempty x = x

-     mappend x mempty = x

-     mappend x (mappend y z) = mappend (mappend x y) z

-     mconcat = foldr mappend mempty

The method names refer to the monoid of lists under concatenation, but there are many other instances.

Some types can be viewed as a monoid in more than one way, e.g. both addition and multiplication on numbers. In such cases we often define `newtype`s and make those instances of `Monoid`, e.g. `Sum` and `Product`.

Minimal complete definition

mempty, mappend

Methods

mempty :: a Source #

Identity of `mappend`

mappend :: a -> a -> a Source #

An associative operation

mconcat :: [a] -> a Source #

Fold a list using the monoid. For most types, the default definition for `mconcat` will be used, but the function is included in the class definition so that an optimized version can be provided for specific types.

Instances

Monoid Ordering | Since: 2.1
Methods mempty :: Ordering Source # mappend :: Ordering -> Ordering -> Ordering Source # mconcat :: [Ordering] -> Ordering Source #
Monoid () | Since: 2.1
Methods mempty :: () Source # mappend :: () -> () -> () Source # mconcat :: [()] -> () Source #
Monoid EventLifetime | Since: 4.8.0.0
Methods mempty :: EventLifetime Source # mappend :: EventLifetime -> EventLifetime -> EventLifetime Source # mconcat :: [EventLifetime] -> EventLifetime Source #
Monoid Event | Since: 4.3.1.0
Methods mempty :: Event Source # mappend :: Event -> Event -> Event Source # mconcat :: [Event] -> Event Source #
Monoid Lifetime | `mappend` takes the longer of two lifetimes. Since: 4.8.0.0
Methods mempty :: Lifetime Source # mappend :: Lifetime -> Lifetime -> Lifetime Source # mconcat :: [Lifetime] -> Lifetime Source #
Monoid All | Since: 2.1
Methods mempty :: All Source # mappend :: All -> All -> All Source # mconcat :: [All] -> All Source #
Monoid Any | Since: 2.1
Methods mempty :: Any Source # mappend :: Any -> Any -> Any Source # mconcat :: [Any] -> Any Source #
Monoid Builder |
Methods mempty :: Builder Source # mappend :: Builder -> Builder -> Builder Source # mconcat :: [Builder] -> Builder Source #
Monoid ByteString |
Methods mempty :: ByteString Source # mappend :: ByteString -> ByteString -> ByteString Source # mconcat :: [ByteString] -> ByteString Source #
Monoid ShortByteString |
Methods mempty :: ShortByteString Source # mappend :: ShortByteString -> ShortByteString -> ShortByteString Source # mconcat :: [ShortByteString] -> ShortByteString Source #
Monoid ByteString |
Methods mempty :: ByteString Source # mappend :: ByteString -> ByteString -> ByteString Source # mconcat :: [ByteString] -> ByteString Source #
Monoid IntSet |
Methods mempty :: IntSet Source # mappend :: IntSet -> IntSet -> IntSet Source # mconcat :: [IntSet] -> IntSet Source #
Monoid Doc |
Methods mempty :: Doc Source # mappend :: Doc -> Doc -> Doc Source # mconcat :: [Doc] -> Doc Source #
Monoid CDialect # |
Methods mempty :: CDialect Source # mappend :: CDialect -> CDialect -> CDialect Source # mconcat :: [CDialect] -> CDialect Source #
Monoid ExecutableScope # |
Methods mempty :: ExecutableScope Source # mappend :: ExecutableScope -> ExecutableScope -> ExecutableScope Source # mconcat :: [ExecutableScope] -> ExecutableScope Source #
Monoid ForeignLibType # |
Methods mempty :: ForeignLibType Source # mappend :: ForeignLibType -> ForeignLibType -> ForeignLibType Source # mconcat :: [ForeignLibType] -> ForeignLibType Source #
Monoid ShortText # |
Methods mempty :: ShortText Source # mappend :: ShortText -> ShortText -> ShortText Source # mconcat :: [ShortText] -> ShortText Source #
Monoid TestSuiteInterface # |
Methods mempty :: TestSuiteInterface Source # mappend :: TestSuiteInterface -> TestSuiteInterface -> TestSuiteInterface Source # mconcat :: [TestSuiteInterface] -> TestSuiteInterface Source #
Monoid BenchmarkInterface # |
Methods mempty :: BenchmarkInterface Source # mappend :: BenchmarkInterface -> BenchmarkInterface -> BenchmarkInterface Source # mconcat :: [BenchmarkInterface] -> BenchmarkInterface Source #
Monoid UnqualComponentName # |
Methods mempty :: UnqualComponentName Source # mappend :: UnqualComponentName -> UnqualComponentName -> UnqualComponentName Source # mconcat :: [UnqualComponentName] -> UnqualComponentName Source #
Monoid SetupBuildInfo # |
Methods mempty :: SetupBuildInfo Source # mappend :: SetupBuildInfo -> SetupBuildInfo -> SetupBuildInfo Source # mconcat :: [SetupBuildInfo] -> SetupBuildInfo Source #
Monoid DependencyMap # |
Methods mempty :: DependencyMap Source # mappend :: DependencyMap -> DependencyMap -> DependencyMap Source # mconcat :: [DependencyMap] -> DependencyMap Source #
Monoid BuildInfo # |
Methods mempty :: BuildInfo Source # mappend :: BuildInfo -> BuildInfo -> BuildInfo Source # mconcat :: [BuildInfo] -> BuildInfo Source #
Monoid TestSuite # |
Methods mempty :: TestSuite Source # mappend :: TestSuite -> TestSuite -> TestSuite Source # mconcat :: [TestSuite] -> TestSuite Source #
Monoid Library # |
Methods mempty :: Library Source # mappend :: Library -> Library -> Library Source # mconcat :: [Library] -> Library Source #
Monoid ForeignLib # |
Methods mempty :: ForeignLib Source # mappend :: ForeignLib -> ForeignLib -> ForeignLib Source # mconcat :: [ForeignLib] -> ForeignLib Source #
Monoid Executable # |
Methods mempty :: Executable Source # mappend :: Executable -> Executable -> Executable Source # mconcat :: [Executable] -> Executable Source #
Monoid Benchmark # |
Methods mempty :: Benchmark Source # mappend :: Benchmark -> Benchmark -> Benchmark Source # mconcat :: [Benchmark] -> Benchmark Source #
Monoid BenchmarkFlags # |
Methods mempty :: BenchmarkFlags Source # mappend :: BenchmarkFlags -> BenchmarkFlags -> BenchmarkFlags Source # mconcat :: [BenchmarkFlags] -> BenchmarkFlags Source #
Monoid TestFlags # |
Methods mempty :: TestFlags Source # mappend :: TestFlags -> TestFlags -> TestFlags Source # mconcat :: [TestFlags] -> TestFlags Source #
Monoid TestShowDetails # |
Methods mempty :: TestShowDetails Source # mappend :: TestShowDetails -> TestShowDetails -> TestShowDetails Source # mconcat :: [TestShowDetails] -> TestShowDetails Source #
Monoid ReplFlags # |
Methods mempty :: ReplFlags Source # mappend :: ReplFlags -> ReplFlags -> ReplFlags Source # mconcat :: [ReplFlags] -> ReplFlags Source #
Monoid BuildFlags # |
Methods mempty :: BuildFlags Source # mappend :: BuildFlags -> BuildFlags -> BuildFlags Source # mconcat :: [BuildFlags] -> BuildFlags Source #
Monoid CleanFlags # |
Methods mempty :: CleanFlags Source # mappend :: CleanFlags -> CleanFlags -> CleanFlags Source # mconcat :: [CleanFlags] -> CleanFlags Source #
Monoid HaddockFlags # |
Methods mempty :: HaddockFlags Source # mappend :: HaddockFlags -> HaddockFlags -> HaddockFlags Source # mconcat :: [HaddockFlags] -> HaddockFlags Source #
Monoid DoctestFlags # |
Methods mempty :: DoctestFlags Source # mappend :: DoctestFlags -> DoctestFlags -> DoctestFlags Source # mconcat :: [DoctestFlags] -> DoctestFlags Source #
Monoid HscolourFlags # |
Methods mempty :: HscolourFlags Source # mappend :: HscolourFlags -> HscolourFlags -> HscolourFlags Source # mconcat :: [HscolourFlags] -> HscolourFlags Source #
Monoid RegisterFlags # |
Methods mempty :: RegisterFlags Source # mappend :: RegisterFlags -> RegisterFlags -> RegisterFlags Source # mconcat :: [RegisterFlags] -> RegisterFlags Source #
Monoid SDistFlags # |
Methods mempty :: SDistFlags Source # mappend :: SDistFlags -> SDistFlags -> SDistFlags Source # mconcat :: [SDistFlags] -> SDistFlags Source #
Monoid InstallFlags # |
Methods mempty :: InstallFlags Source # mappend :: InstallFlags -> InstallFlags -> InstallFlags Source # mconcat :: [InstallFlags] -> InstallFlags Source #
Monoid CopyFlags # |
Methods mempty :: CopyFlags Source # mappend :: CopyFlags -> CopyFlags -> CopyFlags Source # mconcat :: [CopyFlags] -> CopyFlags Source #
Monoid ConfigFlags # |
Methods mempty :: ConfigFlags Source # mappend :: ConfigFlags -> ConfigFlags -> ConfigFlags Source # mconcat :: [ConfigFlags] -> ConfigFlags Source #
Monoid AllowOlder # |
Methods mempty :: AllowOlder Source # mappend :: AllowOlder -> AllowOlder -> AllowOlder Source # mconcat :: [AllowOlder] -> AllowOlder Source #
Monoid AllowNewer # |
Methods mempty :: AllowNewer Source # mappend :: AllowNewer -> AllowNewer -> AllowNewer Source # mconcat :: [AllowNewer] -> AllowNewer Source #
Monoid RelaxDeps # |
Methods mempty :: RelaxDeps Source # mappend :: RelaxDeps -> RelaxDeps -> RelaxDeps Source # mconcat :: [RelaxDeps] -> RelaxDeps Source #
Monoid GlobalFlags # |
Methods mempty :: GlobalFlags Source # mappend :: GlobalFlags -> GlobalFlags -> GlobalFlags Source # mconcat :: [GlobalFlags] -> GlobalFlags Source #
Monoid GhcOptions # |
Methods mempty :: GhcOptions Source # mappend :: GhcOptions -> GhcOptions -> GhcOptions Source # mconcat :: [GhcOptions] -> GhcOptions Source #
Monoid [a] | Since: 2.1
Methods mempty :: [a] Source # mappend :: [a] -> [a] -> [a] Source # mconcat :: [[a]] -> [a] Source #
Monoid a => Monoid (Maybe a) | Lift a semigroup into `Maybe` forming a `Monoid` according to http://en.wikipedia.org/wiki/Monoid: "Any semigroup `S` may be turned into a monoid simply by adjoining an element `e` not in `S` and defining `e*e = e` and `e*s = s = s*e` for all `s ∈ S`." Since there used to be no "Semigroup" typeclass providing just `mappend`, we use `Monoid` instead. Since: 2.1
Methods mempty :: Maybe a Source # mappend :: Maybe a -> Maybe a -> Maybe a Source # mconcat :: [Maybe a] -> Maybe a Source #
Monoid a => Monoid (IO a) | Since: 4.9.0.0
Methods mempty :: IO a Source # mappend :: IO a -> IO a -> IO a Source # mconcat :: [IO a] -> IO a Source #
(Ord a, Bounded a) => Monoid (Min a) | Since: 4.9.0.0
Methods mempty :: Min a Source # mappend :: Min a -> Min a -> Min a Source # mconcat :: [Min a] -> Min a Source #
(Ord a, Bounded a) => Monoid (Max a) | Since: 4.9.0.0
Methods mempty :: Max a Source # mappend :: Max a -> Max a -> Max a Source # mconcat :: [Max a] -> Max a Source #
Monoid m => Monoid (WrappedMonoid m) | Since: 4.9.0.0
Methods mempty :: WrappedMonoid m Source # mappend :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m Source # mconcat :: [WrappedMonoid m] -> WrappedMonoid m Source #
Semigroup a => Monoid (Option a) | Since: 4.9.0.0
Methods mempty :: Option a Source # mappend :: Option a -> Option a -> Option a Source # mconcat :: [Option a] -> Option a Source #
Monoid a => Monoid (Identity a) |
Methods mempty :: Identity a Source # mappend :: Identity a -> Identity a -> Identity a Source # mconcat :: [Identity a] -> Identity a Source #
Monoid a => Monoid (Dual a) | Since: 2.1
Methods mempty :: Dual a Source # mappend :: Dual a -> Dual a -> Dual a Source # mconcat :: [Dual a] -> Dual a Source #
Monoid (Endo a) | Since: 2.1
Methods mempty :: Endo a Source # mappend :: Endo a -> Endo a -> Endo a Source # mconcat :: [Endo a] -> Endo a Source #
Num a => Monoid (Sum a) | Since: 2.1
Methods mempty :: Sum a Source # mappend :: Sum a -> Sum a -> Sum a Source # mconcat :: [Sum a] -> Sum a Source #
Num a => Monoid (Product a) | Since: 2.1
Methods mempty :: Product a Source # mappend :: Product a -> Product a -> Product a Source # mconcat :: [Product a] -> Product a Source #
Monoid (First a) | Since: 2.1
Methods mempty :: First a Source # mappend :: First a -> First a -> First a Source # mconcat :: [First a] -> First a Source #
Monoid (Last a) | Since: 2.1
Methods mempty :: Last a Source # mappend :: Last a -> Last a -> Last a Source # mconcat :: [Last a] -> Last a Source #
Monoid (IntMap a) |
Methods mempty :: IntMap a Source # mappend :: IntMap a -> IntMap a -> IntMap a Source # mconcat :: [IntMap a] -> IntMap a Source #
Monoid (Seq a) |
Methods mempty :: Seq a Source # mappend :: Seq a -> Seq a -> Seq a Source # mconcat :: [Seq a] -> Seq a Source #
Ord a => Monoid (Set a) |
Methods mempty :: Set a Source # mappend :: Set a -> Set a -> Set a Source # mconcat :: [Set a] -> Set a Source #
Monoid (Doc a) |
Methods mempty :: Doc a Source # mappend :: Doc a -> Doc a -> Doc a Source # mconcat :: [Doc a] -> Doc a Source #
Monoid (PutM ()) |
Methods mempty :: PutM () Source # mappend :: PutM () -> PutM () -> PutM () Source # mconcat :: [PutM ()] -> PutM () Source #
Monoid (Last' a) # |
Methods mempty :: Last' a Source # mappend :: Last' a -> Last' a -> Last' a Source # mconcat :: [Last' a] -> Last' a Source #
Monoid (DList a) # |
Methods mempty :: DList a Source # mappend :: DList a -> DList a -> DList a Source # mconcat :: [DList a] -> DList a Source #
Monoid (Condition a) # |
Methods mempty :: Condition a Source # mappend :: Condition a -> Condition a -> Condition a Source # mconcat :: [Condition a] -> Condition a Source #
(Semigroup dir, Monoid dir) => Monoid (InstallDirs dir) # |
Methods mempty :: InstallDirs dir Source # mappend :: InstallDirs dir -> InstallDirs dir -> InstallDirs dir Source # mconcat :: [InstallDirs dir] -> InstallDirs dir Source #
Ord a => Monoid (NubListR a) # |
Methods mempty :: NubListR a Source # mappend :: NubListR a -> NubListR a -> NubListR a Source # mconcat :: [NubListR a] -> NubListR a Source #

Ord a => Monoid (NubList a) #

Monoid operations on NubLists. For a valid Monoid instance we need to satistfy the required monoid laws; identity, associativity and closure.

Identity : by inspection: mempty `mappend` NubList xs == NubList xs `mappend` mempty

Associativity : by inspection: (NubList xs `mappend` NubList ys) `mappend` NubList zs == NubList xs `mappend` (NubList ys `mappend` NubList zs)

Closure : appending two lists of type a and removing duplicates obviously does not change the type.

Methods mempty :: NubList a Source # mappend :: NubList a -> NubList a -> NubList a Source # mconcat :: [NubList a] -> NubList a Source #
Monoid (PackageIndex InstalledPackageInfo) # |
Methods mempty :: PackageIndex InstalledPackageInfo Source # mappend :: PackageIndex InstalledPackageInfo -> PackageIndex InstalledPackageInfo -> PackageIndex InstalledPackageInfo Source # mconcat :: [PackageIndex InstalledPackageInfo] -> PackageIndex InstalledPackageInfo Source #
Monoid (Flag a) # |
Methods mempty :: Flag a Source # mappend :: Flag a -> Flag a -> Flag a Source # mconcat :: [Flag a] -> Flag a Source #
Monoid b => Monoid (a -> b) | Since: 2.1
Methods mempty :: a -> b Source # mappend :: (a -> b) -> (a -> b) -> a -> b Source # mconcat :: [a -> b] -> a -> b Source #
(Monoid a, Monoid b) => Monoid (a, b) | Since: 2.1
Methods mempty :: (a, b) Source # mappend :: (a, b) -> (a, b) -> (a, b) Source # mconcat :: [(a, b)] -> (a, b) Source #
Monoid (Proxy k s) | Since: 4.7.0.0
Methods mempty :: Proxy k s Source # mappend :: Proxy k s -> Proxy k s -> Proxy k s Source # mconcat :: [Proxy k s] -> Proxy k s Source #
Ord k => Monoid (Map k v) |
Methods mempty :: Map k v Source # mappend :: Map k v -> Map k v -> Map k v Source # mconcat :: [Map k v] -> Map k v Source #
(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) | Since: 2.1
Methods mempty :: (a, b, c) Source # mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) Source # mconcat :: [(a, b, c)] -> (a, b, c) Source #
Monoid a => Monoid (Const k a b) |
Methods mempty :: Const k a b Source # mappend :: Const k a b -> Const k a b -> Const k a b Source # mconcat :: [Const k a b] -> Const k a b Source #
Alternative f => Monoid (Alt * f a) | Since: 4.8.0.0
Methods mempty :: Alt * f a Source # mappend :: Alt * f a -> Alt * f a -> Alt * f a Source # mconcat :: [Alt * f a] -> Alt * f a Source #
(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) | Since: 2.1
Methods mempty :: (a, b, c, d) Source # mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) Source # mconcat :: [(a, b, c, d)] -> (a, b, c, d) Source #
(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) | Since: 2.1
Methods mempty :: (a, b, c, d, e) Source # mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) Source # mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) Source #

newtype All :: * Source #

Boolean monoid under conjunction (`&&`).

Constructors

All |

Fields

- getAll :: Bool

Instances

Bounded All |
Methods minBound :: All Source # maxBound :: All Source #
Eq All |
Methods (==) :: All -> All -> Bool # (/=) :: All -> All -> Bool #
Data All | Since: 4.8.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> All -> c All Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c All Source #

toConstr :: All -> Constr Source #

dataTypeOf :: All -> DataType Source #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c All) Source #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c All) Source #

gmapT :: (forall b. Data b => b -> b) -> All -> All Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> All -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> All -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> All -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> All -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> All -> m All Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> All -> m All Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> All -> m All Source #

Ord All |
Methods compare :: All -> All -> Ordering # (<) :: All -> All -> Bool # (<=) :: All -> All -> Bool # (>) :: All -> All -> Bool # (>=) :: All -> All -> Bool # max :: All -> All -> All # min :: All -> All -> All #
Read All |
Methods readsPrec :: Int -> ReadS All Source # readList :: ReadS [All] Source # readPrec :: ReadPrec All Source # readListPrec :: ReadPrec [All] Source #
Show All |
Methods showsPrec :: Int -> All -> ShowS Source # show :: All -> String Source # showList :: [All] -> ShowS Source #
Generic All |
Associated Types type Rep All :: * -> * Source # Methods from :: All -> Rep All x Source # to :: Rep All x -> All Source #
Semigroup All | Since: 4.9.0.0
Methods (<>) :: All -> All -> All Source # sconcat :: NonEmpty All -> All Source # stimes :: Integral b => b -> All -> All Source #
Monoid All | Since: 2.1
Methods mempty :: All Source # mappend :: All -> All -> All Source # mconcat :: [All] -> All Source #
NFData All | Since: 1.4.0.0
Methods rnf :: All -> () Source #
Binary All | Since: 0.8.4.0
Methods put :: All -> Put Source # get :: Get All Source # putList :: [All] -> Put Source #
type Rep All |
type Rep All = D1 * (MetaData "All" "Data.Monoid" "base" True) (C1 * (MetaCons "All" PrefixI True) (S1 * (MetaSel (Just Symbol "getAll") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)))

newtype Any :: * Source #

Boolean monoid under disjunction (`||`).

Constructors

Any |

Fields

- getAny :: Bool

Instances

Bounded Any |
Methods minBound :: Any Source # maxBound :: Any Source #
Eq Any |
Methods (==) :: Any -> Any -> Bool # (/=) :: Any -> Any -> Bool #
Data Any | Since: 4.8.0.0

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Any -> c Any Source #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Any Source #

toConstr :: Any -> Constr Source #

dataTypeOf :: Any -> DataType Source #

dataCast1 :: Typeable (* -> *) t => (forall d. Data d => c (t d)) -> Maybe (c Any) Source #

dataCast2 :: Typeable (* -> * -> *) t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Any) Source #

gmapT :: (forall b. Data b => b -> b) -> Any -> Any Source #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Any -> r Source #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Any -> r Source #

gmapQ :: (forall d. Data d => d -> u) -> Any -> [u] Source #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Any -> u Source #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Any -> m Any Source #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Any -> m Any Source #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Any -> m Any Source #

Ord Any |
Methods compare :: Any -> Any -> Ordering # (<) :: Any -> Any -> Bool # (<=) :: Any -> Any -> Bool # (>) :: Any -> Any -> Bool # (>=) :: Any -> Any -> Bool # max :: Any -> Any -> Any # min :: Any -> Any -> Any #
Read Any |
Methods readsPrec :: Int -> ReadS Any Source # readList :: ReadS [Any] Source # readPrec :: ReadPrec Any Source # readListPrec :: ReadPrec [Any] Source #
Show Any |
Methods showsPrec :: Int -> Any -> ShowS Source # show :: Any -> String Source # showList :: [Any] -> ShowS Source #
Generic Any |
Associated Types type Rep Any :: * -> * Source # Methods from :: Any -> Rep Any x Source # to :: Rep Any x -> Any Source #
Semigroup Any | Since: 4.9.0.0
Methods (<>) :: Any -> Any -> Any Source # sconcat :: NonEmpty Any -> Any Source # stimes :: Integral b => b -> Any -> Any Source #
Monoid Any | Since: 2.1
Methods mempty :: Any Source # mappend :: Any -> Any -> Any Source # mconcat :: [Any] -> Any Source #
NFData Any | Since: 1.4.0.0
Methods rnf :: Any -> () Source #
Binary Any | Since: 0.8.4.0
Methods put :: Any -> Put Source # get :: Get Any Source # putList :: [Any] -> Put Source #
type Rep Any |
type Rep Any = D1 * (MetaData "Any" "Data.Monoid" "base" True) (C1 * (MetaCons "Any" PrefixI True) (S1 * (MetaSel (Just Symbol "getAny") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * Bool)))

newtype Last' a #

Cabal's own `Last` copy to avoid requiring an orphan `Binary` instance.

Once the oldest `binary` version we support provides a `Binary` instance for `Last` we can remove this one here.

NB: `Last` is defined differently and not a `Monoid`

Constructors

Last' |

Fields

- getLast' :: Maybe a

Instances

Functor Last' # |
Methods fmap :: (a -> b) -> Last' a -> Last' b Source # (<$) :: a -> Last' b -> Last' a Source #
Applicative Last' # |
Methods pure :: a -> Last' a Source # (<*>) :: Last' (a -> b) -> Last' a -> Last' b Source # liftA2 :: (a -> b -> c) -> Last' a -> Last' b -> Last' c Source # (*>) :: Last' a -> Last' b -> Last' b Source # (<*) :: Last' a -> Last' b -> Last' a Source #
Eq a => Eq (Last' a) # |
Methods (==) :: Last' a -> Last' a -> Bool # (/=) :: Last' a -> Last' a -> Bool #
Ord a => Ord (Last' a) # |
Methods compare :: Last' a -> Last' a -> Ordering # (<) :: Last' a -> Last' a -> Bool # (<=) :: Last' a -> Last' a -> Bool # (>) :: Last' a -> Last' a -> Bool # (>=) :: Last' a -> Last' a -> Bool # max :: Last' a -> Last' a -> Last' a # min :: Last' a -> Last' a -> Last' a #
Read a => Read (Last' a) # |
Methods readsPrec :: Int -> ReadS (Last' a) Source # readList :: ReadS [Last' a] Source # readPrec :: ReadPrec (Last' a) Source # readListPrec :: ReadPrec [Last' a] Source #
Show a => Show (Last' a) # |
Methods showsPrec :: Int -> Last' a -> ShowS Source # show :: Last' a -> String Source # showList :: [Last' a] -> ShowS Source #
Generic (Last' a) # |
Associated Types type Rep (Last' a) :: * -> * Source # Methods from :: Last' a -> Rep (Last' a) x Source # to :: Rep (Last' a) x -> Last' a Source #
Semigroup (Last' a) # |
Methods (<>) :: Last' a -> Last' a -> Last' a Source # sconcat :: NonEmpty (Last' a) -> Last' a Source # stimes :: Integral b => b -> Last' a -> Last' a Source #
Monoid (Last' a) # |
Methods mempty :: Last' a Source # mappend :: Last' a -> Last' a -> Last' a Source # mconcat :: [Last' a] -> Last' a Source #
Binary a => Binary (Last' a) # |
Methods put :: Last' a -> Put Source # get :: Get (Last' a) Source # putList :: [Last' a] -> Put Source #
type Rep (Last' a) # |
type Rep (Last' a) = D1 * (MetaData "Last'" "Distribution.Compat.Semigroup" "Cabal-2.0.1.0" True) (C1 * (MetaCons "Last'" PrefixI True) (S1 * (MetaSel (Just Symbol "getLast'") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 * (Maybe a))))

gmappend :: (Generic a, GSemigroup (Rep a)) => a -> a -> a #

Generically generate a `Semigroup` (`<>`) operation for any type implementing `Generic`. This operation will append two values by point-wise appending their component fields. It is only defined for product types.

    gmappend a (gmappend b c) = gmappend (gmappend a b) c

gmempty :: (Generic a, GMonoid (Rep a)) => a #

Generically generate a `Monoid` `mempty` for any product-like type implementing `Generic`.

It is only defined for product types.

    gmappend gmempty a = a = gmappend a gmempty