cryptonite-0.29: Cryptography Primitives sink

Crypto.Internal.Imports

Description

Synopsis

# Documentation

(<$) :: Functor f => a -> f b -> f a infixl 4 Source # Replace all locations in the input with the same value. The default definition is fmap . const, but this may be overridden with a more efficient version. Using ApplicativeDo: 'a <$ bs' can be understood as the do expression

do bs
pure a


with an inferred Functor constraint.

class Functor f => Applicative (f :: Type -> Type) where Source #

A functor with application, providing operations to

• embed pure expressions (pure), and
• sequence computations and combine their results (<*> and liftA2).

A minimal complete definition must include implementations of pure and of either <*> or liftA2. If it defines both, then they must behave the same as their default definitions:

(<*>) = liftA2 id
liftA2 f x y = f <$> x <*> y Further, any definition must satisfy the following: Identity pure id <*> v = v Composition pure (.) <*> u <*> v <*> w = u <*> (v <*> w) Homomorphism pure f <*> pure x = pure (f x) Interchange u <*> pure y = pure ($ y) <*> u

The other methods have the following default definitions, which may be overridden with equivalent specialized implementations:

• u *> v = (id <$ u) <*> v • u <* v = liftA2 const u v As a consequence of these laws, the Functor instance for f will satisfy • fmap f x = pure f <*> x It may be useful to note that supposing forall x y. p (q x y) = f x . g y it follows from the above that liftA2 p (liftA2 q u v) = liftA2 f u . liftA2 g v If f is also a Monad, it should satisfy • pure = return • m1 <*> m2 = m1 >>= (x1 -> m2 >>= (x2 -> return (x1 x2))) • (*>) = (>>) (which implies that pure and <*> satisfy the applicative functor laws). Minimal complete definition pure, ((<*>) | liftA2) Methods pure :: a -> f a Source # Lift a value. (<*>) :: f (a -> b) -> f a -> f b infixl 4 Source # Sequential application. A few functors support an implementation of <*> that is more efficient than the default one. Using ApplicativeDo: 'fs <*> as' can be understood as the do expression do f <- fs a <- as pure (f a)  liftA2 :: (a -> b -> c) -> f a -> f b -> f c Source # Lift a binary function to actions. Some functors support an implementation of liftA2 that is more efficient than the default one. In particular, if fmap is an expensive operation, it is likely better to use liftA2 than to fmap over the structure and then use <*>. This became a typeclass method in 4.10.0.0. Prior to that, it was a function defined in terms of <*> and fmap. Using ApplicativeDo: 'liftA2 f as bs' can be understood as the do expression do a <- as b <- bs pure (f a b)  (*>) :: f a -> f b -> f b infixl 4 Source # Sequence actions, discarding the value of the first argument. 'as *> bs' can be understood as the do expression do as bs  This is a tad complicated for our ApplicativeDo extension which will give it a Monad constraint. For an Applicative constraint we write it of the form do _ <- as b <- bs pure b  (<*) :: f a -> f b -> f a infixl 4 Source # Sequence actions, discarding the value of the second argument. Using ApplicativeDo: 'as <* bs' can be understood as the do expression do a <- as bs pure a  #### Instances Instances details  Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a -> [a] Source #(<*>) :: [a -> b] -> [a] -> [b] Source #liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] Source #(*>) :: [a] -> [b] -> [b] Source #(<*) :: [a] -> [b] -> [a] Source # Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a -> Maybe a Source #(<*>) :: Maybe (a -> b) -> Maybe a -> Maybe b Source #liftA2 :: (a -> b -> c) -> Maybe a -> Maybe b -> Maybe c Source #(*>) :: Maybe a -> Maybe b -> Maybe b Source #(<*) :: Maybe a -> Maybe b -> Maybe a Source # Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a -> IO a Source #(<*>) :: IO (a -> b) -> IO a -> IO b Source #liftA2 :: (a -> b -> c) -> IO a -> IO b -> IO c Source #(*>) :: IO a -> IO b -> IO b Source #(<*) :: IO a -> IO b -> IO a Source # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> Par1 a Source #(<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b Source #liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c Source #(*>) :: Par1 a -> Par1 b -> Par1 b Source #(<*) :: Par1 a -> Par1 b -> Par1 a Source # Since: base-4.9.0.0 Instance detailsDefined in Data.Complex Methodspure :: a -> Complex a Source #(<*>) :: Complex (a -> b) -> Complex a -> Complex b Source #liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c Source #(*>) :: Complex a -> Complex b -> Complex b Source #(<*) :: Complex a -> Complex b -> Complex a Source # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodspure :: a -> Min a Source #(<*>) :: Min (a -> b) -> Min a -> Min b Source #liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c Source #(*>) :: Min a -> Min b -> Min b Source #(<*) :: Min a -> Min b -> Min a Source # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodspure :: a -> Max a Source #(<*>) :: Max (a -> b) -> Max a -> Max b Source #liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c Source #(*>) :: Max a -> Max b -> Max b Source #(<*) :: Max a -> Max b -> Max a Source # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodspure :: a -> First a Source #(<*>) :: First (a -> b) -> First a -> First b Source #liftA2 :: (a -> b -> c) -> First a -> First b -> First c Source #(*>) :: First a -> First b -> First b Source #(<*) :: First a -> First b -> First a Source # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodspure :: a -> Last a Source #(<*>) :: Last (a -> b) -> Last a -> Last b Source #liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c Source #(*>) :: Last a -> Last b -> Last b Source #(<*) :: Last a -> Last b -> Last a Source # Since: base-4.9.0.0 Instance detailsDefined in Data.Semigroup Methodspure :: a -> Option a Source #(<*>) :: Option (a -> b) -> Option a -> Option b Source #liftA2 :: (a -> b -> c) -> Option a -> Option b -> Option c Source #(*>) :: Option a -> Option b -> Option b Source #(<*) :: Option a -> Option b -> Option a Source # f <$> ZipList xs1 <*> ... <*> ZipList xsN = ZipList (zipWithN f xs1 ... xsN)where zipWithN refers to the zipWith function of the appropriate arity (zipWith, zipWith3, zipWith4, ...). For example:(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..] = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..]) = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a -> ZipList a Source #(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b Source #liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c Source #(*>) :: ZipList a -> ZipList b -> ZipList b Source #(<*) :: ZipList a -> ZipList b -> ZipList a Source # Since: base-4.8.0.0 Instance detailsDefined in Data.Functor.Identity Methodspure :: a -> Identity a Source #(<*>) :: Identity (a -> b) -> Identity a -> Identity b Source #liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c Source #(*>) :: Identity a -> Identity b -> Identity b Source #(<*) :: Identity a -> Identity b -> Identity a Source # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methodspure :: a -> First a Source #(<*>) :: First (a -> b) -> First a -> First b Source #liftA2 :: (a -> b -> c) -> First a -> First b -> First c Source #(*>) :: First a -> First b -> First b Source #(<*) :: First a -> First b -> First a Source # Since: base-4.8.0.0 Instance detailsDefined in Data.Monoid Methodspure :: a -> Last a Source #(<*>) :: Last (a -> b) -> Last a -> Last b Source #liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c Source #(*>) :: Last a -> Last b -> Last b Source #(<*) :: Last a -> Last b -> Last a Source # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodspure :: a -> Dual a Source #(<*>) :: Dual (a -> b) -> Dual a -> Dual b Source #liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c Source #(*>) :: Dual a -> Dual b -> Dual b Source #(<*) :: Dual a -> Dual b -> Dual a Source # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodspure :: a -> Sum a Source #(<*>) :: Sum (a -> b) -> Sum a -> Sum b Source #liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c Source #(*>) :: Sum a -> Sum b -> Sum b Source #(<*) :: Sum a -> Sum b -> Sum a Source # Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodspure :: a -> Product a Source #(<*>) :: Product (a -> b) -> Product a -> Product b Source #liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c Source #(*>) :: Product a -> Product b -> Product b Source #(<*) :: Product a -> Product b -> Product a Source # Since: base-4.11.0.0 Instance detailsDefined in Data.Ord Methodspure :: a -> Down a Source #(<*>) :: Down (a -> b) -> Down a -> Down b Source #liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c Source #(*>) :: Down a -> Down b -> Down b Source #(<*) :: Down a -> Down b -> Down a Source # Since: base-4.6.0.0 Instance detailsDefined in Text.ParserCombinators.ReadPrec Methodspure :: a -> ReadPrec a Source #(<*>) :: ReadPrec (a -> b) -> ReadPrec a -> ReadPrec b Source #liftA2 :: (a -> b -> c) -> ReadPrec a -> ReadPrec b -> ReadPrec c Source #(*>) :: ReadPrec a -> ReadPrec b -> ReadPrec b Source #(<*) :: ReadPrec a -> ReadPrec b -> ReadPrec a Source # Since: base-4.6.0.0 Instance detailsDefined in Text.ParserCombinators.ReadP Methodspure :: a -> ReadP a Source #(<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b Source #liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c Source #(*>) :: ReadP a -> ReadP b -> ReadP b Source #(<*) :: ReadP a -> ReadP b -> ReadP a Source # Since: base-4.9.0.0 Instance detailsDefined in GHC.Base Methodspure :: a -> NonEmpty a Source #(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b Source #liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c Source #(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b Source #(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a Source # Instance detailsDefined in Data.ByteArray.Pack.Internal Methodspure :: a -> Packer a Source #(<*>) :: Packer (a -> b) -> Packer a -> Packer b Source #liftA2 :: (a -> b -> c) -> Packer a -> Packer b -> Packer c Source #(*>) :: Packer a -> Packer b -> Packer b Source #(<*) :: Packer a -> Packer b -> Packer a Source # Since: base-4.5.0.0 Instance detailsDefined in Text.ParserCombinators.ReadP Methodspure :: a -> P a Source #(<*>) :: P (a -> b) -> P a -> P b Source #liftA2 :: (a -> b -> c) -> P a -> P b -> P c Source #(*>) :: P a -> P b -> P b Source #(<*) :: P a -> P b -> P a Source # Source # Instance detailsDefined in Crypto.Error.Types Methodspure :: a -> CryptoFailable a Source #(<*>) :: CryptoFailable (a -> b) -> CryptoFailable a -> CryptoFailable b Source #liftA2 :: (a -> b -> c) -> CryptoFailable a -> CryptoFailable b -> CryptoFailable c Source # Since: base-3.0 Instance detailsDefined in Data.Either Methodspure :: a -> Either e a Source #(<*>) :: Either e (a -> b) -> Either e a -> Either e b Source #liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c Source #(*>) :: Either e a -> Either e b -> Either e b Source #(<*) :: Either e a -> Either e b -> Either e a Source # Applicative (U1 :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> U1 a Source #(<*>) :: U1 (a -> b) -> U1 a -> U1 b Source #liftA2 :: (a -> b -> c) -> U1 a -> U1 b -> U1 c Source #(*>) :: U1 a -> U1 b -> U1 b Source #(<*) :: U1 a -> U1 b -> U1 a Source # Monoid a => Applicative ((,) a) For tuples, the Monoid constraint on a determines how the first values merge. For example, Strings concatenate:("hello ", (+15)) <*> ("world!", 2002) ("hello world!",2017)Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a0 -> (a, a0) Source #(<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) Source #liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) Source #(*>) :: (a, a0) -> (a, b) -> (a, b) Source #(<*) :: (a, a0) -> (a, b) -> (a, a0) Source # Since: base-4.4.0.0 Instance detailsDefined in GHC.ST Methodspure :: a -> ST s a Source #(<*>) :: ST s (a -> b) -> ST s a -> ST s b Source #liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c Source #(*>) :: ST s a -> ST s b -> ST s b Source #(<*) :: ST s a -> ST s b -> ST s a Source # Monad m => Applicative (WrappedMonad m) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a -> WrappedMonad m a Source #(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b Source #liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c Source #(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source #(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a Source # Arrow a => Applicative (ArrowMonad a) Since: base-4.6.0.0 Instance detailsDefined in Control.Arrow Methodspure :: a0 -> ArrowMonad a a0 Source #(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b Source #liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c Source #(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b Source #(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 Source # Applicative (Proxy :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Proxy Methodspure :: a -> Proxy a Source #(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b Source #liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c Source #(*>) :: Proxy a -> Proxy b -> Proxy b Source #(<*) :: Proxy a -> Proxy b -> Proxy a Source # DRG gen => Applicative (MonadPseudoRandom gen) Source # Instance detailsDefined in Crypto.Random.Types Methodspure :: a -> MonadPseudoRandom gen a Source #(<*>) :: MonadPseudoRandom gen (a -> b) -> MonadPseudoRandom gen a -> MonadPseudoRandom gen b Source #liftA2 :: (a -> b -> c) -> MonadPseudoRandom gen a -> MonadPseudoRandom gen b -> MonadPseudoRandom gen c Source #(*>) :: MonadPseudoRandom gen a -> MonadPseudoRandom gen b -> MonadPseudoRandom gen b Source #(<*) :: MonadPseudoRandom gen a -> MonadPseudoRandom gen b -> MonadPseudoRandom gen a Source # Applicative f => Applicative (Rec1 f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> Rec1 f a Source #(<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b Source #liftA2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c Source #(*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b Source #(<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a Source # (Monoid a, Monoid b) => Applicative ((,,) a b) Since: base-4.14.0.0 Instance detailsDefined in GHC.Base Methodspure :: a0 -> (a, b, a0) Source #(<*>) :: (a, b, a0 -> b0) -> (a, b, a0) -> (a, b, b0) Source #liftA2 :: (a0 -> b0 -> c) -> (a, b, a0) -> (a, b, b0) -> (a, b, c) Source #(*>) :: (a, b, a0) -> (a, b, b0) -> (a, b, b0) Source #(<*) :: (a, b, a0) -> (a, b, b0) -> (a, b, a0) Source # Arrow a => Applicative (WrappedArrow a b) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a0 -> WrappedArrow a b a0 Source #(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 Source #liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c Source #(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 Source #(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 Source # Applicative m => Applicative (Kleisli m a) Since: base-4.14.0.0 Instance detailsDefined in Control.Arrow Methodspure :: a0 -> Kleisli m a a0 Source #(<*>) :: Kleisli m a (a0 -> b) -> Kleisli m a a0 -> Kleisli m a b Source #liftA2 :: (a0 -> b -> c) -> Kleisli m a a0 -> Kleisli m a b -> Kleisli m a c Source #(*>) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a b Source #(<*) :: Kleisli m a a0 -> Kleisli m a b -> Kleisli m a a0 Source # Monoid m => Applicative (Const m :: Type -> Type) Since: base-2.0.1 Instance detailsDefined in Data.Functor.Const Methodspure :: a -> Const m a Source #(<*>) :: Const m (a -> b) -> Const m a -> Const m b Source #liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c Source #(*>) :: Const m a -> Const m b -> Const m b Source #(<*) :: Const m a -> Const m b -> Const m a Source # Applicative f => Applicative (Ap f) Since: base-4.12.0.0 Instance detailsDefined in Data.Monoid Methodspure :: a -> Ap f a Source #(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b Source #liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c Source #(*>) :: Ap f a -> Ap f b -> Ap f b Source #(<*) :: Ap f a -> Ap f b -> Ap f a Source # Applicative f => Applicative (Alt f) Since: base-4.8.0.0 Instance detailsDefined in Data.Semigroup.Internal Methodspure :: a -> Alt f a Source #(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b Source #liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c Source #(*>) :: Alt f a -> Alt f b -> Alt f b Source #(<*) :: Alt f a -> Alt f b -> Alt f a Source # Applicative ((->) r :: Type -> Type) Since: base-2.1 Instance detailsDefined in GHC.Base Methodspure :: a -> r -> a Source #(<*>) :: (r -> (a -> b)) -> (r -> a) -> r -> b Source #liftA2 :: (a -> b -> c) -> (r -> a) -> (r -> b) -> r -> c Source #(*>) :: (r -> a) -> (r -> b) -> r -> b Source #(<*) :: (r -> a) -> (r -> b) -> r -> a Source # Monoid c => Applicative (K1 i c :: Type -> Type) Since: base-4.12.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> K1 i c a Source #(<*>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b Source #liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 Source #(*>) :: K1 i c a -> K1 i c b -> K1 i c b Source #(<*) :: K1 i c a -> K1 i c b -> K1 i c a Source # (Applicative f, Applicative g) => Applicative (f :*: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> (f :*: g) a Source #(<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b Source #liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c Source #(*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b Source #(<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a Source # (Monoid a, Monoid b, Monoid c) => Applicative ((,,,) a b c) Since: base-4.14.0.0 Instance detailsDefined in GHC.Base Methodspure :: a0 -> (a, b, c, a0) Source #(<*>) :: (a, b, c, a0 -> b0) -> (a, b, c, a0) -> (a, b, c, b0) Source #liftA2 :: (a0 -> b0 -> c0) -> (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, c0) Source #(*>) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, b0) Source #(<*) :: (a, b, c, a0) -> (a, b, c, b0) -> (a, b, c, a0) Source # (Applicative f, Applicative g) => Applicative (Product f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Product Methodspure :: a -> Product f g a Source #(<*>) :: Product f g (a -> b) -> Product f g a -> Product f g b Source #liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c Source #(*>) :: Product f g a -> Product f g b -> Product f g b Source #(<*) :: Product f g a -> Product f g b -> Product f g a Source # Applicative f => Applicative (M1 i c f) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> M1 i c f a Source #(<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b Source #liftA2 :: (a -> b -> c0) -> M1 i c f a -> M1 i c f b -> M1 i c f c0 Source #(*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b Source #(<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a Source # (Applicative f, Applicative g) => Applicative (f :.: g) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodspure :: a -> (f :.: g) a Source #(<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b Source #liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c Source #(*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b Source #(<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a Source # (Applicative f, Applicative g) => Applicative (Compose f g) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Compose Methodspure :: a -> Compose f g a Source #(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b Source #liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c Source #(*>) :: Compose f g a -> Compose f g b -> Compose f g b Source #(<*) :: Compose f g a -> Compose f g b -> Compose f g a Source # Monad state => Applicative (Builder collection mutCollection step state err) Instance detailsDefined in Basement.MutableBuilder Methodspure :: a -> Builder collection mutCollection step state err a Source #(<*>) :: Builder collection mutCollection step state err (a -> b) -> Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b Source #liftA2 :: (a -> b -> c) -> Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err c Source #(*>) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err b Source #(<*) :: Builder collection mutCollection step state err a -> Builder collection mutCollection step state err b -> Builder collection mutCollection step state err a Source # data Word Source # A Word is an unsigned integral type, with the same size as Int. #### Instances Instances details  Since: base-2.1 Instance detailsDefined in GHC.Enum Methods Since: base-2.1 Instance detailsDefined in GHC.Enum MethodsenumFrom :: Word -> [Word] Source #enumFromThen :: Word -> Word -> [Word] Source #enumFromTo :: Word -> Word -> [Word] Source #enumFromThenTo :: Word -> Word -> Word -> [Word] Source # Instance detailsDefined in GHC.Classes Methods(==) :: Word -> Word -> Bool Source #(/=) :: Word -> Word -> Bool Source # Since: base-2.1 Instance detailsDefined in GHC.Real Methodsquot :: Word -> Word -> Word Source #rem :: Word -> Word -> Word Source #div :: Word -> Word -> Word Source #mod :: Word -> Word -> Word Source #quotRem :: Word -> Word -> (Word, Word) Source #divMod :: Word -> Word -> (Word, Word) Source # Since: base-4.0.0.0 Instance detailsDefined in Data.Data Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Word -> c Word Source #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c Word Source #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c Word) Source #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c Word) Source #gmapT :: (forall b. Data b => b -> b) -> Word -> Word Source #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r Source #gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Word -> r Source #gmapQ :: (forall d. Data d => d -> u) -> Word -> [u] Source #gmapQi :: Int -> (forall d. Data d => d -> u) -> Word -> u Source #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Word -> m Word Source #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word Source #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Word -> m Word Source # Since: base-2.1 Instance detailsDefined in GHC.Num Methods(+) :: Word -> Word -> Word Source #(-) :: Word -> Word -> Word Source #(*) :: Word -> Word -> Word Source # Instance detailsDefined in GHC.Classes Methods(<) :: Word -> Word -> Bool Source #(<=) :: Word -> Word -> Bool Source #(>) :: Word -> Word -> Bool Source #(>=) :: Word -> Word -> Bool Source #max :: Word -> Word -> Word Source #min :: Word -> Word -> Word Source # Since: base-4.5.0.0 Instance detailsDefined in GHC.Read Methods Since: base-2.1 Instance detailsDefined in GHC.Real Methods Since: base-2.1 Instance detailsDefined in GHC.Show MethodsshowList :: [Word] -> ShowS Source # Since: base-4.6.0.0 Instance detailsDefined in GHC.Ix Methodsrange :: (Word, Word) -> [Word] Source #index :: (Word, Word) -> Word -> Int Source #unsafeIndex :: (Word, Word) -> Word -> Int Source #inRange :: (Word, Word) -> Word -> Bool Source #rangeSize :: (Word, Word) -> Int Source #unsafeRangeSize :: (Word, Word) -> Int Source # Since: base-2.1 Instance detailsDefined in Foreign.Storable MethodspokeElemOff :: Ptr Word -> Int -> Word -> IO () Source #peekByteOff :: Ptr b -> Int -> IO Word Source #pokeByteOff :: Ptr b -> Int -> Word -> IO () Source #poke :: Ptr Word -> Word -> IO () Source # Since: base-2.1 Instance detailsDefined in Data.Bits Methods(.&.) :: Word -> Word -> Word Source #(.|.) :: Word -> Word -> Word Source #xor :: Word -> Word -> Word Source #shift :: Word -> Int -> Word Source #rotate :: Word -> Int -> Word Source #setBit :: Word -> Int -> Word Source #shiftL :: Word -> Int -> Word Source #shiftR :: Word -> Int -> Word Source # Since: base-4.6.0.0 Instance detailsDefined in Data.Bits Methods Instance detailsDefined in Basement.NormalForm MethodstoNormalForm :: Word -> () Source # Instance detailsDefined in Basement.PrimType Associated Typestype PrimSize Word :: Nat Source # MethodsprimMbaURead :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word -> prim Word Source #primMbaUWrite :: PrimMonad prim => MutableByteArray# (PrimState prim) -> Offset Word -> Word -> prim () Source #primAddrRead :: PrimMonad prim => Addr# -> Offset Word -> prim Word Source #primAddrWrite :: PrimMonad prim => Addr# -> Offset Word -> Word -> prim () Source # Instance detailsDefined in Basement.PrimType Instance detailsDefined in Basement.Numerical.Subtractive Associated Types Methods Instance detailsDefined in Control.DeepSeq Methodsrnf :: Word -> () Source # Generic1 (URec Word :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep1 (URec Word) :: k -> Type Source # Methodsfrom1 :: forall (a :: k0). URec Word a -> Rep1 (URec Word) a Source #to1 :: forall (a :: k0). Rep1 (URec Word) a -> URec Word a Source # Foldable (UWord :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Foldable Methodsfold :: Monoid m => UWord m -> m Source #foldMap :: Monoid m => (a -> m) -> UWord a -> m Source #foldMap' :: Monoid m => (a -> m) -> UWord a -> m Source #foldr :: (a -> b -> b) -> b -> UWord a -> b Source #foldr' :: (a -> b -> b) -> b -> UWord a -> b Source #foldl :: (b -> a -> b) -> b -> UWord a -> b Source #foldl' :: (b -> a -> b) -> b -> UWord a -> b Source #foldr1 :: (a -> a -> a) -> UWord a -> a Source #foldl1 :: (a -> a -> a) -> UWord a -> a Source #toList :: UWord a -> [a] Source #null :: UWord a -> Bool Source #length :: UWord a -> Int Source #elem :: Eq a => a -> UWord a -> Bool Source #maximum :: Ord a => UWord a -> a Source #minimum :: Ord a => UWord a -> a Source #sum :: Num a => UWord a -> a Source #product :: Num a => UWord a -> a Source # 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) Source #sequenceA :: Applicative f => UWord (f a) -> f (UWord a) Source #mapM :: Monad m => (a -> m b) -> UWord a -> m (UWord b) Source #sequence :: Monad m => UWord (m a) -> m (UWord a) Source # 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 Source #(<$) :: a -> URec Word b -> URec Word a Source # Eq (URec Word p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methods(==) :: URec Word p -> URec Word p -> Bool Source #(/=) :: URec Word p -> URec Word p -> Bool Source # Ord (URec Word p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Methodscompare :: URec Word p -> URec Word p -> Ordering Source #(<) :: URec Word p -> URec Word p -> Bool Source #(<=) :: URec Word p -> URec Word p -> Bool Source #(>) :: URec Word p -> URec Word p -> Bool Source #(>=) :: URec Word p -> URec Word p -> Bool Source #max :: URec Word p -> URec Word p -> URec Word p Source #min :: URec Word p -> URec Word p -> URec Word p Source # Show (URec Word p) Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics MethodsshowsPrec :: Int -> URec Word p -> ShowS Source #showList :: [URec Word p] -> ShowS Source # Since: base-4.9.0.0 Instance detailsDefined in GHC.Generics Associated Typestype Rep (URec Word p) :: Type -> Type Source # Methodsfrom :: URec Word p -> Rep (URec Word p) x Source #to :: Rep (URec Word p) x -> URec Word p Source # type PrimSize Word Instance detailsDefined in Basement.PrimType type PrimSize Word = 8 type Difference Word Instance detailsDefined in Basement.Numerical.Subtractive type Difference Word = Word Instance detailsDefined in Basement.Nat 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) 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) 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 Word8 Source #

8-bit unsigned integer type

#### Instances

Instances details

data Word16 Source #

16-bit unsigned integer type

#### Instances

Instances details

data Word32 Source #

32-bit unsigned integer type

#### Instances

Instances details

data Word64 Source #

64-bit unsigned integer type

#### Instances

Instances details

forM :: (Traversable t, Monad m) => t a -> (a -> m b) -> m (t b) Source #

forM is mapM with its arguments flipped. For a version that ignores the results see forM_.

optional :: Alternative f => f a -> f (Maybe a) Source #

One or none.

newtype WrappedMonad (m :: Type -> Type) a Source #

Constructors

#### Instances

Instances details
 Monad m => Monad (WrappedMonad m) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Methods(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b Source #(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source #return :: a -> WrappedMonad m a Source # Monad m => Functor (WrappedMonad m) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b Source #(<$) :: a -> WrappedMonad m b -> WrappedMonad m a Source # Monad m => Applicative (WrappedMonad m) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a -> WrappedMonad m a Source #(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b Source #liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c Source #(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b Source #(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a Source # Since: base-2.1 Instance detailsDefined in Control.Applicative Methods(<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a Source #some :: WrappedMonad m a -> WrappedMonad m [a] Source #many :: WrappedMonad m a -> WrappedMonad m [a] Source # Generic1 (WrappedMonad m :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep1 (WrappedMonad m) :: k -> Type Source # Methodsfrom1 :: forall (a :: k). WrappedMonad m a -> Rep1 (WrappedMonad m) a Source #to1 :: forall (a :: k). Rep1 (WrappedMonad m) a -> WrappedMonad m a Source # (Typeable m, Typeable a, Data (m a)) => Data (WrappedMonad m a) Since: base-4.14.0.0 Instance detailsDefined in Data.Data Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> WrappedMonad m a -> c (WrappedMonad m a) Source #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (WrappedMonad m a) Source #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (WrappedMonad m a)) Source #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (WrappedMonad m a)) Source #gmapT :: (forall b. Data b => b -> b) -> WrappedMonad m a -> WrappedMonad m a Source #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r Source #gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedMonad m a -> r Source #gmapQ :: (forall d. Data d => d -> u) -> WrappedMonad m a -> [u] Source #gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedMonad m a -> u Source #gmapM :: Monad m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) Source #gmapMp :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) Source #gmapMo :: MonadPlus m0 => (forall d. Data d => d -> m0 d) -> WrappedMonad m a -> m0 (WrappedMonad m a) Source # Generic (WrappedMonad m a) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep (WrappedMonad m a) :: Type -> Type Source # Methodsfrom :: WrappedMonad m a -> Rep (WrappedMonad m a) x Source #to :: Rep (WrappedMonad m a) x -> WrappedMonad m a Source # type Rep1 (WrappedMonad m :: Type -> Type) Instance detailsDefined in Control.Applicative type Rep1 (WrappedMonad m :: Type -> Type) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 m))) type Rep (WrappedMonad m a) Instance detailsDefined in Control.Applicative type Rep (WrappedMonad m a) = D1 ('MetaData "WrappedMonad" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapMonad" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapMonad") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (m a)))) newtype WrappedArrow (a :: Type -> Type -> Type) b c Source # Constructors  WrapArrow FieldsunwrapArrow :: a b c #### Instances Instances details  Generic1 (WrappedArrow a b :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep1 (WrappedArrow a b) :: k -> Type Source # Methodsfrom1 :: forall (a0 :: k). WrappedArrow a b a0 -> Rep1 (WrappedArrow a b) a0 Source #to1 :: forall (a0 :: k). Rep1 (WrappedArrow a b) a0 -> WrappedArrow a b a0 Source # Arrow a => Functor (WrappedArrow a b) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 Source #(<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 Source # Arrow a => Applicative (WrappedArrow a b) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a0 -> WrappedArrow a b a0 Source #(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 Source #liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c Source #(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 Source #(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 Source # (ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b) Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsempty :: WrappedArrow a b a0 Source #(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 Source #some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] Source #many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] Source # (Typeable a, Typeable b, Typeable c, Data (a b c)) => Data (WrappedArrow a b c) Since: base-4.14.0.0 Instance detailsDefined in Data.Data Methodsgfoldl :: (forall d b0. Data d => c0 (d -> b0) -> d -> c0 b0) -> (forall g. g -> c0 g) -> WrappedArrow a b c -> c0 (WrappedArrow a b c) Source #gunfold :: (forall b0 r. Data b0 => c0 (b0 -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (WrappedArrow a b c) Source #toConstr :: WrappedArrow a b c -> Constr Source #dataTypeOf :: WrappedArrow a b c -> DataType Source #dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (WrappedArrow a b c)) Source #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (WrappedArrow a b c)) Source #gmapT :: (forall b0. Data b0 => b0 -> b0) -> WrappedArrow a b c -> WrappedArrow a b c Source #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r Source #gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> WrappedArrow a b c -> r Source #gmapQ :: (forall d. Data d => d -> u) -> WrappedArrow a b c -> [u] Source #gmapQi :: Int -> (forall d. Data d => d -> u) -> WrappedArrow a b c -> u Source #gmapM :: Monad m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) Source #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) Source #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> WrappedArrow a b c -> m (WrappedArrow a b c) Source # Generic (WrappedArrow a b c) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep (WrappedArrow a b c) :: Type -> Type Source # Methodsfrom :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x Source #to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c Source # type Rep1 (WrappedArrow a b :: Type -> Type) Instance detailsDefined in Control.Applicative type Rep1 (WrappedArrow a b :: Type -> Type) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 (a b)))) type Rep (WrappedArrow a b c) Instance detailsDefined in Control.Applicative type Rep (WrappedArrow a b c) = D1 ('MetaData "WrappedArrow" "Control.Applicative" "base" 'True) (C1 ('MetaCons "WrapArrow" 'PrefixI 'True) (S1 ('MetaSel ('Just "unwrapArrow") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 (a b c))))

newtype ZipList a Source #

Lists, but with an Applicative functor based on zipping.

Constructors

 ZipList FieldsgetZipList :: [a]

#### Instances

Instances details
 Since: base-2.1 Instance detailsDefined in Control.Applicative Methodsfmap :: (a -> b) -> ZipList a -> ZipList b Source #(<$) :: a -> ZipList b -> ZipList a Source # f <$> ZipList xs1 <*> ... <*> ZipList xsN = ZipList (zipWithN f xs1 ... xsN)where zipWithN refers to the zipWith function of the appropriate arity (zipWith, zipWith3, zipWith4, ...). For example:(\a b c -> stimes c [a, b]) <$> ZipList "abcd" <*> ZipList "567" <*> ZipList [1..] = ZipList (zipWith3 (\a b c -> stimes c [a, b]) "abcd" "567" [1..]) = ZipList {getZipList = ["a5","b6b6","c7c7c7"]}Since: base-2.1 Instance detailsDefined in Control.Applicative Methodspure :: a -> ZipList a Source #(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b Source #liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c Source #(*>) :: ZipList a -> ZipList b -> ZipList b Source #(<*) :: ZipList a -> ZipList b -> ZipList a Source # Since: base-4.9.0.0 Instance detailsDefined in Control.Applicative Methodsfold :: Monoid m => ZipList m -> m Source #foldMap :: Monoid m => (a -> m) -> ZipList a -> m Source #foldMap' :: Monoid m => (a -> m) -> ZipList a -> m Source #foldr :: (a -> b -> b) -> b -> ZipList a -> b Source #foldr' :: (a -> b -> b) -> b -> ZipList a -> b Source #foldl :: (b -> a -> b) -> b -> ZipList a -> b Source #foldl' :: (b -> a -> b) -> b -> ZipList a -> b Source #foldr1 :: (a -> a -> a) -> ZipList a -> a Source #foldl1 :: (a -> a -> a) -> ZipList a -> a Source #toList :: ZipList a -> [a] Source #null :: ZipList a -> Bool Source #length :: ZipList a -> Int Source #elem :: Eq a => a -> ZipList a -> Bool Source #maximum :: Ord a => ZipList a -> a Source #minimum :: Ord a => ZipList a -> a Source #sum :: Num a => ZipList a -> a Source #product :: Num a => ZipList a -> a Source # Since: base-4.9.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) Source #sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) Source #mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) Source #sequence :: Monad m => ZipList (m a) -> m (ZipList a) Source # Since: base-4.11.0.0 Instance detailsDefined in Control.Applicative Methods(<|>) :: ZipList a -> ZipList a -> ZipList a Source #some :: ZipList a -> ZipList [a] Source #many :: ZipList a -> ZipList [a] Source # Since: deepseq-1.4.3.0 Instance detailsDefined in Control.DeepSeq MethodsliftRnf :: (a -> ()) -> ZipList a -> () Source # Since: base-4.15.0.0 Instance detailsDefined in GHC.Exts Associated Typestype Item (ZipList a) Source # MethodsfromList :: [Item (ZipList a)] -> ZipList a Source #fromListN :: Int -> [Item (ZipList a)] -> ZipList a Source #toList :: ZipList a -> [Item (ZipList a)] Source # Eq a => Eq (ZipList a) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Methods(==) :: ZipList a -> ZipList a -> Bool Source #(/=) :: ZipList a -> ZipList a -> Bool Source # Data a => Data (ZipList a) Since: base-4.14.0.0 Instance detailsDefined in Data.Data Methodsgfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> ZipList a -> c (ZipList a) Source #gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (ZipList a) Source #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (ZipList a)) Source #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (ZipList a)) Source #gmapT :: (forall b. Data b => b -> b) -> ZipList a -> ZipList a Source #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r Source #gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> ZipList a -> r Source #gmapQ :: (forall d. Data d => d -> u) -> ZipList a -> [u] Source #gmapQi :: Int -> (forall d. Data d => d -> u) -> ZipList a -> u Source #gmapM :: Monad m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) Source #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) Source #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> ZipList a -> m (ZipList a) Source # Ord a => Ord (ZipList a) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Methodscompare :: ZipList a -> ZipList a -> Ordering Source #(<) :: ZipList a -> ZipList a -> Bool Source #(<=) :: ZipList a -> ZipList a -> Bool Source #(>) :: ZipList a -> ZipList a -> Bool Source #(>=) :: ZipList a -> ZipList a -> Bool Source #max :: ZipList a -> ZipList a -> ZipList a Source #min :: ZipList a -> ZipList a -> ZipList a Source # Read a => Read (ZipList a) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Methods Show a => Show (ZipList a) Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative MethodsshowsPrec :: Int -> ZipList a -> ShowS Source #show :: ZipList a -> String Source #showList :: [ZipList a] -> ShowS Source # Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep (ZipList a) :: Type -> Type Source # Methodsfrom :: ZipList a -> Rep (ZipList a) x Source #to :: Rep (ZipList a) x -> ZipList a Source # NFData a => NFData (ZipList a) Since: deepseq-1.4.0.0 Instance detailsDefined in Control.DeepSeq Methodsrnf :: ZipList a -> () Source # Since: base-4.7.0.0 Instance detailsDefined in Control.Applicative Associated Typestype Rep1 ZipList :: k -> Type Source # Methodsfrom1 :: forall (a :: k). ZipList a -> Rep1 ZipList a Source #to1 :: forall (a :: k). Rep1 ZipList a -> ZipList a Source # type Rep (ZipList a) Instance detailsDefined in Control.Applicative type Rep (ZipList a) = D1 ('MetaData "ZipList" "Control.Applicative" "base" 'True) (C1 ('MetaCons "ZipList" 'PrefixI 'True) (S1 ('MetaSel ('Just "getZipList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 [a]))) type Item (ZipList a) Instance detailsDefined in GHC.Exts type Item (ZipList a) = a type Rep1 ZipList Instance detailsDefined in Control.Applicative type Rep1 ZipList = D1 ('MetaData "ZipList" "Control.Applicative" "base" 'True) (C1 ('MetaCons "ZipList" 'PrefixI 'True) (S1 ('MetaSel ('Just "getZipList") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec1 []))) first :: Arrow a => a b c -> a (b, d) (c, d) Source # Send the first component of the input through the argument arrow, and copy the rest unchanged to the output. second :: Arrow a => a b c -> a (d, b) (d, c) Source # A mirror image of first. The default definition may be overridden with a more efficient version if desired. newtype Const a (b :: k) Source # The Const functor. Constructors  Const FieldsgetConst :: a #### Instances Instances details  Generic1 (Const a :: k -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Associated Typestype Rep1 (Const a) :: k -> Type Source # Methodsfrom1 :: forall (a0 :: k0). Const a a0 -> Rep1 (Const a) a0 Source #to1 :: forall (a0 :: k0). Rep1 (Const a) a0 -> Const a a0 Source # Eq2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Const a c -> Const b d -> Bool Source # Ord2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Const a c -> Const b d -> Ordering Source # Read2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Const a b) Source #liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Const a b] Source #liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Const a b) Source #liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Const a b] Source # Show2 (Const :: Type -> Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Const a b -> ShowS Source #liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Const a b] -> ShowS Source # NFData2 (Const :: Type -> Type -> Type) Since: deepseq-1.4.3.0 Instance detailsDefined in Control.DeepSeq MethodsliftRnf2 :: (a -> ()) -> (b -> ()) -> Const a b -> () Source # Functor (Const m :: Type -> Type) Since: base-2.1 Instance detailsDefined in Data.Functor.Const Methodsfmap :: (a -> b) -> Const m a -> Const m b Source #(<$) :: a -> Const m b -> Const m a Source # Monoid m => Applicative (Const m :: Type -> Type) Since: base-2.0.1 Instance detailsDefined in Data.Functor.Const Methodspure :: a -> Const m a Source #(<*>) :: Const m (a -> b) -> Const m a -> Const m b Source #liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c Source #(*>) :: Const m a -> Const m b -> Const m b Source #(<*) :: Const m a -> Const m b -> Const m a Source # Foldable (Const m :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Functor.Const Methodsfold :: Monoid m0 => Const m m0 -> m0 Source #foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 Source #foldMap' :: Monoid m0 => (a -> m0) -> Const m a -> m0 Source #foldr :: (a -> b -> b) -> b -> Const m a -> b Source #foldr' :: (a -> b -> b) -> b -> Const m a -> b Source #foldl :: (b -> a -> b) -> b -> Const m a -> b Source #foldl' :: (b -> a -> b) -> b -> Const m a -> b Source #foldr1 :: (a -> a -> a) -> Const m a -> a Source #foldl1 :: (a -> a -> a) -> Const m a -> a Source #toList :: Const m a -> [a] Source #null :: Const m a -> Bool Source #length :: Const m a -> Int Source #elem :: Eq a => a -> Const m a -> Bool Source #maximum :: Ord a => Const m a -> a Source #minimum :: Ord a => Const m a -> a Source #sum :: Num a => Const m a -> a Source #product :: Num a => Const m a -> a Source # Traversable (Const m :: Type -> Type) Since: base-4.7.0.0 Instance detailsDefined in Data.Traversable Methodstraverse :: Applicative f => (a -> f b) -> Const m a -> f (Const m b) Source #sequenceA :: Applicative f => Const m (f a) -> f (Const m a) Source #mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 (Const m b) Source #sequence :: Monad m0 => Const m (m0 a) -> m0 (Const m a) Source # Eq a => Eq1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftEq :: (a0 -> b -> Bool) -> Const a a0 -> Const a b -> Bool Source # Ord a => Ord1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftCompare :: (a0 -> b -> Ordering) -> Const a a0 -> Const a b -> Ordering Source # Read a => Read1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Const a a0) Source #liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Const a a0] Source #liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Const a a0) Source #liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Const a a0] Source # Show a => Show1 (Const a :: Type -> Type) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Classes MethodsliftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Const a a0 -> ShowS Source #liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Const a a0] -> ShowS Source # NFData a => NFData1 (Const a :: Type -> Type) Since: deepseq-1.4.3.0 Instance detailsDefined in Control.DeepSeq MethodsliftRnf :: (a0 -> ()) -> Const a a0 -> () Source # Bounded a => Bounded (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsminBound :: Const a b Source #maxBound :: Const a b Source # Enum a => Enum (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodssucc :: Const a b -> Const a b Source #pred :: Const a b -> Const a b Source #toEnum :: Int -> Const a b Source #fromEnum :: Const a b -> Int Source #enumFrom :: Const a b -> [Const a b] Source #enumFromThen :: Const a b -> Const a b -> [Const a b] Source #enumFromTo :: Const a b -> Const a b -> [Const a b] Source #enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] Source # Eq a => Eq (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methods(==) :: Const a b -> Const a b -> Bool Source #(/=) :: Const a b -> Const a b -> Bool Source # Floating a => Floating (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodspi :: Const a b Source #exp :: Const a b -> Const a b Source #log :: Const a b -> Const a b Source #sqrt :: Const a b -> Const a b Source #(**) :: Const a b -> Const a b -> Const a b Source #logBase :: Const a b -> Const a b -> Const a b Source #sin :: Const a b -> Const a b Source #cos :: Const a b -> Const a b Source #tan :: Const a b -> Const a b Source #asin :: Const a b -> Const a b Source #acos :: Const a b -> Const a b Source #atan :: Const a b -> Const a b Source #sinh :: Const a b -> Const a b Source #cosh :: Const a b -> Const a b Source #tanh :: Const a b -> Const a b Source #asinh :: Const a b -> Const a b Source #acosh :: Const a b -> Const a b Source #atanh :: Const a b -> Const a b Source #log1p :: Const a b -> Const a b Source #expm1 :: Const a b -> Const a b Source #log1pexp :: Const a b -> Const a b Source #log1mexp :: Const a b -> Const a b Source # Fractional a => Fractional (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 Source #recip :: Const a b -> Const a b Source # Integral a => Integral (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodsquot :: Const a b -> Const a b -> Const a b Source #rem :: Const a b -> Const a b -> Const a b Source #div :: Const a b -> Const a b -> Const a b Source #mod :: Const a b -> Const a b -> Const a b Source #quotRem :: Const a b -> Const a b -> (Const a b, Const a b) Source #divMod :: Const a b -> Const a b -> (Const a b, Const a b) Source #toInteger :: Const a b -> Integer Source # (Typeable k, Data a, Typeable b) => Data (Const a b) Since: base-4.10.0.0 Instance detailsDefined in Data.Data Methodsgfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Const a b -> c (Const a b) Source #gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Const a b) Source #toConstr :: Const a b -> Constr Source #dataTypeOf :: Const a b -> DataType Source #dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Const a b)) Source #dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Const a b)) Source #gmapT :: (forall b0. Data b0 => b0 -> b0) -> Const a b -> Const a b Source #gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r Source #gmapQr :: forall r r'. (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r Source #gmapQ :: (forall d. Data d => d -> u) -> Const a b -> [u] Source #gmapQi :: Int -> (forall d. Data d => d -> u) -> Const a b -> u Source #gmapM :: Monad m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) Source #gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) Source #gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) Source # Num a => Num (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 Source #(-) :: Const a b -> Const a b -> Const a b Source #(*) :: Const a b -> Const a b -> Const a b Source #negate :: Const a b -> Const a b Source #abs :: Const a b -> Const a b Source #signum :: Const a b -> Const a b Source # Ord a => Ord (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodscompare :: Const a b -> Const a b -> Ordering Source #(<) :: Const a b -> Const a b -> Bool Source #(<=) :: Const a b -> Const a b -> Bool Source #(>) :: Const a b -> Const a b -> Bool Source #(>=) :: Const a b -> Const a b -> Bool Source #max :: Const a b -> Const a b -> Const a b Source #min :: Const a b -> Const a b -> Const a b Source # Read a => Read (Const a b) This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removedSince: base-4.8.0.0 Instance detailsDefined in Data.Functor.Const MethodsreadsPrec :: Int -> ReadS (Const a b) Source #readList :: ReadS [Const a b] Source #readPrec :: ReadPrec (Const a b) Source # Real a => Real (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodstoRational :: Const a b -> Rational Source # RealFloat a => RealFloat (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsfloatRadix :: Const a b -> Integer Source #floatDigits :: Const a b -> Int Source #floatRange :: Const a b -> (Int, Int) Source #decodeFloat :: Const a b -> (Integer, Int) Source #encodeFloat :: Integer -> Int -> Const a b Source #exponent :: Const a b -> Int Source #significand :: Const a b -> Const a b Source #scaleFloat :: Int -> Const a b -> Const a b Source #isNaN :: Const a b -> Bool Source #isInfinite :: Const a b -> Bool Source #isDenormalized :: Const a b -> Bool Source #isNegativeZero :: Const a b -> Bool Source #isIEEE :: Const a b -> Bool Source #atan2 :: Const a b -> Const a b -> Const a b Source # RealFrac a => RealFrac (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsproperFraction :: Integral b0 => Const a b -> (b0, Const a b) Source #truncate :: Integral b0 => Const a b -> b0 Source #round :: Integral b0 => Const a b -> b0 Source #ceiling :: Integral b0 => Const a b -> b0 Source #floor :: Integral b0 => Const a b -> b0 Source # Show a => Show (Const a b) This instance would be equivalent to the derived instances of the Const newtype if the getConst field were removedSince: base-4.8.0.0 Instance detailsDefined in Data.Functor.Const MethodsshowsPrec :: Int -> Const a b -> ShowS Source #show :: Const a b -> String Source #showList :: [Const a b] -> ShowS Source # Ix a => Ix (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodsrange :: (Const a b, Const a b) -> [Const a b] Source #index :: (Const a b, Const a b) -> Const a b -> Int Source #unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int Source #inRange :: (Const a b, Const a b) -> Const a b -> Bool Source #rangeSize :: (Const a b, Const a b) -> Int Source #unsafeRangeSize :: (Const a b, Const a b) -> Int Source # IsString a => IsString (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.String MethodsfromString :: String -> Const a b Source # Generic (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Associated Typestype Rep (Const a b) :: Type -> Type Source # Methodsfrom :: Const a b -> Rep (Const a b) x Source #to :: Rep (Const a b) x -> Const a b Source # 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 Source #sconcat :: NonEmpty (Const a b) -> Const a b Source #stimes :: Integral b0 => b0 -> Const a b -> Const a b Source # Monoid a => Monoid (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const Methodsmempty :: Const a b Source #mappend :: Const a b -> Const a b -> Const a b Source #mconcat :: [Const a b] -> Const a b Source # Storable a => Storable (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodssizeOf :: Const a b -> Int Source #alignment :: Const a b -> Int Source #peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) Source #pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () Source #peekByteOff :: Ptr b0 -> Int -> IO (Const a b) Source #pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () Source #peek :: Ptr (Const a b) -> IO (Const a b) Source #poke :: Ptr (Const a b) -> Const a b -> IO () Source # Bits a => Bits (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 Source #(.|.) :: Const a b -> Const a b -> Const a b Source #xor :: Const a b -> Const a b -> Const a b Source #complement :: Const a b -> Const a b Source #shift :: Const a b -> Int -> Const a b Source #rotate :: Const a b -> Int -> Const a b Source #zeroBits :: Const a b Source #bit :: Int -> Const a b Source #setBit :: Const a b -> Int -> Const a b Source #clearBit :: Const a b -> Int -> Const a b Source #complementBit :: Const a b -> Int -> Const a b Source #testBit :: Const a b -> Int -> Bool Source #bitSizeMaybe :: Const a b -> Maybe Int Source #bitSize :: Const a b -> Int Source #isSigned :: Const a b -> Bool Source #shiftL :: Const a b -> Int -> Const a b Source #unsafeShiftL :: Const a b -> Int -> Const a b Source #shiftR :: Const a b -> Int -> Const a b Source #unsafeShiftR :: Const a b -> Int -> Const a b Source #rotateL :: Const a b -> Int -> Const a b Source #rotateR :: Const a b -> Int -> Const a b Source #popCount :: Const a b -> Int Source # FiniteBits a => FiniteBits (Const a b) Since: base-4.9.0.0 Instance detailsDefined in Data.Functor.Const MethodsfiniteBitSize :: Const a b -> Int Source #countLeadingZeros :: Const a b -> Int Source # NFData a => NFData (Const a b) Since: deepseq-1.4.0.0 Instance detailsDefined in Control.DeepSeq Methodsrnf :: Const a b -> () Source # type Rep1 (Const a :: k -> Type) Instance detailsDefined in Data.Functor.Const type Rep1 (Const a :: k -> Type) = D1 ('MetaData "Const" "Data.Functor.Const" "base" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a))) type Rep (Const a b) Instance detailsDefined in Data.Functor.Const type Rep (Const a b) = D1 ('MetaData "Const" "Data.Functor.Const" "base" 'True) (C1 ('MetaCons "Const" 'PrefixI 'True) (S1 ('MetaSel ('Just "getConst") 'NoSourceUnpackedness 'NoSourceStrictness 'DecidedLazy) (Rec0 a)))

forM_ :: (Foldable t, Monad m) => t a -> (a -> m b) -> m () Source #

forM_ is mapM_ with its arguments flipped. For a version that doesn't ignore the results see forM.

As of base 4.8.0.0, forM_ is just for_, specialized to Monad.

Reverse the order of the bits in a Word64.

Since: base-4.12.0.0

Reverse the order of the bits in a Word32.

Since: base-4.12.0.0

Reverse the order of the bits in a Word16.

Since: base-4.12.0.0

Reverse the order of the bits in a Word8.

Since: base-4.12.0.0

Reverse order of bytes in Word64.

Since: base-4.7.0.0

Reverse order of bytes in Word32.

Since: base-4.7.0.0

Reverse order of bytes in Word16.

Since: base-4.7.0.0

void :: Functor f => f a -> f () Source #

void value discards or ignores the result of evaluation, such as the return value of an IO action.

Using ApplicativeDo: 'void as' can be understood as the do expression

do as
pure ()


with an inferred Functor constraint.

#### Examples

Expand

Replace the contents of a Maybe Int with unit:

>>> void Nothing
Nothing
>>> void (Just 3)
Just ()


Replace the contents of an Either Int Int with unit, resulting in an Either Int ():

>>> void (Left 8675309)
Left 8675309
>>> void (Right 8675309)
Right ()


Replace every element of a list with unit:

>>> void [1,2,3]
[(),(),()]


Replace the second element of a pair with unit:

>>> void (1,2)
(1,())


Discard the result of an IO action:

>>> mapM print [1,2]
1
2
[(),()]
>>> void $mapM print [1,2] 1 2  (<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 Source #

An infix synonym for fmap.

The name of this operator is an allusion to $. Note the similarities between their types:  ($)  ::              (a -> b) ->   a ->   b
(<$>) :: Functor f => (a -> b) -> f a -> f b Whereas $ is function application, <$> is function application lifted over a Functor. #### Examples Expand Convert from a Maybe Int to a Maybe String using show: >>> show <$> Nothing
Nothing
>>> show <$> Just 3 Just "3"  Convert from an Either Int Int to an Either Int String using show: >>> show <$> Left 17
Left 17
>>> show <$> Right 17 Right "17"  Double each element of a list: >>> (*2) <$> [1,2,3]
[2,4,6]


Apply even to the second element of a pair:

>>> even <$> (2,2) (2,True)  liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d Source # Lift a ternary function to actions. Using ApplicativeDo: 'liftA3 f as bs cs' can be understood as the do expression do a <- as b <- bs c <- cs pure (f a b c)  liftA :: Applicative f => (a -> b) -> f a -> f b Source # Lift a function to actions. This function may be used as a value for fmap in a Functor instance. | Using ApplicativeDo: 'liftA f as' can be understood as the do expression do a <- as pure (f a)  with an inferred Functor constraint, weaker than Applicative. (<**>) :: Applicative f => f a -> f (a -> b) -> f b infixl 4 Source # A variant of <*> with the arguments reversed. Using ApplicativeDo: 'as <**> fs' can be understood as the do expression do a <- as f <- fs pure (f a)  class Applicative f => Alternative (f :: Type -> Type) where Source # A monoid on applicative functors. If defined, some and many should be the least solutions of the equations: • some v = (:) <$> v <*> many v
• many v = some v <|> pure []

Minimal complete definition

Methods

empty :: f a Source #

The identity of <|>

(<|>) :: f a -> f a -> f a infixl 3 Source #

An associative binary operation

some :: f a -> f [a] Source #

One or more.

many :: f a -> f [a] Source #

Zero or more.

#### Instances

Instances details