hedgehog-1.5: Release with confidence.

Hedgehog.Internal.Prelude

Description

Mostly for compatibility across different base Prelude changes.

Synopsis

# Documentation

class Semigroup a where #

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

Instances should satisfy the following:

Associativity
x <> (y <> z) = (x <> y) <> z

You can alternatively define sconcat instead of (<>), in which case the laws are:

Unit
sconcat (pure x) = x
Multiplication
sconcat (join xss) = sconcat (fmap sconcat xss)

Since: base-4.9.0.0

Minimal complete definition

Methods

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

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]


sconcat :: NonEmpty a -> a #

Reduce a non-empty list with <>

The default definition should be sufficient, but this can be overridden for efficiency.

>>> import Data.List.NonEmpty (NonEmpty (..))
>>> sconcat $"Hello" :| [" ", "Haskell", "!"] "Hello Haskell!"  stimes :: Integral b => b -> a -> a # Repeat a value n times. Given that this works on a Semigroup it is allowed to fail if you request 0 or fewer repetitions, and the default definition will do so. By making this a member of the class, idempotent semigroups and monoids can upgrade this to execute in $$\mathcal{O}(1)$$ by picking stimes = stimesIdempotent or stimes = stimesIdempotentMonoid respectively. >>> stimes 4 [1] [1,1,1,1]  #### Instances Instances details  Since: base-4.17.0.0 Instance detailsDefined in Data.Array.Byte Methodsstimes :: Integral b => b -> ByteArray -> ByteArray # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(<>) :: All -> All -> All #stimes :: Integral b => b -> All -> All # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(<>) :: Any -> Any -> Any #stimes :: Integral b => b -> Any -> Any # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: Void -> Void -> Void #stimes :: Integral b => b -> Void -> Void # Instance detailsDefined in Data.ByteString.Builder.Internal Methodsstimes :: Integral b => b -> Builder -> Builder # Instance detailsDefined in Data.ByteString.Internal.Type Methodsstimes :: Integral b => b -> ByteString -> ByteString # Instance detailsDefined in Data.ByteString.Lazy.Internal Methodsstimes :: Integral b => b -> ByteString -> ByteString # Instance detailsDefined in Data.ByteString.Short.Internal Methodsstimes :: Integral b => b -> ShortByteString -> ShortByteString # Since: containers-0.5.7 Instance detailsDefined in Data.IntSet.Internal Methods(<>) :: IntSet -> IntSet -> IntSet #stimes :: Integral b => b -> IntSet -> IntSet # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodsstimes :: Integral b => b -> Ordering -> Ordering # Source # Instance detailsDefined in Hedgehog.Internal.Property Methods(<>) :: Cover -> Cover -> Cover #stimes :: Integral b => b -> Cover -> Cover # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsstimes :: Integral b => b -> CoverCount -> CoverCount # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsstimes :: Integral b => b -> GroupName -> GroupName # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsstimes :: Integral b => b -> Journal -> Journal # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsstimes :: Integral b => b -> LabelName -> LabelName # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsstimes :: Integral b => b -> PropertyName -> PropertyName # Source # Instance detailsDefined in Hedgehog.Internal.Report Methods(<>) :: Style -> Style -> Style #stimes :: Integral b => b -> Style -> Style # Source # Instance detailsDefined in Hedgehog.Internal.Report Methodsstimes :: Integral b => b -> Summary -> Summary # Instance detailsDefined in System.OsString.Internal.Types Methodsstimes :: Integral b => b -> OsString -> OsString # Instance detailsDefined in System.OsString.Internal.Types Methodsstimes :: Integral b => b -> PosixString -> PosixString # Instance detailsDefined in System.OsString.Internal.Types Methodsstimes :: Integral b => b -> WindowsString -> WindowsString # Instance detailsDefined in Text.PrettyPrint.HughesPJ Methods(<>) :: Doc -> Doc -> Doc #stimes :: Integral b => b -> Doc -> Doc # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: () -> () -> () #sconcat :: NonEmpty () -> () #stimes :: Integral b => b -> () -> () # Only defined by async for base >= 4.9Since: async-2.1.0 Instance detailsDefined in Control.Concurrent.Async.Internal Methods(<>) :: Concurrently a -> Concurrently a -> Concurrently a #stimes :: Integral b => b -> Concurrently a -> Concurrently a # Bits a => Semigroup (And a) Since: base-4.16 Instance detailsDefined in Data.Bits Methods(<>) :: And a -> And a -> And a #sconcat :: NonEmpty (And a) -> And a #stimes :: Integral b => b -> And a -> And a # FiniteBits a => Semigroup (Iff a) This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.Since: base-4.16 Instance detailsDefined in Data.Bits Methods(<>) :: Iff a -> Iff a -> Iff a #sconcat :: NonEmpty (Iff a) -> Iff a #stimes :: Integral b => b -> Iff a -> Iff a # Bits a => Semigroup (Ior a) Since: base-4.16 Instance detailsDefined in Data.Bits Methods(<>) :: Ior a -> Ior a -> Ior a #sconcat :: NonEmpty (Ior a) -> Ior a #stimes :: Integral b => b -> Ior a -> Ior a # Bits a => Semigroup (Xor a) Since: base-4.16 Instance detailsDefined in Data.Bits Methods(<>) :: Xor a -> Xor a -> Xor a #sconcat :: NonEmpty (Xor a) -> Xor a #stimes :: Integral b => b -> Xor a -> Xor a # Semigroup a => Semigroup (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methods(<>) :: Identity a -> Identity a -> Identity a #sconcat :: NonEmpty (Identity a) -> Identity a #stimes :: Integral b => b -> Identity a -> Identity a # Ord a => Semigroup (Max a) Since: base-4.11.0.0 Instance detailsDefined in Data.Functor.Utils Methods(<>) :: Max a -> Max a -> Max a #sconcat :: NonEmpty (Max a) -> Max a #stimes :: Integral b => b -> Max a -> Max a # Ord a => Semigroup (Min a) Since: base-4.11.0.0 Instance detailsDefined in Data.Functor.Utils Methods(<>) :: Min a -> Min a -> Min a #sconcat :: NonEmpty (Min a) -> Min a #stimes :: Integral b => b -> Min a -> Min a # Since: base-4.9.0.0 Instance detailsDefined in Data.Monoid Methods(<>) :: First a -> First a -> First a #sconcat :: NonEmpty (First a) -> First a #stimes :: Integral b => b -> First a -> First a # Since: base-4.9.0.0 Instance detailsDefined in Data.Monoid Methods(<>) :: Last a -> Last a -> Last a #sconcat :: NonEmpty (Last a) -> Last a #stimes :: Integral b => b -> Last a -> Last a # Semigroup a => Semigroup (Down a) Since: base-4.11.0.0 Instance detailsDefined in Data.Ord Methods(<>) :: Down a -> Down a -> Down a #sconcat :: NonEmpty (Down a) -> Down a #stimes :: Integral b => b -> Down a -> Down a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(<>) :: First a -> First a -> First a #sconcat :: NonEmpty (First a) -> First a #stimes :: Integral b => b -> First a -> First a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(<>) :: Last a -> Last a -> Last a #sconcat :: NonEmpty (Last a) -> Last a #stimes :: Integral b => b -> Last a -> Last a # Ord a => Semigroup (Max a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(<>) :: Max a -> Max a -> Max a #sconcat :: NonEmpty (Max a) -> Max a #stimes :: Integral b => b -> Max a -> Max a # Ord a => Semigroup (Min a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(<>) :: Min a -> Min a -> Min a #sconcat :: NonEmpty (Min a) -> Min a #stimes :: Integral b => b -> Min a -> Min a # Monoid m => Semigroup (WrappedMonoid m) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methods(<>) :: WrappedMonoid m -> WrappedMonoid m -> WrappedMonoid m #stimes :: Integral b => b -> WrappedMonoid m -> WrappedMonoid m # Semigroup a => Semigroup (Dual a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(<>) :: Dual a -> Dual a -> Dual a #sconcat :: NonEmpty (Dual a) -> Dual a #stimes :: Integral b => b -> Dual a -> Dual a # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(<>) :: Endo a -> Endo a -> Endo a #sconcat :: NonEmpty (Endo a) -> Endo a #stimes :: Integral b => b -> Endo a -> Endo a # Num a => Semigroup (Product a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(<>) :: Product a -> Product a -> Product a #sconcat :: NonEmpty (Product a) -> Product a #stimes :: Integral b => b -> Product a -> Product a # Num a => Semigroup (Sum a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(<>) :: Sum a -> Sum a -> Sum a #sconcat :: NonEmpty (Sum a) -> Sum a #stimes :: Integral b => b -> Sum a -> Sum a # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: NonEmpty a -> NonEmpty a -> NonEmpty a #sconcat :: NonEmpty (NonEmpty a) -> NonEmpty a #stimes :: Integral b => b -> NonEmpty a -> NonEmpty a # Semigroup a => Semigroup (STM a) Since: base-4.17.0.0 Instance detailsDefined in GHC.Conc.Sync Methods(<>) :: STM a -> STM a -> STM a #sconcat :: NonEmpty (STM a) -> STM a #stimes :: Integral b => b -> STM a -> STM a # (Generic a, Semigroup (Rep a ())) => Semigroup (Generically a) Since: base-4.17.0.0 Instance detailsDefined in GHC.Generics Methods(<>) :: Generically a -> Generically a -> Generically a #stimes :: Integral b => b -> Generically a -> Generically a # Semigroup p => Semigroup (Par1 p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methods(<>) :: Par1 p -> Par1 p -> Par1 p #sconcat :: NonEmpty (Par1 p) -> Par1 p #stimes :: Integral b => b -> Par1 p -> Par1 p # Num a => Semigroup (AlphaColour a) AlphaColour forms a monoid with over and transparent. Instance detailsDefined in Data.Colour.Internal Methods(<>) :: AlphaColour a -> AlphaColour a -> AlphaColour a #stimes :: Integral b => b -> AlphaColour a -> AlphaColour a # Num a => Semigroup (Colour a) Instance detailsDefined in Data.Colour.Internal Methods(<>) :: Colour a -> Colour a -> Colour a #sconcat :: NonEmpty (Colour a) -> Colour a #stimes :: Integral b => b -> Colour a -> Colour a # Since: containers-0.5.7 Instance detailsDefined in Data.IntMap.Internal Methods(<>) :: IntMap a -> IntMap a -> IntMap a #sconcat :: NonEmpty (IntMap a) -> IntMap a #stimes :: Integral b => b -> IntMap a -> IntMap a # Semigroup (Seq a) Since: containers-0.5.7 Instance detailsDefined in Data.Sequence.Internal Methods(<>) :: Seq a -> Seq a -> Seq a #sconcat :: NonEmpty (Seq a) -> Seq a #stimes :: Integral b => b -> Seq a -> Seq a # Ord a => Semigroup (Intersection a) Instance detailsDefined in Data.Set.Internal Methods(<>) :: Intersection a -> Intersection a -> Intersection a #stimes :: Integral b => b -> Intersection a -> Intersection a # Semigroup (MergeSet a) Instance detailsDefined in Data.Set.Internal Methods(<>) :: MergeSet a -> MergeSet a -> MergeSet a #sconcat :: NonEmpty (MergeSet a) -> MergeSet a #stimes :: Integral b => b -> MergeSet a -> MergeSet a # Ord a => Semigroup (Set a) Since: containers-0.5.7 Instance detailsDefined in Data.Set.Internal Methods(<>) :: Set a -> Set a -> Set a #sconcat :: NonEmpty (Set a) -> Set a #stimes :: Integral b => b -> Set a -> Set a # Semigroup a => Semigroup (IO a) Since: base-4.10.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: IO a -> IO a -> IO a #sconcat :: NonEmpty (IO a) -> IO a #stimes :: Integral b => b -> IO a -> IO a # Semigroup a => Semigroup (Pos a) Source # Instance detailsDefined in Hedgehog.Internal.Discovery Methods(<>) :: Pos a -> Pos a -> Pos a #sconcat :: NonEmpty (Pos a) -> Pos a #stimes :: Integral b => b -> Pos a -> Pos a # Semigroup a => Semigroup (Coverage a) Source # Instance detailsDefined in Hedgehog.Internal.Property Methods(<>) :: Coverage a -> Coverage a -> Coverage a #sconcat :: NonEmpty (Coverage a) -> Coverage a #stimes :: Integral b => b -> Coverage a -> Coverage a # Semigroup a => Semigroup (Label a) Source # This semigroup is right biased. The name, location and percentage from the rightmost Log will be kept. This shouldn't be a problem since the library doesn't allow setting multiple classes with the same ClassifierName. Instance detailsDefined in Hedgehog.Internal.Property Methods(<>) :: Label a -> Label a -> Label a #sconcat :: NonEmpty (Label a) -> Label a #stimes :: Integral b => b -> Label a -> Label a # Semigroup (Doc a) Instance detailsDefined in Text.PrettyPrint.Annotated.HughesPJ Methods(<>) :: Doc a -> Doc a -> Doc a #sconcat :: NonEmpty (Doc a) -> Doc a #stimes :: Integral b => b -> Doc a -> Doc a # Semigroup a => Semigroup (Q a) Since: template-haskell-2.17.0.0 Instance detailsDefined in Language.Haskell.TH.Syntax Methods(<>) :: Q a -> Q a -> Q a #sconcat :: NonEmpty (Q a) -> Q a #stimes :: Integral b => b -> Q a -> Q a # Semigroup (Doc a) Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methods(<>) :: Doc a -> Doc a -> Doc a #sconcat :: NonEmpty (Doc a) -> Doc a #stimes :: Integral b => b -> Doc a -> Doc a # Semigroup a => Semigroup (Maybe a) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: Maybe a -> Maybe a -> Maybe a #sconcat :: NonEmpty (Maybe a) -> Maybe a #stimes :: Integral b => b -> Maybe a -> Maybe a # Semigroup a => Semigroup (a) Since: base-4.15 Instance detailsDefined in GHC.Base Methods(<>) :: (a) -> (a) -> (a) #sconcat :: NonEmpty (a) -> (a) #stimes :: Integral b => b -> (a) -> (a) # Semigroup [a] Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: [a] -> [a] -> [a] #sconcat :: NonEmpty [a] -> [a] #stimes :: Integral b => b -> [a] -> [a] # Semigroup a => Semigroup (ConcurrentlyE e a) Either the combination of the successful results, or the first failure. Instance detailsDefined in Control.Concurrent.Async.Internal Methods(<>) :: ConcurrentlyE e a -> ConcurrentlyE e a -> ConcurrentlyE e a #sconcat :: NonEmpty (ConcurrentlyE e a) -> ConcurrentlyE e a #stimes :: Integral b => b -> ConcurrentlyE e a -> ConcurrentlyE e a # Semigroup (Either a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Either Methods(<>) :: Either a b -> Either a b -> Either a b #sconcat :: NonEmpty (Either a b) -> Either a b #stimes :: Integral b0 => b0 -> Either a b -> Either a b # Since: base-4.9.0.0 Instance detailsDefined in Data.Proxy Methods(<>) :: Proxy s -> Proxy s -> Proxy s #sconcat :: NonEmpty (Proxy s) -> Proxy s #stimes :: Integral b => b -> Proxy s -> Proxy s # Semigroup (U1 p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methods(<>) :: U1 p -> U1 p -> U1 p #sconcat :: NonEmpty (U1 p) -> U1 p #stimes :: Integral b => b -> U1 p -> U1 p # Semigroup (V1 p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methods(<>) :: V1 p -> V1 p -> V1 p #sconcat :: NonEmpty (V1 p) -> V1 p #stimes :: Integral b => b -> V1 p -> V1 p # Semigroup a => Semigroup (ST s a) Since: base-4.11.0.0 Instance detailsDefined in GHC.ST Methods(<>) :: ST s a -> ST s a -> ST s a #sconcat :: NonEmpty (ST s a) -> ST s a #stimes :: Integral b => b -> ST s a -> ST s a # Ord k => Semigroup (Map k v) Instance detailsDefined in Data.Map.Internal Methods(<>) :: Map k v -> Map k v -> Map k v #sconcat :: NonEmpty (Map k v) -> Map k v #stimes :: Integral b => b -> Map k v -> Map k v # (Monad m, Semigroup a) => Semigroup (GenT m a) Source # Instance detailsDefined in Hedgehog.Internal.Gen Methods(<>) :: GenT m a -> GenT m a -> GenT m a #sconcat :: NonEmpty (GenT m a) -> GenT m a #stimes :: Integral b => b -> GenT m a -> GenT m a # (MonadBaseControl IO m, Semigroup a) => Semigroup (Concurrently m a) Instance detailsDefined in Control.Concurrent.Async.Lifted Methods(<>) :: Concurrently m a -> Concurrently m a -> Concurrently m a #sconcat :: NonEmpty (Concurrently m a) -> Concurrently m a #stimes :: Integral b => b -> Concurrently m a -> Concurrently m a # (Semigroup a, Semigroup b) => Semigroup (a, b) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: (a, b) -> (a, b) -> (a, b) #sconcat :: NonEmpty (a, b) -> (a, b) #stimes :: Integral b0 => b0 -> (a, b) -> (a, b) # Semigroup b => Semigroup (a -> b) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: (a -> b) -> (a -> b) -> a -> b #sconcat :: NonEmpty (a -> b) -> a -> b #stimes :: Integral b0 => b0 -> (a -> b) -> a -> b # Semigroup a => Semigroup (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(<>) :: Const a b -> Const a b -> Const a b #sconcat :: NonEmpty (Const a b) -> Const a b #stimes :: Integral b0 => b0 -> Const a b -> Const a b # (Applicative f, Semigroup a) => Semigroup (Ap f a) Since: base-4.12.0.0 Instance detailsDefined in Data.Monoid Methods(<>) :: Ap f a -> Ap f a -> Ap f a #sconcat :: NonEmpty (Ap f a) -> Ap f a #stimes :: Integral b => b -> Ap f a -> Ap f a # Alternative f => Semigroup (Alt f a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(<>) :: Alt f a -> Alt f a -> Alt f a #sconcat :: NonEmpty (Alt f a) -> Alt f a #stimes :: Integral b => b -> Alt f a -> Alt f a # Semigroup (f p) => Semigroup (Rec1 f p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methods(<>) :: Rec1 f p -> Rec1 f p -> Rec1 f p #sconcat :: NonEmpty (Rec1 f p) -> Rec1 f p #stimes :: Integral b => b -> Rec1 f p -> Rec1 f p # Semigroup a => Semigroup (Tagged s a) Instance detailsDefined in Data.Tagged Methods(<>) :: Tagged s a -> Tagged s a -> Tagged s a #sconcat :: NonEmpty (Tagged s a) -> Tagged s a #stimes :: Integral b => b -> Tagged s a -> Tagged s a # Semigroup a => Semigroup (Constant a b) Instance detailsDefined in Data.Functor.Constant Methods(<>) :: Constant a b -> Constant a b -> Constant a b #sconcat :: NonEmpty (Constant a b) -> Constant a b #stimes :: Integral b0 => b0 -> Constant a b -> Constant a b # (Semigroup a, Semigroup b, Semigroup c) => Semigroup (a, b, c) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: (a, b, c) -> (a, b, c) -> (a, b, c) #sconcat :: NonEmpty (a, b, c) -> (a, b, c) #stimes :: Integral b0 => b0 -> (a, b, c) -> (a, b, c) # (Semigroup (f a), Semigroup (g a)) => Semigroup (Product f g a) Since: base-4.16.0.0 Instance detailsDefined in Data.Functor.Product Methods(<>) :: Product f g a -> Product f g a -> Product f g a #sconcat :: NonEmpty (Product f g a) -> Product f g a #stimes :: Integral b => b -> Product f g a -> Product f g a # (Semigroup (f p), Semigroup (g p)) => Semigroup ((f :*: g) p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methods(<>) :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #sconcat :: NonEmpty ((f :*: g) p) -> (f :*: g) p #stimes :: Integral b => b -> (f :*: g) p -> (f :*: g) p # Semigroup c => Semigroup (K1 i c p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methods(<>) :: K1 i c p -> K1 i c p -> K1 i c p #sconcat :: NonEmpty (K1 i c p) -> K1 i c p #stimes :: Integral b => b -> K1 i c p -> K1 i c p # (Semigroup a, Semigroup b, Semigroup c, Semigroup d) => Semigroup (a, b, c, d) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #sconcat :: NonEmpty (a, b, c, d) -> (a, b, c, d) #stimes :: Integral b0 => b0 -> (a, b, c, d) -> (a, b, c, d) # Semigroup (f (g a)) => Semigroup (Compose f g a) Since: base-4.16.0.0 Instance detailsDefined in Data.Functor.Compose Methods(<>) :: Compose f g a -> Compose f g a -> Compose f g a #sconcat :: NonEmpty (Compose f g a) -> Compose f g a #stimes :: Integral b => b -> Compose f g a -> Compose f g a # Semigroup (f (g p)) => Semigroup ((f :.: g) p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methods(<>) :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #sconcat :: NonEmpty ((f :.: g) p) -> (f :.: g) p #stimes :: Integral b => b -> (f :.: g) p -> (f :.: g) p # Semigroup (f p) => Semigroup (M1 i c f p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methods(<>) :: M1 i c f p -> M1 i c f p -> M1 i c f p #sconcat :: NonEmpty (M1 i c f p) -> M1 i c f p #stimes :: Integral b => b -> M1 i c f p -> M1 i c f p # (Semigroup a, Semigroup b, Semigroup c, Semigroup d, Semigroup e) => Semigroup (a, b, c, d, e) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #sconcat :: NonEmpty (a, b, c, d, e) -> (a, b, c, d, e) #stimes :: Integral b0 => b0 -> (a, b, c, d, e) -> (a, b, c, d, e) # class Monad m => MonadFail (m :: Type -> Type) # When a value is bound in do-notation, the pattern on the left hand side of <- might not match. In this case, this class provides a function to recover. A Monad without a MonadFail instance may only be used in conjunction with pattern that always match, such as newtypes, tuples, data types with only a single data constructor, and irrefutable patterns (~pat). Instances of MonadFail should satisfy the following law: fail s should be a left zero for >>=, fail s >>= f = fail s  If your Monad is also MonadPlus, a popular definition is fail _ = mzero  fail s should be an action that runs in the monad itself, not an exception (except in instances of MonadIO). In particular, fail should not be implemented in terms of error. Since: base-4.9.0.0 Minimal complete definition fail #### Instances Instances details  Since: base-4.9.0.0 Instance detailsDefined in Text.ParserCombinators.ReadP Methodsfail :: String -> P a # Since: base-4.9.0.0 Instance detailsDefined in Text.ParserCombinators.ReadP Methodsfail :: String -> ReadP a # Since: base-4.9.0.0 Instance detailsDefined in Text.ParserCombinators.ReadPrec Methodsfail :: String -> ReadPrec a # Since: base-4.9.0.0 Instance detailsDefined in Control.Monad.Fail Methodsfail :: String -> IO a # Instance detailsDefined in Language.Haskell.TH.Syntax Methodsfail :: String -> Q a # Since: base-4.9.0.0 Instance detailsDefined in Control.Monad.Fail Methodsfail :: String -> Maybe a # Since: base-4.9.0.0 Instance detailsDefined in Control.Monad.Fail Methodsfail :: String -> [a] # Monad m => MonadFail (GenT m) Source # Instance detailsDefined in Hedgehog.Internal.Gen Methodsfail :: String -> GenT m a # Monad m => MonadFail (PropertyT m) Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsfail :: String -> PropertyT m a # Monad m => MonadFail (TestT m) Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsfail :: String -> TestT m a # MonadFail m => MonadFail (ResourceT m) Since: resourcet-1.2.2 Instance detailsDefined in Control.Monad.Trans.Resource.Internal Methodsfail :: String -> ResourceT m a # Monad m => MonadFail (MaybeT m) Instance detailsDefined in Control.Monad.Trans.Maybe Methodsfail :: String -> MaybeT m a # MonadFail f => MonadFail (Ap f) Since: base-4.12.0.0 Instance detailsDefined in Data.Monoid Methodsfail :: String -> Ap f a # (Monoid w, MonadFail m) => MonadFail (AccumT w m) Instance detailsDefined in Control.Monad.Trans.Accum Methodsfail :: String -> AccumT w m a # MonadFail m => MonadFail (ExceptT e m) Instance detailsDefined in Control.Monad.Trans.Except Methodsfail :: String -> ExceptT e m a # MonadFail m => MonadFail (IdentityT m) Instance detailsDefined in Control.Monad.Trans.Identity Methodsfail :: String -> IdentityT m a # MonadFail m => MonadFail (ReaderT r m) Instance detailsDefined in Control.Monad.Trans.Reader Methodsfail :: String -> ReaderT r m a # MonadFail m => MonadFail (SelectT r m) Instance detailsDefined in Control.Monad.Trans.Select Methodsfail :: String -> SelectT r m a # MonadFail m => MonadFail (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Lazy Methodsfail :: String -> StateT s m a # MonadFail m => MonadFail (StateT s m) Instance detailsDefined in Control.Monad.Trans.State.Strict Methodsfail :: String -> StateT s m a # MonadFail m => MonadFail (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.CPS Methodsfail :: String -> WriterT w m a # (Monoid w, MonadFail m) => MonadFail (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Lazy Methodsfail :: String -> WriterT w m a # (Monoid w, MonadFail m) => MonadFail (WriterT w m) Instance detailsDefined in Control.Monad.Trans.Writer.Strict Methodsfail :: String -> WriterT w m a # MonadFail m => MonadFail (Reverse m) Instance detailsDefined in Data.Functor.Reverse Methodsfail :: String -> Reverse m a # MonadFail m => MonadFail (ContT r m) Instance detailsDefined in Control.Monad.Trans.Cont Methodsfail :: String -> ContT r m a # MonadFail m => MonadFail (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.CPS Methodsfail :: String -> RWST r w s m a # (Monoid w, MonadFail m) => MonadFail (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Lazy Methodsfail :: String -> RWST r w s m a # (Monoid w, MonadFail m) => MonadFail (RWST r w s m) Instance detailsDefined in Control.Monad.Trans.RWS.Strict Methodsfail :: String -> RWST r w s m a # data Int # A fixed-precision integer type with at least the range [-2^29 .. 2^29-1]. The exact range for a given implementation can be determined by using minBound and maxBound from the Bounded class. #### Instances Instances details  Since: base-2.1 Instance detailsDefined in GHC.Bits Methods(.&.) :: Int -> Int -> Int #(.|.) :: Int -> Int -> Int #xor :: Int -> Int -> Int #shift :: Int -> Int -> Int #rotate :: Int -> Int -> Int #bit :: Int -> Int #setBit :: Int -> Int -> Int #clearBit :: Int -> Int -> Int #complementBit :: Int -> Int -> Int #testBit :: Int -> Int -> Bool #bitSize :: Int -> Int #isSigned :: Int -> Bool #shiftL :: Int -> Int -> Int #unsafeShiftL :: Int -> Int -> Int #shiftR :: Int -> Int -> Int #unsafeShiftR :: Int -> Int -> Int #rotateL :: Int -> Int -> Int #rotateR :: Int -> Int -> Int #popCount :: Int -> Int # Since: base-4.6.0.0 Instance detailsDefined in GHC.Bits Methods Since: base-2.1 Instance detailsDefined in GHC.Enum Methods Since: base-2.1 Instance detailsDefined in GHC.Enum Methodssucc :: Int -> Int #pred :: Int -> Int #toEnum :: Int -> Int #fromEnum :: Int -> Int #enumFrom :: Int -> [Int] #enumFromThen :: Int -> Int -> [Int] #enumFromTo :: Int -> Int -> [Int] #enumFromThenTo :: Int -> Int -> Int -> [Int] # Since: base-2.1 Instance detailsDefined in GHC.Num Methods(+) :: Int -> Int -> Int #(-) :: Int -> Int -> Int #(*) :: Int -> Int -> Int #negate :: Int -> Int #abs :: Int -> Int #signum :: Int -> Int # Since: base-2.1 Instance detailsDefined in GHC.Read Methods Since: base-2.0.1 Instance detailsDefined in GHC.Real Methodsquot :: Int -> Int -> Int #rem :: Int -> Int -> Int #div :: Int -> Int -> Int #mod :: Int -> Int -> Int #quotRem :: Int -> Int -> (Int, Int) #divMod :: Int -> Int -> (Int, Int) # Since: base-2.0.1 Instance detailsDefined in GHC.Real Methods Since: base-2.1 Instance detailsDefined in GHC.Show MethodsshowsPrec :: Int -> Int -> ShowS #show :: Int -> String #showList :: [Int] -> ShowS # Since: base-2.1 Instance detailsDefined in Text.Printf Methods Instance detailsDefined in Control.DeepSeq Methodsrnf :: Int -> () # Instance detailsDefined in GHC.Classes Methods(==) :: Int -> Int -> Bool #(/=) :: Int -> Int -> Bool # Instance detailsDefined in GHC.Classes Methodscompare :: Int -> Int -> Ordering #(<) :: Int -> Int -> Bool #(<=) :: Int -> Int -> Bool #(>) :: Int -> Int -> Bool #(>=) :: Int -> Int -> Bool #max :: Int -> Int -> Int #min :: Int -> Int -> Int # Instance detailsDefined in Data.Hashable.Class MethodshashWithSalt :: Int -> Int -> Int #hash :: Int -> Int # Instance detailsDefined in System.Random MethodsrandomR :: RandomGen g => (Int, Int) -> g -> (Int, g) #random :: RandomGen g => g -> (Int, g) #randomRs :: RandomGen g => (Int, Int) -> g -> [Int] #randoms :: RandomGen g => g -> [Int] # Instance detailsDefined in System.Random.Internal MethodsuniformM :: StatefulGen g m => g -> m Int # Instance detailsDefined in System.Random.Internal MethodsuniformRM :: StatefulGen g m => (Int, Int) -> g -> m Int # Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methodspretty :: Int -> Doc b #prettyList :: [Int] -> Doc b # Instance detailsDefined in Language.Haskell.TH.Syntax Methodslift :: Quote m => Int -> m Exp #liftTyped :: forall (m :: Type -> Type). Quote m => Int -> Code m Int # Generic1 (URec Int :: k -> Type) Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Int) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec Int a -> Rep1 (URec Int) a #to1 :: forall (a :: k0). Rep1 (URec Int) a -> URec Int a # Foldable (UInt :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Foldable Methodsfold :: Monoid m => UInt m -> m #foldMap :: Monoid m => (a -> m) -> UInt a -> m #foldMap' :: Monoid m => (a -> m) -> UInt a -> m #foldr :: (a -> b -> b) -> b -> UInt a -> b #foldr' :: (a -> b -> b) -> b -> UInt a -> b #foldl :: (b -> a -> b) -> b -> UInt a -> b #foldl' :: (b -> a -> b) -> b -> UInt a -> b #foldr1 :: (a -> a -> a) -> UInt a -> a #foldl1 :: (a -> a -> a) -> UInt a -> a #toList :: UInt a -> [a] #null :: UInt a -> Bool #length :: UInt a -> Int #elem :: Eq a => a -> UInt a -> Bool #maximum :: Ord a => UInt a -> a #minimum :: Ord a => UInt a -> a #sum :: Num a => UInt a -> a #product :: Num a => UInt a -> a # Traversable (UInt :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> UInt a -> f (UInt b) #sequenceA :: Applicative f => UInt (f a) -> f (UInt a) #mapM :: Monad m => (a -> m b) -> UInt a -> m (UInt b) #sequence :: Monad m => UInt (m a) -> m (UInt a) # Functor (URec Int :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Int a -> URec Int b #(<$) :: a -> URec Int b -> URec Int a # Instance detailsDefined in GHC.Generics Associated Typestype Rep (URec Int p) :: Type -> Type # Methodsfrom :: URec Int p -> Rep (URec Int p) x #to :: Rep (URec Int p) x -> URec Int p # Show (URec Int p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics MethodsshowsPrec :: Int -> URec Int p -> ShowS #show :: URec Int p -> String #showList :: [URec Int p] -> ShowS # Eq (URec Int p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(==) :: URec Int p -> URec Int p -> Bool #(/=) :: URec Int p -> URec Int p -> Bool # Ord (URec Int p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodscompare :: URec Int p -> URec Int p -> Ordering #(<) :: URec Int p -> URec Int p -> Bool #(<=) :: URec Int p -> URec Int p -> Bool #(>) :: URec Int p -> URec Int p -> Bool #(>=) :: URec Int p -> URec Int p -> Bool #max :: URec Int p -> URec Int p -> URec Int p #min :: URec Int p -> URec Int p -> URec Int p # data URec Int (p :: k) Used for marking occurrences of Int#Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics data URec Int (p :: k) = UInt {uInt# :: Int#} type Rep1 (URec Int :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics type Rep1 (URec Int :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: k -> Type))) type Rep (URec Int p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics type Rep (URec Int p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UInt" 'PrefixI 'True) (S1 ('MetaSel ('Just "uInt#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UInt :: Type -> Type)))

type String = [Char] #

A String is a list of characters. String constants in Haskell are values of type String.

See Data.List for operations on lists.

data Bool #

Constructors

 False True

#### Instances

Instances details
 Interpret Bool as 1-bit bit-fieldSince: base-4.7.0.0 Instance detailsDefined in GHC.Bits Methods(.&.) :: Bool -> Bool -> Bool #(.|.) :: Bool -> Bool -> Bool #xor :: Bool -> Bool -> Bool #shift :: Bool -> Int -> Bool #rotate :: Bool -> Int -> Bool #bit :: Int -> Bool #setBit :: Bool -> Int -> Bool #clearBit :: Bool -> Int -> Bool #testBit :: Bool -> Int -> Bool #bitSize :: Bool -> Int #shiftL :: Bool -> Int -> Bool #unsafeShiftL :: Bool -> Int -> Bool #shiftR :: Bool -> Int -> Bool #unsafeShiftR :: Bool -> Int -> Bool #rotateL :: Bool -> Int -> Bool #rotateR :: Bool -> Int -> Bool #popCount :: Bool -> Int # Since: base-4.7.0.0 Instance detailsDefined in GHC.Bits Methods Since: base-2.1 Instance detailsDefined in GHC.Enum Methods Since: base-2.1 Instance detailsDefined in GHC.Enum Methodssucc :: Bool -> Bool #pred :: Bool -> Bool #toEnum :: Int -> Bool #fromEnum :: Bool -> Int #enumFrom :: Bool -> [Bool] #enumFromThen :: Bool -> Bool -> [Bool] #enumFromTo :: Bool -> Bool -> [Bool] #enumFromThenTo :: Bool -> Bool -> Bool -> [Bool] # Instance detailsDefined in GHC.Generics Associated Typestype Rep Bool :: Type -> Type # Methodsfrom :: Bool -> Rep Bool x #to :: Rep Bool x -> Bool # SingKind Bool Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype DemoteRep Bool MethodsfromSing :: forall (a :: Bool). Sing a -> DemoteRep Bool Since: base-2.1 Instance detailsDefined in GHC.Read Methods Since: base-2.1 Instance detailsDefined in GHC.Show MethodsshowsPrec :: Int -> Bool -> ShowS #show :: Bool -> String #showList :: [Bool] -> ShowS # Instance detailsDefined in Control.DeepSeq Methodsrnf :: Bool -> () # Instance detailsDefined in GHC.Classes Methods(==) :: Bool -> Bool -> Bool #(/=) :: Bool -> Bool -> Bool # Instance detailsDefined in GHC.Classes Methodscompare :: Bool -> Bool -> Ordering #(<) :: Bool -> Bool -> Bool #(<=) :: Bool -> Bool -> Bool #(>) :: Bool -> Bool -> Bool #(>=) :: Bool -> Bool -> Bool #max :: Bool -> Bool -> Bool #min :: Bool -> Bool -> Bool # Instance detailsDefined in Data.Hashable.Class MethodshashWithSalt :: Int -> Bool -> Int #hash :: Bool -> Int # Instance detailsDefined in System.Random MethodsrandomR :: RandomGen g => (Bool, Bool) -> g -> (Bool, g) #random :: RandomGen g => g -> (Bool, g) #randomRs :: RandomGen g => (Bool, Bool) -> g -> [Bool] #randoms :: RandomGen g => g -> [Bool] # Instance detailsDefined in System.Random.Internal MethodsuniformM :: StatefulGen g m => g -> m Bool # Instance detailsDefined in System.Random.Internal MethodsuniformRM :: StatefulGen g m => (Bool, Bool) -> g -> m Bool # Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methodspretty :: Bool -> Doc b #prettyList :: [Bool] -> Doc b # SingI 'False Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodssing :: Sing 'False SingI 'True Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodssing :: Sing 'True Instance detailsDefined in Language.Haskell.TH.Syntax Methodslift :: Quote m => Bool -> m Exp #liftTyped :: forall (m :: Type -> Type). Quote m => Bool -> Code m Bool # type DemoteRep Bool Instance detailsDefined in GHC.Generics type DemoteRep Bool = Bool type Rep Bool Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics type Rep Bool = D1 ('MetaData "Bool" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "False" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "True" 'PrefixI 'False) (U1 :: Type -> Type)) data Sing (a :: Bool) Instance detailsDefined in GHC.Generics data Sing (a :: Bool) whereSTrue :: Sing 'TrueSFalse :: Sing 'False

data Char #

The character type Char is an enumeration whose values represent Unicode (or equivalently ISO/IEC 10646) code points (i.e. characters, see http://www.unicode.org/ for details). This set extends the ISO 8859-1 (Latin-1) character set (the first 256 characters), which is itself an extension of the ASCII character set (the first 128 characters). A character literal in Haskell has type Char.

To convert a Char to or from the corresponding Int value defined by Unicode, use toEnum and fromEnum from the Enum class respectively (or equivalently ord and chr).

#### Instances

Instances details
 Since: base-2.1 Instance detailsDefined in GHC.Enum Methods Since: base-2.1 Instance detailsDefined in GHC.Enum Methodssucc :: Char -> Char #pred :: Char -> Char #toEnum :: Int -> Char #fromEnum :: Char -> Int #enumFrom :: Char -> [Char] #enumFromThen :: Char -> Char -> [Char] #enumFromTo :: Char -> Char -> [Char] #enumFromThenTo :: Char -> Char -> Char -> [Char] # Since: base-2.1 Instance detailsDefined in GHC.Read Methods Since: base-2.1 Instance detailsDefined in GHC.Show MethodsshowsPrec :: Int -> Char -> ShowS #show :: Char -> String #showList :: [Char] -> ShowS # Since: base-2.1 Instance detailsDefined in Text.Printf MethodstoChar :: Char -> Char # Since: base-2.1 Instance detailsDefined in Text.Printf Methods Instance detailsDefined in System.Console.Concurrent.Internal Methods Instance detailsDefined in System.Console.Regions Methods Instance detailsDefined in Control.DeepSeq Methodsrnf :: Char -> () # Instance detailsDefined in GHC.Classes Methods(==) :: Char -> Char -> Bool #(/=) :: Char -> Char -> Bool # Instance detailsDefined in GHC.Classes Methodscompare :: Char -> Char -> Ordering #(<) :: Char -> Char -> Bool #(<=) :: Char -> Char -> Bool #(>) :: Char -> Char -> Bool #(>=) :: Char -> Char -> Bool #max :: Char -> Char -> Char #min :: Char -> Char -> Char # Instance detailsDefined in Data.Hashable.Class MethodshashWithSalt :: Int -> Char -> Int #hash :: Char -> Int # Instance detailsDefined in System.Random MethodsrandomR :: RandomGen g => (Char, Char) -> g -> (Char, g) #random :: RandomGen g => g -> (Char, g) #randomRs :: RandomGen g => (Char, Char) -> g -> [Char] #randoms :: RandomGen g => g -> [Char] # Instance detailsDefined in System.Random.Internal MethodsuniformM :: StatefulGen g m => g -> m Char # Instance detailsDefined in System.Random.Internal MethodsuniformRM :: StatefulGen g m => (Char, Char) -> g -> m Char # Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methodspretty :: Char -> Doc b #prettyList :: [Char] -> Doc b # Instance detailsDefined in Language.Haskell.TH.Syntax Methodslift :: Quote m => Char -> m Exp #liftTyped :: forall (m :: Type -> Type). Quote m => Char -> Code m Char # Generic1 (URec Char :: k -> Type) Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Char) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec Char a -> Rep1 (URec Char) a #to1 :: forall (a :: k0). Rep1 (URec Char) a -> URec Char a # Foldable (UChar :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Foldable Methodsfold :: Monoid m => UChar m -> m #foldMap :: Monoid m => (a -> m) -> UChar a -> m #foldMap' :: Monoid m => (a -> m) -> UChar a -> m #foldr :: (a -> b -> b) -> b -> UChar a -> b #foldr' :: (a -> b -> b) -> b -> UChar a -> b #foldl :: (b -> a -> b) -> b -> UChar a -> b #foldl' :: (b -> a -> b) -> b -> UChar a -> b #foldr1 :: (a -> a -> a) -> UChar a -> a #foldl1 :: (a -> a -> a) -> UChar a -> a #toList :: UChar a -> [a] #null :: UChar a -> Bool #length :: UChar a -> Int #elem :: Eq a => a -> UChar a -> Bool #maximum :: Ord a => UChar a -> a #minimum :: Ord a => UChar a -> a #sum :: Num a => UChar a -> a #product :: Num a => UChar a -> a # Traversable (UChar :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> UChar a -> f (UChar b) #sequenceA :: Applicative f => UChar (f a) -> f (UChar a) #mapM :: Monad m => (a -> m b) -> UChar a -> m (UChar b) #sequence :: Monad m => UChar (m a) -> m (UChar a) # Functor (URec Char :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Char a -> URec Char b #(<$) :: a -> URec Char b -> URec Char a # Instance detailsDefined in GHC.Generics Associated Typestype Rep (URec Char p) :: Type -> Type # Methodsfrom :: URec Char p -> Rep (URec Char p) x #to :: Rep (URec Char p) x -> URec Char p # Show (URec Char p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics MethodsshowsPrec :: Int -> URec Char p -> ShowS #show :: URec Char p -> String #showList :: [URec Char p] -> ShowS # Eq (URec Char p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(==) :: URec Char p -> URec Char p -> Bool #(/=) :: URec Char p -> URec Char p -> Bool # Ord (URec Char p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodscompare :: URec Char p -> URec Char p -> Ordering #(<) :: URec Char p -> URec Char p -> Bool #(<=) :: URec Char p -> URec Char p -> Bool #(>) :: URec Char p -> URec Char p -> Bool #(>=) :: URec Char p -> URec Char p -> Bool #max :: URec Char p -> URec Char p -> URec Char p #min :: URec Char p -> URec Char p -> URec Char p # data URec Char (p :: k) Used for marking occurrences of Char#Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics data URec Char (p :: k) = UChar {uChar# :: Char#} type Compare (a :: Char) (b :: Char) Instance detailsDefined in Data.Type.Ord type Compare (a :: Char) (b :: Char) = CmpChar a b type Rep1 (URec Char :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics type Rep1 (URec Char :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: k -> Type))) type Rep (URec Char p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics type Rep (URec Char p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UChar" 'PrefixI 'True) (S1 ('MetaSel ('Just "uChar#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UChar :: Type -> Type))) data Double # Double-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE double-precision type. #### Instances Instances details  Since: base-2.1 Instance detailsDefined in GHC.Float Methodsexp :: Double -> Double #log :: Double -> Double #(**) :: Double -> Double -> Double #sin :: Double -> Double #cos :: Double -> Double #tan :: Double -> Double # Since: base-2.1 Instance detailsDefined in GHC.Float MethodsfloatRange :: Double -> (Int, Int) #decodeFloat :: Double -> (Integer, Int) #isNaN :: Double -> Bool #atan2 :: Double -> Double -> Double # Since: base-2.1 Instance detailsDefined in GHC.Read Methods Since: base-2.1 Instance detailsDefined in Text.Printf Methods Instance detailsDefined in Control.DeepSeq Methodsrnf :: Double -> () # Instance detailsDefined in Data.Number.Erf Methodserf :: Double -> Double # Instance detailsDefined in Data.Number.Erf Methods Note that due to the presence of NaN, Double's Eq instance does not satisfy reflexivity.>>> 0/0 == (0/0 :: Double) False Also note that Double's Eq instance does not satisfy substitutivity:>>> 0 == (-0 :: Double) True >>> recip 0 == recip (-0 :: Double) False  Instance detailsDefined in GHC.Classes Methods(==) :: Double -> Double -> Bool #(/=) :: Double -> Double -> Bool # Note that due to the presence of NaN, Double's Ord instance does not satisfy reflexivity.>>> 0/0 <= (0/0 :: Double) False Also note that, due to the same, Ord's operator interactions are not respected by Double's instance:>>> (0/0 :: Double) > 1 False >>> compare (0/0 :: Double) 1 GT  Instance detailsDefined in GHC.Classes Methods(<) :: Double -> Double -> Bool #(<=) :: Double -> Double -> Bool #(>) :: Double -> Double -> Bool #(>=) :: Double -> Double -> Bool #max :: Double -> Double -> Double #min :: Double -> Double -> Double # Note: prior to hashable-1.3.0.0, hash 0.0 /= hash (-0.0)The hash of NaN is not well defined.Since: hashable-1.3.0.0 Instance detailsDefined in Data.Hashable.Class Methodshash :: Double -> Int # Note - random produces values in the closed range [0,1]. Instance detailsDefined in System.Random MethodsrandomR :: RandomGen g => (Double, Double) -> g -> (Double, g) #random :: RandomGen g => g -> (Double, g) #randomRs :: RandomGen g => (Double, Double) -> g -> [Double] #randoms :: RandomGen g => g -> [Double] # Instance detailsDefined in System.Random.Internal MethodsuniformRM :: StatefulGen g m => (Double, Double) -> g -> m Double # Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methodspretty :: Double -> Doc b #prettyList :: [Double] -> Doc b # Instance detailsDefined in Language.Haskell.TH.Syntax Methodslift :: Quote m => Double -> m Exp #liftTyped :: forall (m :: Type -> Type). Quote m => Double -> Code m Double # Generic1 (URec Double :: k -> Type) Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Double) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec Double a -> Rep1 (URec Double) a #to1 :: forall (a :: k0). Rep1 (URec Double) a -> URec Double a # Foldable (UDouble :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Foldable Methodsfold :: Monoid m => UDouble m -> m #foldMap :: Monoid m => (a -> m) -> UDouble a -> m #foldMap' :: Monoid m => (a -> m) -> UDouble a -> m #foldr :: (a -> b -> b) -> b -> UDouble a -> b #foldr' :: (a -> b -> b) -> b -> UDouble a -> b #foldl :: (b -> a -> b) -> b -> UDouble a -> b #foldl' :: (b -> a -> b) -> b -> UDouble a -> b #foldr1 :: (a -> a -> a) -> UDouble a -> a #foldl1 :: (a -> a -> a) -> UDouble a -> a #toList :: UDouble a -> [a] #null :: UDouble a -> Bool #length :: UDouble a -> Int #elem :: Eq a => a -> UDouble a -> Bool #maximum :: Ord a => UDouble a -> a #minimum :: Ord a => UDouble a -> a #sum :: Num a => UDouble a -> a #product :: Num a => UDouble a -> a # Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> UDouble a -> f (UDouble b) #sequenceA :: Applicative f => UDouble (f a) -> f (UDouble a) #mapM :: Monad m => (a -> m b) -> UDouble a -> m (UDouble b) #sequence :: Monad m => UDouble (m a) -> m (UDouble a) # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Double a -> URec Double b #(<$) :: a -> URec Double b -> URec Double a # Instance detailsDefined in GHC.Generics Associated Typestype Rep (URec Double p) :: Type -> Type # Methodsfrom :: URec Double p -> Rep (URec Double p) x #to :: Rep (URec Double p) x -> URec Double p # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics MethodsshowsPrec :: Int -> URec Double p -> ShowS #show :: URec Double p -> String #showList :: [URec Double p] -> ShowS # Eq (URec Double p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(==) :: URec Double p -> URec Double p -> Bool #(/=) :: URec Double p -> URec Double p -> Bool # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodscompare :: URec Double p -> URec Double p -> Ordering #(<) :: URec Double p -> URec Double p -> Bool #(<=) :: URec Double p -> URec Double p -> Bool #(>) :: URec Double p -> URec Double p -> Bool #(>=) :: URec Double p -> URec Double p -> Bool #max :: URec Double p -> URec Double p -> URec Double p #min :: URec Double p -> URec Double p -> URec Double p # data URec Double (p :: k) Used for marking occurrences of Double#Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics data URec Double (p :: k) = UDouble {uDouble# :: Double#} type Rep1 (URec Double :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics type Rep1 (URec Double :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: k -> Type))) type Rep (URec Double p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics type Rep (URec Double p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UDouble" 'PrefixI 'True) (S1 ('MetaSel ('Just "uDouble#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UDouble :: Type -> Type)))

data Float #

Single-precision floating point numbers. It is desirable that this type be at least equal in range and precision to the IEEE single-precision type.

#### Instances

Instances details
 Since: base-2.1 Instance detailsDefined in GHC.Float Methodspi :: Float #exp :: Float -> Float #log :: Float -> Float #sqrt :: Float -> Float #(**) :: Float -> Float -> Float #logBase :: Float -> Float -> Float #sin :: Float -> Float #cos :: Float -> Float #tan :: Float -> Float #asin :: Float -> Float #acos :: Float -> Float #atan :: Float -> Float #sinh :: Float -> Float #cosh :: Float -> Float #tanh :: Float -> Float #asinh :: Float -> Float #acosh :: Float -> Float #atanh :: Float -> Float #log1p :: Float -> Float #expm1 :: Float -> Float # Since: base-2.1 Instance detailsDefined in GHC.Float MethodsfloatRange :: Float -> (Int, Int) #decodeFloat :: Float -> (Integer, Int) #scaleFloat :: Int -> Float -> Float #isNaN :: Float -> Bool #isIEEE :: Float -> Bool #atan2 :: Float -> Float -> Float # Since: base-2.1 Instance detailsDefined in GHC.Read Methods Since: base-2.1 Instance detailsDefined in Text.Printf Methods Instance detailsDefined in Control.DeepSeq Methodsrnf :: Float -> () # Instance detailsDefined in Data.Number.Erf Methodserf :: Float -> Float #erfc :: Float -> Float #erfcx :: Float -> Float # Instance detailsDefined in Data.Number.Erf Methods Note that due to the presence of NaN, Float's Eq instance does not satisfy reflexivity.>>> 0/0 == (0/0 :: Float) False Also note that Float's Eq instance does not satisfy extensionality:>>> 0 == (-0 :: Float) True >>> recip 0 == recip (-0 :: Float) False  Instance detailsDefined in GHC.Classes Methods(==) :: Float -> Float -> Bool #(/=) :: Float -> Float -> Bool # Note that due to the presence of NaN, Float's Ord instance does not satisfy reflexivity.>>> 0/0 <= (0/0 :: Float) False Also note that, due to the same, Ord's operator interactions are not respected by Float's instance:>>> (0/0 :: Float) > 1 False >>> compare (0/0 :: Float) 1 GT  Instance detailsDefined in GHC.Classes Methods(<) :: Float -> Float -> Bool #(<=) :: Float -> Float -> Bool #(>) :: Float -> Float -> Bool #(>=) :: Float -> Float -> Bool #max :: Float -> Float -> Float #min :: Float -> Float -> Float # Note: prior to hashable-1.3.0.0, hash 0.0 /= hash (-0.0)The hash of NaN is not well defined.Since: hashable-1.3.0.0 Instance detailsDefined in Data.Hashable.Class MethodshashWithSalt :: Int -> Float -> Int #hash :: Float -> Int # Note - random produces values in the closed range [0,1]. Instance detailsDefined in System.Random MethodsrandomR :: RandomGen g => (Float, Float) -> g -> (Float, g) #random :: RandomGen g => g -> (Float, g) #randomRs :: RandomGen g => (Float, Float) -> g -> [Float] #randoms :: RandomGen g => g -> [Float] # Instance detailsDefined in System.Random.Internal MethodsuniformRM :: StatefulGen g m => (Float, Float) -> g -> m Float # Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methodspretty :: Float -> Doc b #prettyList :: [Float] -> Doc b # Instance detailsDefined in Language.Haskell.TH.Syntax Methodslift :: Quote m => Float -> m Exp #liftTyped :: forall (m :: Type -> Type). Quote m => Float -> Code m Float # Generic1 (URec Float :: k -> Type) Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Float) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec Float a -> Rep1 (URec Float) a #to1 :: forall (a :: k0). Rep1 (URec Float) a -> URec Float a # Foldable (UFloat :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Foldable Methodsfold :: Monoid m => UFloat m -> m #foldMap :: Monoid m => (a -> m) -> UFloat a -> m #foldMap' :: Monoid m => (a -> m) -> UFloat a -> m #foldr :: (a -> b -> b) -> b -> UFloat a -> b #foldr' :: (a -> b -> b) -> b -> UFloat a -> b #foldl :: (b -> a -> b) -> b -> UFloat a -> b #foldl' :: (b -> a -> b) -> b -> UFloat a -> b #foldr1 :: (a -> a -> a) -> UFloat a -> a #foldl1 :: (a -> a -> a) -> UFloat a -> a #toList :: UFloat a -> [a] #null :: UFloat a -> Bool #length :: UFloat a -> Int #elem :: Eq a => a -> UFloat a -> Bool #maximum :: Ord a => UFloat a -> a #minimum :: Ord a => UFloat a -> a #sum :: Num a => UFloat a -> a #product :: Num a => UFloat a -> a # Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> UFloat a -> f (UFloat b) #sequenceA :: Applicative f => UFloat (f a) -> f (UFloat a) #mapM :: Monad m => (a -> m b) -> UFloat a -> m (UFloat b) #sequence :: Monad m => UFloat (m a) -> m (UFloat a) # Functor (URec Float :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Float a -> URec Float b #(<$) :: a -> URec Float b -> URec Float a # Instance detailsDefined in GHC.Generics Associated Typestype Rep (URec Float p) :: Type -> Type # Methodsfrom :: URec Float p -> Rep (URec Float p) x #to :: Rep (URec Float p) x -> URec Float p # Instance detailsDefined in GHC.Generics MethodsshowsPrec :: Int -> URec Float p -> ShowS #show :: URec Float p -> String #showList :: [URec Float p] -> ShowS # Eq (URec Float p) Instance detailsDefined in GHC.Generics Methods(==) :: URec Float p -> URec Float p -> Bool #(/=) :: URec Float p -> URec Float p -> Bool # Ord (URec Float p) Instance detailsDefined in GHC.Generics Methodscompare :: URec Float p -> URec Float p -> Ordering #(<) :: URec Float p -> URec Float p -> Bool #(<=) :: URec Float p -> URec Float p -> Bool #(>) :: URec Float p -> URec Float p -> Bool #(>=) :: URec Float p -> URec Float p -> Bool #max :: URec Float p -> URec Float p -> URec Float p #min :: URec Float p -> URec Float p -> URec Float p # data URec Float (p :: k) Used for marking occurrences of Float#Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics data URec Float (p :: k) = UFloat {uFloat# :: Float#} type Rep1 (URec Float :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics type Rep1 (URec Float :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: k -> Type))) type Rep (URec Float p) Instance detailsDefined in GHC.Generics type Rep (URec Float p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UFloat" 'PrefixI 'True) (S1 ('MetaSel ('Just "uFloat#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UFloat :: Type -> Type))) data Word # A Word is an unsigned integral type, with the same size as Int. #### Instances Instances details  Since: base-2.1 Instance detailsDefined in GHC.Bits Methods(.&.) :: Word -> Word -> Word #(.|.) :: Word -> Word -> Word #xor :: Word -> Word -> Word #shift :: Word -> Int -> Word #rotate :: Word -> Int -> Word #bit :: Int -> Word #setBit :: Word -> Int -> Word #clearBit :: Word -> Int -> Word #testBit :: Word -> Int -> Bool #bitSize :: Word -> Int #shiftL :: Word -> Int -> Word #unsafeShiftL :: Word -> Int -> Word #shiftR :: Word -> Int -> Word #unsafeShiftR :: Word -> Int -> Word #rotateL :: Word -> Int -> Word #rotateR :: Word -> Int -> Word #popCount :: Word -> Int # Since: base-4.6.0.0 Instance detailsDefined in GHC.Bits Methods Since: base-2.1 Instance detailsDefined in GHC.Enum Methods Since: base-2.1 Instance detailsDefined in GHC.Enum Methodssucc :: Word -> Word #pred :: Word -> Word #toEnum :: Int -> Word #fromEnum :: Word -> Int #enumFrom :: Word -> [Word] #enumFromThen :: Word -> Word -> [Word] #enumFromTo :: Word -> Word -> [Word] #enumFromThenTo :: Word -> Word -> Word -> [Word] # Since: base-2.1 Instance detailsDefined in GHC.Num Methods(+) :: Word -> Word -> Word #(-) :: Word -> Word -> Word #(*) :: Word -> Word -> Word #negate :: Word -> Word #abs :: Word -> Word #signum :: Word -> Word # Since: base-4.5.0.0 Instance detailsDefined in GHC.Read Methods Since: base-2.1 Instance detailsDefined in GHC.Real Methodsquot :: Word -> Word -> Word #rem :: Word -> Word -> Word #div :: Word -> Word -> Word #mod :: Word -> Word -> Word #quotRem :: Word -> Word -> (Word, Word) #divMod :: Word -> Word -> (Word, Word) # Since: base-2.1 Instance detailsDefined in GHC.Real Methods Since: base-2.1 Instance detailsDefined in GHC.Show MethodsshowsPrec :: Int -> Word -> ShowS #show :: Word -> String #showList :: [Word] -> ShowS # Since: base-2.1 Instance detailsDefined in Text.Printf Methods Instance detailsDefined in Control.DeepSeq Methodsrnf :: Word -> () # Instance detailsDefined in GHC.Classes Methods(==) :: Word -> Word -> Bool #(/=) :: Word -> Word -> Bool # Instance detailsDefined in GHC.Classes Methodscompare :: Word -> Word -> Ordering #(<) :: Word -> Word -> Bool #(<=) :: Word -> Word -> Bool #(>) :: Word -> Word -> Bool #(>=) :: Word -> Word -> Bool #max :: Word -> Word -> Word #min :: Word -> Word -> Word # Instance detailsDefined in Data.Hashable.Class MethodshashWithSalt :: Int -> Word -> Int #hash :: Word -> Int # Instance detailsDefined in System.Random MethodsrandomR :: RandomGen g => (Word, Word) -> g -> (Word, g) #random :: RandomGen g => g -> (Word, g) #randomRs :: RandomGen g => (Word, Word) -> g -> [Word] #randoms :: RandomGen g => g -> [Word] # Instance detailsDefined in System.Random.Internal MethodsuniformM :: StatefulGen g m => g -> m Word # Instance detailsDefined in System.Random.Internal MethodsuniformRM :: StatefulGen g m => (Word, Word) -> g -> m Word # Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methodspretty :: Word -> Doc b #prettyList :: [Word] -> Doc b # Instance detailsDefined in Language.Haskell.TH.Syntax Methodslift :: Quote m => Word -> m Exp #liftTyped :: forall (m :: Type -> Type). Quote m => Word -> Code m Word # Generic1 (URec Word :: k -> Type) Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Word) :: k -> Type # Methodsfrom1 :: forall (a :: k0). URec Word a -> Rep1 (URec Word) a #to1 :: forall (a :: k0). Rep1 (URec Word) a -> URec Word a # Foldable (UWord :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Foldable Methodsfold :: Monoid m => UWord m -> m #foldMap :: Monoid m => (a -> m) -> UWord a -> m #foldMap' :: Monoid m => (a -> m) -> UWord a -> m #foldr :: (a -> b -> b) -> b -> UWord a -> b #foldr' :: (a -> b -> b) -> b -> UWord a -> b #foldl :: (b -> a -> b) -> b -> UWord a -> b #foldl' :: (b -> a -> b) -> b -> UWord a -> b #foldr1 :: (a -> a -> a) -> UWord a -> a #foldl1 :: (a -> a -> a) -> UWord a -> a #toList :: UWord a -> [a] #null :: UWord a -> Bool #length :: UWord a -> Int #elem :: Eq a => a -> UWord a -> Bool #maximum :: Ord a => UWord a -> a #minimum :: Ord a => UWord a -> a #sum :: Num a => UWord a -> a #product :: Num a => UWord a -> a # Traversable (UWord :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> UWord a -> f (UWord b) #sequenceA :: Applicative f => UWord (f a) -> f (UWord a) #mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) #sequence :: Monad m => UWord (m a) -> m (UWord a) # Functor (URec Word :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodsfmap :: (a -> b) -> URec Word a -> URec Word b #(<$) :: a -> URec Word b -> URec Word a # Instance detailsDefined in GHC.Generics Associated Typestype Rep (URec Word p) :: Type -> Type # Methodsfrom :: URec Word p -> Rep (URec Word p) x #to :: Rep (URec Word p) x -> URec Word p # Show (URec Word p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics MethodsshowsPrec :: Int -> URec Word p -> ShowS #show :: URec Word p -> String #showList :: [URec Word p] -> ShowS # Eq (URec Word p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(==) :: URec Word p -> URec Word p -> Bool #(/=) :: URec Word p -> URec Word p -> Bool # Ord (URec Word p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodscompare :: URec Word p -> URec Word p -> Ordering #(<) :: URec Word p -> URec Word p -> Bool #(<=) :: URec Word p -> URec Word p -> Bool #(>) :: URec Word p -> URec Word p -> Bool #(>=) :: URec Word p -> URec Word p -> Bool #max :: URec Word p -> URec Word p -> URec Word p #min :: URec Word p -> URec Word p -> URec Word p # data URec Word (p :: k) Used for marking occurrences of Word#Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics data URec Word (p :: k) = UWord {uWord# :: Word#} type Rep1 (URec Word :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics type Rep1 (URec Word :: k -> Type) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: k -> Type))) type Rep (URec Word p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics type Rep (URec Word p) = D1 ('MetaData "URec" "GHC.Generics" "base" 'False) (C1 ('MetaCons "UWord" 'PrefixI 'True) (S1 ('MetaSel ('Just "uWord#") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (UWord :: Type -> Type)))

data Ordering #

Constructors

 LT EQ GT

#### Instances

Instances details
 Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmconcat :: [Ordering] -> Ordering # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodsstimes :: Integral b => b -> Ordering -> Ordering # Since: base-2.1 Instance detailsDefined in GHC.Enum Methods Since: base-2.1 Instance detailsDefined in GHC.Enum MethodsenumFrom :: Ordering -> [Ordering] #enumFromTo :: Ordering -> Ordering -> [Ordering] # Instance detailsDefined in GHC.Generics Associated Typestype Rep Ordering :: Type -> Type # Methodsto :: Rep Ordering x -> Ordering # Since: base-2.1 Instance detailsDefined in GHC.Read Methods Since: base-2.1 Instance detailsDefined in GHC.Show MethodsshowList :: [Ordering] -> ShowS # Instance detailsDefined in Control.DeepSeq Methodsrnf :: Ordering -> () # Instance detailsDefined in GHC.Classes Methods Instance detailsDefined in GHC.Classes Methods(<) :: Ordering -> Ordering -> Bool #(>) :: Ordering -> Ordering -> Bool # Instance detailsDefined in Data.Hashable.Class Methodshash :: Ordering -> Int # type Rep Ordering Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics type Rep Ordering = D1 ('MetaData "Ordering" "GHC.Types" "ghc-prim" 'False) (C1 ('MetaCons "LT" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "EQ" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "GT" 'PrefixI 'False) (U1 :: Type -> Type)))

data Maybe a #

The Maybe type encapsulates an optional value. A value of type Maybe a either contains a value of type a (represented as Just a), or it is empty (represented as Nothing). Using Maybe is a good way to deal with errors or exceptional cases without resorting to drastic measures such as error.

The Maybe type is also a monad. It is a simple kind of error monad, where all errors are represented by Nothing. A richer error monad can be built using the Either type.

Constructors

 Nothing Just a

#### Instances

Instances details
 Since: base-4.9.0.0 Instance detailsDefined in Control.Monad.Fail Methodsfail :: String -> Maybe a # Since: base-4.8.0.0 Instance detailsDefined in Control.Monad.Zip Methodsmzip :: Maybe a -> Maybe b -> Maybe (a, b) #mzipWith :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #munzip :: Maybe (a, b) -> (Maybe a, Maybe b) # Since: base-2.1 Instance detailsDefined in Data.Foldable Methodsfold :: Monoid m => Maybe m -> m #foldMap :: Monoid m => (a -> m) -> Maybe a -> m #foldMap' :: Monoid m => (a -> m) -> Maybe a -> m #foldr :: (a -> b -> b) -> b -> Maybe a -> b #foldr' :: (a -> b -> b) -> b -> Maybe a -> b #foldl :: (b -> a -> b) -> b -> Maybe a -> b #foldl' :: (b -> a -> b) -> b -> Maybe a -> b #foldr1 :: (a -> a -> a) -> Maybe a -> a #foldl1 :: (a -> a -> a) -> Maybe a -> a #toList :: Maybe a -> [a] #null :: Maybe a -> Bool #length :: Maybe a -> Int #elem :: Eq a => a -> Maybe a -> Bool #maximum :: Ord a => Maybe a -> a #minimum :: Ord a => Maybe a -> a #sum :: Num a => Maybe a -> a #product :: Num a => Maybe a -> a # Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftEq :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool # Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftCompare :: (a -> b -> Ordering) -> Maybe a -> Maybe b -> Ordering # Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftReadsPrec :: (Int -> ReadS a) -> ReadS [a] -> Int -> ReadS (Maybe a) #liftReadList :: (Int -> ReadS a) -> ReadS [a] -> ReadS [Maybe a] #liftReadPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec (Maybe a) #liftReadListPrec :: ReadPrec a -> ReadPrec [a] -> ReadPrec [Maybe a] # Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Maybe a -> ShowS #liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Maybe a] -> ShowS # Since: base-2.1 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Maybe a -> f (Maybe b) #sequenceA :: Applicative f => Maybe (f a) -> f (Maybe a) #mapM :: Monad m => (a -> m b) -> Maybe a -> m (Maybe b) #sequence :: Monad m => Maybe (m a) -> m (Maybe a) # Picks the leftmost Just value, or, alternatively, Nothing.Since: base-2.1 Instance detailsDefined in GHC.Base Methodsempty :: Maybe a #(<|>) :: Maybe a -> Maybe a -> Maybe a #some :: Maybe a -> Maybe [a] #many :: Maybe a -> Maybe [a] # Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a -> Maybe a #(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b #liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c #(*>) :: Maybe a -> Maybe b -> Maybe b #(<*) :: Maybe a -> Maybe b -> Maybe a # Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> Maybe a -> Maybe b #(<$) :: a -> Maybe b -> Maybe a # Since: base-2.1 Instance detailsDefined in GHC.Base Methods(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #(>>) :: Maybe a -> Maybe b -> Maybe b #return :: a -> Maybe a # Picks the leftmost Just value, or, alternatively, Nothing.Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmzero :: Maybe a #mplus :: Maybe a -> Maybe a -> Maybe a # Since: deepseq-1.4.3.0 Instance detailsDefined in Control.DeepSeq MethodsliftRnf :: (a -> ()) -> Maybe a -> () # Instance detailsDefined in Control.Monad.Catch MethodsthrowM :: (HasCallStack, Exception e) => e -> Maybe a # Instance detailsDefined in Data.Hashable.Class MethodsliftHashWithSalt :: (Int -> a -> Int) -> Int -> Maybe a -> Int # Instance detailsDefined in GHC.Generics Associated Typestype Rep1 Maybe :: k -> Type # Methodsfrom1 :: forall (a :: k). Maybe a -> Rep1 Maybe a #to1 :: forall (a :: k). Rep1 Maybe a -> Maybe a # Instance detailsDefined in Control.Monad.Trans.Control Associated Typestype StM Maybe a # MethodsliftBaseWith :: (RunInBase Maybe Maybe -> Maybe a) -> Maybe a #restoreM :: StM Maybe a -> Maybe a # Since: mtl-2.2.2 Instance detailsDefined in Control.Monad.Error.Class MethodsthrowError :: () -> Maybe a #catchError :: Maybe a -> (() -> Maybe a) -> Maybe a # Instance detailsDefined in Control.Monad.Base MethodsliftBase :: Maybe α -> Maybe α # Lift a => Lift (Maybe a :: Type) Instance detailsDefined in Language.Haskell.TH.Syntax Methodslift :: Quote m => Maybe a -> m Exp #liftTyped :: forall (m :: Type -> Type). Quote m => Maybe a -> Code m (Maybe a) # Semigroup 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 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmempty :: Maybe a #mappend :: Maybe a -> Maybe a -> Maybe a #mconcat :: [Maybe a] -> Maybe a # Semigroup a => Semigroup (Maybe a) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: Maybe a -> Maybe a -> Maybe a #sconcat :: NonEmpty (Maybe a) -> Maybe a #stimes :: Integral b => b -> Maybe a -> Maybe a # Generic (Maybe a) Instance detailsDefined in GHC.Generics Associated Typestype Rep (Maybe a) :: Type -> Type # Methodsfrom :: Maybe a -> Rep (Maybe a) x #to :: Rep (Maybe a) x -> Maybe a # SingKind a => SingKind (Maybe a) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype DemoteRep (Maybe a) MethodsfromSing :: forall (a0 :: Maybe a). Sing a0 -> DemoteRep (Maybe a) Read a => Read (Maybe a) Since: base-2.1 Instance detailsDefined in GHC.Read MethodsreadsPrec :: Int -> ReadS (Maybe a) #readList :: ReadS [Maybe a] # Show a => Show (Maybe a) Since: base-2.1 Instance detailsDefined in GHC.Show MethodsshowsPrec :: Int -> Maybe a -> ShowS #show :: Maybe a -> String #showList :: [Maybe a] -> ShowS # NFData a => NFData (Maybe a) Instance detailsDefined in Control.DeepSeq Methodsrnf :: Maybe a -> () # Eq a => Eq (Maybe a) Since: base-2.1 Instance detailsDefined in GHC.Maybe Methods(==) :: Maybe a -> Maybe a -> Bool #(/=) :: Maybe a -> Maybe a -> Bool # Ord a => Ord (Maybe a) Since: base-2.1 Instance detailsDefined in GHC.Maybe Methodscompare :: Maybe a -> Maybe a -> Ordering #(<) :: Maybe a -> Maybe a -> Bool #(<=) :: Maybe a -> Maybe a -> Bool #(>) :: Maybe a -> Maybe a -> Bool #(>=) :: Maybe a -> Maybe a -> Bool #max :: Maybe a -> Maybe a -> Maybe a #min :: Maybe a -> Maybe a -> Maybe a # Hashable a => Hashable (Maybe a) Instance detailsDefined in Data.Hashable.Class MethodshashWithSalt :: Int -> Maybe a -> Int #hash :: Maybe a -> Int # Pretty a => Pretty (Maybe a) Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methodspretty :: Maybe a -> Doc b #prettyList :: [Maybe a] -> Doc b # SingI ('Nothing :: Maybe a) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodssing :: Sing 'Nothing SingI a2 => SingI ('Just a2 :: Maybe a1) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodssing :: Sing ('Just a2) type Rep1 Maybe Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics type Rep1 Maybe = D1 ('MetaData "Maybe" "GHC.Maybe" "base" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) Par1)) type StM Maybe a Instance detailsDefined in Control.Monad.Trans.Control type StM Maybe a = a type DemoteRep (Maybe a) Instance detailsDefined in GHC.Generics type DemoteRep (Maybe a) = Maybe (DemoteRep a) type Rep (Maybe a) Since: base-4.6.0.0 Instance detailsDefined in GHC.Generics type Rep (Maybe a) = D1 ('MetaData "Maybe" "GHC.Maybe" "base" 'False) (C1 ('MetaCons "Nothing" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "Just" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) data Sing (b :: Maybe a) Instance detailsDefined in GHC.Generics data Sing (b :: Maybe a) whereSNothing :: forall {a}. Sing ('Nothing :: Maybe a)SJust :: forall {a} (a1 :: a). Sing a1 -> Sing ('Just a1) class a ~# b => (a :: k) ~ (b :: k) infix 4 # Lifted, homogeneous equality. By lifted, we mean that it can be bogus (deferred type error). By homogeneous, the two types a and b must have the same kinds. data Integer # Arbitrary precision integers. In contrast with fixed-size integral types such as Int, the Integer type represents the entire infinite range of integers. Integers are stored in a kind of sign-magnitude form, hence do not expect two's complement form when using bit operations. If the value is small (fit into an Int), IS constructor is used. Otherwise Integer and IN constructors are used to store a BigNat representing respectively the positive or the negative value magnitude. Invariant: Integer and IN are used iff value doesn't fit in IS #### Instances Instances details  Since: base-2.1 Instance detailsDefined in GHC.Bits Methodsshift :: Integer -> Int -> Integer #rotate :: Integer -> Int -> Integer #bit :: Int -> Integer #setBit :: Integer -> Int -> Integer #testBit :: Integer -> Int -> Bool #shiftL :: Integer -> Int -> Integer #shiftR :: Integer -> Int -> Integer # Since: base-2.1 Instance detailsDefined in GHC.Enum MethodsenumFrom :: Integer -> [Integer] #enumFromThen :: Integer -> Integer -> [Integer] #enumFromTo :: Integer -> Integer -> [Integer] #enumFromThenTo :: Integer -> Integer -> Integer -> [Integer] # Since: base-2.1 Instance detailsDefined in GHC.Num Methods Since: base-2.1 Instance detailsDefined in GHC.Read Methods Since: base-2.0.1 Instance detailsDefined in GHC.Real MethodsquotRem :: Integer -> Integer -> (Integer, Integer) #divMod :: Integer -> Integer -> (Integer, Integer) # Since: base-2.0.1 Instance detailsDefined in GHC.Real Methods Since: base-2.1 Instance detailsDefined in GHC.Show MethodsshowList :: [Integer] -> ShowS # Since: base-2.1 Instance detailsDefined in Text.Printf Methods Instance detailsDefined in Control.DeepSeq Methodsrnf :: Integer -> () # Instance detailsDefined in GHC.Num.Integer Methods(==) :: Integer -> Integer -> Bool #(/=) :: Integer -> Integer -> Bool # Instance detailsDefined in GHC.Num.Integer Methods(<) :: Integer -> Integer -> Bool #(<=) :: Integer -> Integer -> Bool #(>) :: Integer -> Integer -> Bool #(>=) :: Integer -> Integer -> Bool # Instance detailsDefined in Data.Hashable.Class Methodshash :: Integer -> Int # Note - random generates values in the Int range Instance detailsDefined in System.Random MethodsrandomR :: RandomGen g => (Integer, Integer) -> g -> (Integer, g) #random :: RandomGen g => g -> (Integer, g) #randomRs :: RandomGen g => (Integer, Integer) -> g -> [Integer] #randoms :: RandomGen g => g -> [Integer] # Instance detailsDefined in System.Random.Internal MethodsuniformRM :: StatefulGen g m => (Integer, Integer) -> g -> m Integer # Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methodspretty :: Rational -> Doc b #prettyList :: [Rational] -> Doc b # Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methodspretty :: Integer -> Doc b #prettyList :: [Integer] -> Doc b # Instance detailsDefined in Language.Haskell.TH.Syntax Methodslift :: Quote m => Integer -> m Exp #liftTyped :: forall (m :: Type -> Type). Quote m => Integer -> Code m Integer # data IO a # A value of type IO a is a computation which, when performed, does some I/O before returning a value of type a. There is really only one way to "perform" an I/O action: bind it to Main.main in your program. When your program is run, the I/O will be performed. It isn't possible to perform I/O from an arbitrary function, unless that function is itself in the IO monad and called at some point, directly or indirectly, from Main.main. IO is a monad, so IO actions can be combined using either the do-notation or the >> and >>= operations from the Monad class. #### Instances Instances details  Since: base-4.9.0.0 Instance detailsDefined in Control.Monad.Fail Methodsfail :: String -> IO a # Since: base-4.9.0.0 Instance detailsDefined in Control.Monad.IO.Class MethodsliftIO :: IO a -> IO a # Takes the first non-throwing IO action's result. empty throws an exception.Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodsempty :: IO a #(<|>) :: IO a -> IO a -> IO a #some :: IO a -> IO [a] #many :: IO a -> IO [a] # Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a -> IO a #(<*>) :: IO (a -> b) -> IO a -> IO b #liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c #(*>) :: IO a -> IO b -> IO b #(<*) :: IO a -> IO b -> IO a # Since: base-2.1 Instance detailsDefined in GHC.Base Methodsfmap :: (a -> b) -> IO a -> IO b #(<$) :: a -> IO b -> IO a # Since: base-2.1 Instance detailsDefined in GHC.Base Methods(>>=) :: IO a -> (a -> IO b) -> IO b #(>>) :: IO a -> IO b -> IO b #return :: a -> IO a # Takes the first non-throwing IO action's result. mzero throws an exception.Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodsmzero :: IO a #mplus :: IO a -> IO a -> IO a # Instance detailsDefined in System.Console.Regions MethodsliftRegion :: STM a -> IO a # Instance detailsDefined in Control.Monad.Catch Methodscatch :: (HasCallStack, Exception e) => IO a -> (e -> IO a) -> IO a # Instance detailsDefined in Control.Monad.Catch Methodsmask :: HasCallStack => ((forall a. IO a -> IO a) -> IO b) -> IO b #uninterruptibleMask :: HasCallStack => ((forall a. IO a -> IO a) -> IO b) -> IO b #generalBracket :: HasCallStack => IO a -> (a -> ExitCase b -> IO c) -> (a -> IO b) -> IO (b, c) # Instance detailsDefined in Control.Monad.Catch MethodsthrowM :: (HasCallStack, Exception e) => e -> IO a # Instance detailsDefined in Control.Monad.Primitive Methodsinternal :: IO a -> State# (PrimState IO) -> (# State# (PrimState IO), a #) # Instance detailsDefined in Control.Monad.Primitive Associated Typestype PrimState IO # Methodsprimitive :: (State# (PrimState IO) -> (# State# (PrimState IO), a #)) -> IO a # Instance detailsDefined in Language.Haskell.TH.Syntax MethodsqReport :: Bool -> String -> IO () #qRecover :: IO a -> IO a -> IO a #qReifyInstances :: Name -> [Type] -> IO [Dec] #qReifyRoles :: Name -> IO [Role] #qReifyAnnotations :: Data a => AnnLookup -> IO [a] #qRunIO :: IO a -> IO a #qAddTopDecls :: [Dec] -> IO () #qAddModFinalizer :: Q () -> IO () #qAddCorePlugin :: String -> IO () #qGetQ :: Typeable a => IO (Maybe a) #qPutQ :: Typeable a => a -> IO () #qPutDoc :: DocLoc -> String -> IO () # Instance detailsDefined in Language.Haskell.TH.Syntax Methods Instance detailsDefined in Control.Monad.Trans.Control Associated Typestype StM IO a # MethodsliftBaseWith :: (RunInBase IO IO -> IO a) -> IO a #restoreM :: StM IO a -> IO a # Instance detailsDefined in Control.Monad.Error.Class MethodscatchError :: IO a -> (IOException -> IO a) -> IO a # Instance detailsDefined in Control.Monad.Base MethodsliftBase :: IO α -> IO α # Monoid a => Monoid (IO a) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodsmempty :: IO a #mappend :: IO a -> IO a -> IO a #mconcat :: [IO a] -> IO a # Semigroup a => Semigroup (IO a) Since: base-4.10.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: IO a -> IO a -> IO a #sconcat :: NonEmpty (IO a) -> IO a #stimes :: Integral b => b -> IO a -> IO a # a ~ () => HPrintfType (IO a) Since: base-4.7.0.0 Instance detailsDefined in Text.Printf Methodshspr :: Handle -> String -> [UPrintf] -> IO a a ~ () => PrintfType (IO a) Since: base-4.7.0.0 Instance detailsDefined in Text.Printf Methodsspr :: String -> [UPrintf] -> IO a type PrimState IO Instance detailsDefined in Control.Monad.Primitive type PrimState IO = RealWorld type StM IO a Instance detailsDefined in Control.Monad.Trans.Control type StM IO a = a

class Semigroup a => Monoid a where #

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

Right identity
x <> mempty = x
Left identity
mempty <> x = x
Associativity
x <> (y <> z) = (x <> y) <> z (Semigroup law)
Concatenation
mconcat = foldr (<>) mempty

You can alternatively define mconcat instead of mempty, in which case the laws are:

Unit
mconcat (pure x) = x
Multiplication
mconcat (join xss) = mconcat (fmap mconcat xss)
Subclass
mconcat (toList xs) = sconcat xs

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 newtypes and make those instances of Monoid, e.g. Sum and Product.

NOTE: Semigroup is a superclass of Monoid since base-4.11.0.0.

Minimal complete definition

Methods

mempty :: a #

Identity of mappend

>>> "Hello world" <> mempty
"Hello world"


mappend :: a -> a -> a #

An associative operation

NOTE: This method is redundant and has the default implementation mappend = (<>) since base-4.11.0.0. Should it be implemented manually, since mappend is a synonym for (<>), it is expected that the two functions are defined the same way. In a future GHC release mappend will be removed from Monoid.

mconcat :: [a] -> a #

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.

>>> mconcat ["Hello", " ", "Haskell", "!"]
"Hello Haskell!"


#### Instances

Instances details
 Since: base-4.17.0.0 Instance detailsDefined in Data.Array.Byte Methodsmconcat :: [ByteArray] -> ByteArray # Since: base-2.1 Instance detailsDefined in Data.Semigroup.Internal Methodsmappend :: All -> All -> All #mconcat :: [All] -> All # Since: base-2.1 Instance detailsDefined in Data.Semigroup.Internal Methodsmappend :: Any -> Any -> Any #mconcat :: [Any] -> Any # Instance detailsDefined in Data.ByteString.Builder.Internal Methodsmconcat :: [Builder] -> Builder # Instance detailsDefined in Data.ByteString.Internal.Type Methodsmconcat :: [ByteString] -> ByteString # Instance detailsDefined in Data.ByteString.Lazy.Internal Methodsmconcat :: [ByteString] -> ByteString # Instance detailsDefined in Data.ByteString.Short.Internal Methods Instance detailsDefined in Data.IntSet.Internal Methodsmconcat :: [IntSet] -> IntSet # Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmconcat :: [Ordering] -> Ordering # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsmappend :: Cover -> Cover -> Cover #mconcat :: [Cover] -> Cover # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsmconcat :: [CoverCount] -> CoverCount # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsmconcat :: [Journal] -> Journal # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsmconcat :: [LabelName] -> LabelName # Source # Instance detailsDefined in Hedgehog.Internal.Report Methodsmconcat :: [Summary] -> Summary # "String-Concatenation" for OsString. This is not the same as (). Instance detailsDefined in System.OsString.Internal.Types Methodsmconcat :: [OsString] -> OsString # Instance detailsDefined in System.OsString.Internal.Types Methodsmconcat :: [PosixString] -> PosixString # Instance detailsDefined in System.OsString.Internal.Types Methods Instance detailsDefined in Text.PrettyPrint.HughesPJ Methodsmappend :: Doc -> Doc -> Doc #mconcat :: [Doc] -> Doc # Monoid () Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmempty :: () #mappend :: () -> () -> () #mconcat :: [()] -> () # (Semigroup a, Monoid a) => Monoid (Concurrently a) Since: async-2.1.0 Instance detailsDefined in Control.Concurrent.Async.Internal Methodsmappend :: Concurrently a -> Concurrently a -> Concurrently a #mconcat :: [Concurrently a] -> Concurrently a # FiniteBits a => Monoid (And a) This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.Since: base-4.16 Instance detailsDefined in Data.Bits Methodsmempty :: And a #mappend :: And a -> And a -> And a #mconcat :: [And a] -> And a # FiniteBits a => Monoid (Iff a) This constraint is arguably too strong. However, as some types (such as Natural) have undefined complement, this is the only safe choice.Since: base-4.16 Instance detailsDefined in Data.Bits Methodsmempty :: Iff a #mappend :: Iff a -> Iff a -> Iff a #mconcat :: [Iff a] -> Iff a # Bits a => Monoid (Ior a) Since: base-4.16 Instance detailsDefined in Data.Bits Methodsmempty :: Ior a #mappend :: Ior a -> Ior a -> Ior a #mconcat :: [Ior a] -> Ior a # Bits a => Monoid (Xor a) Since: base-4.16 Instance detailsDefined in Data.Bits Methodsmempty :: Xor a #mappend :: Xor a -> Xor a -> Xor a #mconcat :: [Xor a] -> Xor a # Monoid a => Monoid (Identity a) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Identity Methodsmappend :: Identity a -> Identity a -> Identity a #mconcat :: [Identity a] -> Identity a # Ord a => Monoid (Max a) Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Utils Methodsmempty :: Max a #mappend :: Max a -> Max a -> Max a #mconcat :: [Max a] -> Max a # Ord a => Monoid (Min a) Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Utils Methodsmempty :: Min a #mappend :: Min a -> Min a -> Min a #mconcat :: [Min a] -> Min a # Monoid (First a) Since: base-2.1 Instance detailsDefined in Data.Monoid Methodsmempty :: First a #mappend :: First a -> First a -> First a #mconcat :: [First a] -> First a # Monoid (Last a) Since: base-2.1 Instance detailsDefined in Data.Monoid Methodsmempty :: Last a #mappend :: Last a -> Last a -> Last a #mconcat :: [Last a] -> Last a # Monoid a => Monoid (Down a) Since: base-4.11.0.0 Instance detailsDefined in Data.Ord Methodsmempty :: Down a #mappend :: Down a -> Down a -> Down a #mconcat :: [Down a] -> Down a # (Ord a, Bounded a) => Monoid (Max a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsmempty :: Max a #mappend :: Max a -> Max a -> Max a #mconcat :: [Max a] -> Max a # (Ord a, Bounded a) => Monoid (Min a) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsmempty :: Min a #mappend :: Min a -> Min a -> Min a #mconcat :: [Min a] -> Min a # Monoid m => Monoid (WrappedMonoid m) Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodsmconcat :: [WrappedMonoid m] -> WrappedMonoid m # Monoid a => Monoid (Dual a) Since: base-2.1 Instance detailsDefined in Data.Semigroup.Internal Methodsmempty :: Dual a #mappend :: Dual a -> Dual a -> Dual a #mconcat :: [Dual a] -> Dual a # Monoid (Endo a) Since: base-2.1 Instance detailsDefined in Data.Semigroup.Internal Methodsmempty :: Endo a #mappend :: Endo a -> Endo a -> Endo a #mconcat :: [Endo a] -> Endo a # Num a => Monoid (Product a) Since: base-2.1 Instance detailsDefined in Data.Semigroup.Internal Methodsmappend :: Product a -> Product a -> Product a #mconcat :: [Product a] -> Product a # Num a => Monoid (Sum a) Since: base-2.1 Instance detailsDefined in Data.Semigroup.Internal Methodsmempty :: Sum a #mappend :: Sum a -> Sum a -> Sum a #mconcat :: [Sum a] -> Sum a # Monoid a => Monoid (STM a) Since: base-4.17.0.0 Instance detailsDefined in GHC.Conc.Sync Methodsmempty :: STM a #mappend :: STM a -> STM a -> STM a #mconcat :: [STM a] -> STM a # (Generic a, Monoid (Rep a ())) => Monoid (Generically a) Since: base-4.17.0.0 Instance detailsDefined in GHC.Generics Methodsmappend :: Generically a -> Generically a -> Generically a #mconcat :: [Generically a] -> Generically a # Monoid p => Monoid (Par1 p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methodsmempty :: Par1 p #mappend :: Par1 p -> Par1 p -> Par1 p #mconcat :: [Par1 p] -> Par1 p # Num a => Monoid (AlphaColour a) Instance detailsDefined in Data.Colour.Internal Methodsmappend :: AlphaColour a -> AlphaColour a -> AlphaColour a #mconcat :: [AlphaColour a] -> AlphaColour a # Num a => Monoid (Colour a) Instance detailsDefined in Data.Colour.Internal Methodsmappend :: Colour a -> Colour a -> Colour a #mconcat :: [Colour a] -> Colour a # Monoid (IntMap a) Instance detailsDefined in Data.IntMap.Internal Methodsmappend :: IntMap a -> IntMap a -> IntMap a #mconcat :: [IntMap a] -> IntMap a # Monoid (Seq a) Instance detailsDefined in Data.Sequence.Internal Methodsmempty :: Seq a #mappend :: Seq a -> Seq a -> Seq a #mconcat :: [Seq a] -> Seq a # Monoid (MergeSet a) Instance detailsDefined in Data.Set.Internal Methodsmempty :: MergeSet a #mappend :: MergeSet a -> MergeSet a -> MergeSet a #mconcat :: [MergeSet a] -> MergeSet a # Ord a => Monoid (Set a) Instance detailsDefined in Data.Set.Internal Methodsmempty :: Set a #mappend :: Set a -> Set a -> Set a #mconcat :: [Set a] -> Set a # Monoid a => Monoid (IO a) Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodsmempty :: IO a #mappend :: IO a -> IO a -> IO a #mconcat :: [IO a] -> IO a # (Semigroup a, Monoid a) => Monoid (Coverage a) Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsmappend :: Coverage a -> Coverage a -> Coverage a #mconcat :: [Coverage a] -> Coverage a # Monoid (Doc a) Instance detailsDefined in Text.PrettyPrint.Annotated.HughesPJ Methodsmempty :: Doc a #mappend :: Doc a -> Doc a -> Doc a #mconcat :: [Doc a] -> Doc a # Monoid a => Monoid (Q a) Since: template-haskell-2.17.0.0 Instance detailsDefined in Language.Haskell.TH.Syntax Methodsmempty :: Q a #mappend :: Q a -> Q a -> Q a #mconcat :: [Q a] -> Q a # Monoid (Doc a) Instance detailsDefined in Text.PrettyPrint.Annotated.WL Methodsmempty :: Doc a #mappend :: Doc a -> Doc a -> Doc a #mconcat :: [Doc a] -> Doc a # Semigroup 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 4.11.0: constraint on inner a value generalised from Monoid to Semigroup.Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmempty :: Maybe a #mappend :: Maybe a -> Maybe a -> Maybe a #mconcat :: [Maybe a] -> Maybe a # Monoid a => Monoid (a) Since: base-4.15 Instance detailsDefined in GHC.Base Methodsmempty :: (a) #mappend :: (a) -> (a) -> (a) #mconcat :: [(a)] -> (a) # Monoid [a] Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmempty :: [a] #mappend :: [a] -> [a] -> [a] #mconcat :: [[a]] -> [a] # (Semigroup a, Monoid a) => Monoid (ConcurrentlyE e a) Instance detailsDefined in Control.Concurrent.Async.Internal Methodsmempty :: ConcurrentlyE e a #mappend :: ConcurrentlyE e a -> ConcurrentlyE e a -> ConcurrentlyE e a #mconcat :: [ConcurrentlyE e a] -> ConcurrentlyE e a # Monoid (Proxy s) Since: base-4.7.0.0 Instance detailsDefined in Data.Proxy Methodsmempty :: Proxy s #mappend :: Proxy s -> Proxy s -> Proxy s #mconcat :: [Proxy s] -> Proxy s # Monoid (U1 p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methodsmempty :: U1 p #mappend :: U1 p -> U1 p -> U1 p #mconcat :: [U1 p] -> U1 p # Monoid a => Monoid (ST s a) Since: base-4.11.0.0 Instance detailsDefined in GHC.ST Methodsmempty :: ST s a #mappend :: ST s a -> ST s a -> ST s a #mconcat :: [ST s a] -> ST s a # Ord k => Monoid (Map k v) Instance detailsDefined in Data.Map.Internal Methodsmempty :: Map k v #mappend :: Map k v -> Map k v -> Map k v #mconcat :: [Map k v] -> Map k v # (Monad m, Monoid a) => Monoid (GenT m a) Source # Instance detailsDefined in Hedgehog.Internal.Gen Methodsmempty :: GenT m a #mappend :: GenT m a -> GenT m a -> GenT m a #mconcat :: [GenT m a] -> GenT m a # (MonadBaseControl IO m, Semigroup a, Monoid a) => Monoid (Concurrently m a) Instance detailsDefined in Control.Concurrent.Async.Lifted Methodsmempty :: Concurrently m a #mappend :: Concurrently m a -> Concurrently m a -> Concurrently m a #mconcat :: [Concurrently m a] -> Concurrently m a # (Monoid a, Monoid b) => Monoid (a, b) Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmempty :: (a, b) #mappend :: (a, b) -> (a, b) -> (a, b) #mconcat :: [(a, b)] -> (a, b) # Monoid b => Monoid (a -> b) Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmempty :: a -> b #mappend :: (a -> b) -> (a -> b) -> a -> b #mconcat :: [a -> b] -> a -> b # Monoid a => Monoid (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodsmempty :: Const a b #mappend :: Const a b -> Const a b -> Const a b #mconcat :: [Const a b] -> Const a b # (Applicative f, Monoid a) => Monoid (Ap f a) Since: base-4.12.0.0 Instance detailsDefined in Data.Monoid Methodsmempty :: Ap f a #mappend :: Ap f a -> Ap f a -> Ap f a #mconcat :: [Ap f a] -> Ap f a # Alternative f => Monoid (Alt f a) Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodsmempty :: Alt f a #mappend :: Alt f a -> Alt f a -> Alt f a #mconcat :: [Alt f a] -> Alt f a # Monoid (f p) => Monoid (Rec1 f p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methodsmempty :: Rec1 f p #mappend :: Rec1 f p -> Rec1 f p -> Rec1 f p #mconcat :: [Rec1 f p] -> Rec1 f p # (Semigroup a, Monoid a) => Monoid (Tagged s a) Instance detailsDefined in Data.Tagged Methodsmempty :: Tagged s a #mappend :: Tagged s a -> Tagged s a -> Tagged s a #mconcat :: [Tagged s a] -> Tagged s a # Monoid a => Monoid (Constant a b) Instance detailsDefined in Data.Functor.Constant Methodsmempty :: Constant a b #mappend :: Constant a b -> Constant a b -> Constant a b #mconcat :: [Constant a b] -> Constant a b # (Monoid a, Monoid b, Monoid c) => Monoid (a, b, c) Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmempty :: (a, b, c) #mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) #mconcat :: [(a, b, c)] -> (a, b, c) # (Monoid (f a), Monoid (g a)) => Monoid (Product f g a) Since: base-4.16.0.0 Instance detailsDefined in Data.Functor.Product Methodsmempty :: Product f g a #mappend :: Product f g a -> Product f g a -> Product f g a #mconcat :: [Product f g a] -> Product f g a # (Monoid (f p), Monoid (g p)) => Monoid ((f :*: g) p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methodsmempty :: (f :*: g) p #mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #mconcat :: [(f :*: g) p] -> (f :*: g) p # Monoid c => Monoid (K1 i c p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methodsmempty :: K1 i c p #mappend :: K1 i c p -> K1 i c p -> K1 i c p #mconcat :: [K1 i c p] -> K1 i c p # (Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d) Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmempty :: (a, b, c, d) #mappend :: (a, b, c, d) -> (a, b, c, d) -> (a, b, c, d) #mconcat :: [(a, b, c, d)] -> (a, b, c, d) # Monoid (f (g a)) => Monoid (Compose f g a) Since: base-4.16.0.0 Instance detailsDefined in Data.Functor.Compose Methodsmempty :: Compose f g a #mappend :: Compose f g a -> Compose f g a -> Compose f g a #mconcat :: [Compose f g a] -> Compose f g a # Monoid (f (g p)) => Monoid ((f :.: g) p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methodsmempty :: (f :.: g) p #mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #mconcat :: [(f :.: g) p] -> (f :.: g) p # Monoid (f p) => Monoid (M1 i c f p) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methodsmempty :: M1 i c f p #mappend :: M1 i c f p -> M1 i c f p -> M1 i c f p #mconcat :: [M1 i c f p] -> M1 i c f p # (Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e) Since: base-2.1 Instance detailsDefined in GHC.Base Methodsmempty :: (a, b, c, d, e) #mappend :: (a, b, c, d, e) -> (a, b, c, d, e) -> (a, b, c, d, e) #mconcat :: [(a, b, c, d, e)] -> (a, b, c, d, e) #

class Semigroup a where #

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

Instances should satisfy the following:

Associativity
x <> (y <> z) = (x <> y) <> z

You can alternatively define sconcat instead of (<>), in which case the laws are:

Unit
sconcat (pure x) = x
Multiplication
sconcat (join xss) = sconcat (fmap sconcat xss)

Since: base-4.9.0.0

Minimal complete definition

Methods

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

An associative operation.

>>> [1,2,3] <> [4,5,6]
[1,2,3,4,5,6]


#### Instances

Instances details
 Since: base-4.17.0.0 Instance detailsDefined in Data.Array.Byte Methodsstimes :: Integral b => b -> ByteArray -> ByteArray # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(<>) :: All -> All -> All #stimes :: Integral b => b -> All -> All # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup.Internal Methods(<>) :: Any -> Any -> Any #stimes :: Integral b => b -> Any -> Any # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: Void -> Void -> Void #stimes :: Integral b => b -> Void -> Void # Instance detailsDefined in Data.ByteString.Builder.Internal Methodsstimes :: Integral b => b -> Builder -> Builder # Instance detailsDefined in Data.ByteString.Internal.Type Methodsstimes :: Integral b => b -> ByteString -> ByteString # Instance detailsDefined in Data.ByteString.Lazy.Internal Methodsstimes :: Integral b => b -> ByteString -> ByteString # Instance detailsDefined in Data.ByteString.Short.Internal Methodsstimes :: Integral b => b -> ShortByteString -> ShortByteString # Since: containers-0.5.7 Instance detailsDefined in Data.IntSet.Internal Methods(<>) :: IntSet -> IntSet -> IntSet #stimes :: Integral b => b -> IntSet -> IntSet # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodsstimes :: Integral b => b -> Ordering -> Ordering # Source # Instance detailsDefined in Hedgehog.Internal.Property Methods(<>) :: Cover -> Cover -> Cover #stimes :: Integral b => b -> Cover -> Cover # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsstimes :: Integral b => b -> CoverCount -> CoverCount # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsstimes :: Integral b => b -> GroupName -> GroupName # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsstimes :: Integral b => b -> Journal -> Journal # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsstimes :: Integral b => b -> LabelName -> LabelName # Source # Instance detailsDefined in Hedgehog.Internal.Property Methodsstimes :: Integral b => b -> PropertyName -> PropertyName # Source # Instance detailsDefined in Hedgehog.Internal.Report Methods(<>) :: Style -> Style -> Style #stimes :: Integral b => b -> Style -> Style # Source # Instance detailsDefined in Hedgehog.Internal.Report Methodsstimes :: Integral b => b -> Summary -> Summary # Instance detailsDefined in System.OsString.Internal.Types Methodsstimes :: Integral b => b -> OsString -> OsString # Instance detailsDefined in System.OsString.Internal.Types Methodsstimes :: Integral b => b -> PosixString -> PosixString # Instance detailsDefined in System.OsString.Internal.Types Methodsstimes :: Integral b => b -> WindowsString -> WindowsString # Instance detailsDefined in Text.PrettyPrint.HughesPJ Methods(<>) :: Doc -> Doc -> Doc #stimes :: Integral b => b -> Doc -> Doc # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methods(<>) :: () -> () -> () #sconcat :: NonEmpty () -> () #stimes :: Integral b => b -> () -> () # Only defined by async for base >= 4.9Since: async-2.1.0 Instance detailsDefined in Control.Concurrent.Async.Internal Methods(<>) :: Concurrently a -> Concurrently a -> Concurrently a #stimes :: Integral b => b -> Concurrently a -> Concurrently a # Bits a => Semigroup (And a) Since: base-4.16 Instance detailsDefined in Data.Bits Methods(<>) :: And a -> And a -> And a #sconcat :: NonEmpty (And a) -> And a #stimes :: Integral b => b -> And a ->