b9-0.5.68.2: A tool and library for building virtual machine images.

Safe HaskellNone
LanguageHaskell2010

B9

Description

B9 is a library and build tool with which one can create/convert different types of VM images. Additionally installation steps - like installing software - can be done in a LXC container, running on the disk images.

B9 allows to create and convert virtual machine image files as well as related ISO and VFAT disk images for e.g. cloud-init configuration sources.

This module re-exports the modules needed to build a tool around the library, e.g. see src/cli/Main.hs as an example.

B9.Artifact.Generator is the module containing the basic data structure used to describe a B9 build.

Synopsis

Documentation

b9Version :: Version Source #

Return the cabal package version of the B9 library.

b9VersionString :: String Source #

Return the cabal package version of the B9 library, formatted using showVersion.

runShowVersion :: MonadIO m => m () Source #

Just print the b9VersionString

runBuildArtifacts :: [FilePath] -> B9ConfigAction String Source #

Execute the artifact generators defined in a list of text files. Read the text files in the list and parse them as ArtifactGenerators then mappend them and apply buildArtifacts to them.

runFormatBuildFiles :: MonadIO m => [FilePath] -> m () Source #

Read all text files and parse them as ArtifactGenerators. Then overwrite the files with their contents but _pretty printed_ (i.e. formatted).

runPush :: SharedImageName -> B9ConfigAction () Source #

Upload a SharedImageName to the default remote repository. Note: The remote repository is specified in the B9Config.

runPull :: Maybe SharedImageName -> B9ConfigAction () Source #

Either pull a list of available SharedImageNames from the remote repository if Nothing is passed as parameter, or pull the latest version of the image from the remote repository. Note: The remote repository is specified in the B9Config.

runRun :: SharedImageName -> [String] -> B9ConfigAction String Source #

Execute an interactive root shell in a running container from a SharedImageName.

runGcLocalRepoCache :: B9ConfigAction () Source #

Delete all obsolete versions of all SharedImageNames.

runGcRemoteRepoCache :: B9ConfigAction () Source #

Clear the shared image cache for a remote. Note: The remote repository is specified in the B9Config.

runListSharedImages :: B9ConfigAction [SharedImage] Source #

Print a list of shared images cached locally or remotely, if a remote repository was selected. Note: The remote repository is specified in the B9Config.

runAddRepo :: RemoteRepo -> B9ConfigAction () Source #

Check the SSH settings for a remote repository and add it to the user wide B9 configuration file.

runLookupLocalSharedImage :: SharedImageName -> B9ConfigAction (Maybe SharedImageBuildId) Source #

Find the most recent version of a SharedImageName in the local image cache.

(++) :: [a] -> [a] -> [a] infixr 5 #

Append two lists, i.e.,

[x1, ..., xm] ++ [y1, ..., yn] == [x1, ..., xm, y1, ..., yn]
[x1, ..., xm] ++ [y1, ...] == [x1, ..., xm, y1, ...]

If the first list is not finite, the result is the first list.

filter :: (a -> Bool) -> [a] -> [a] #

filter, applied to a predicate and a list, returns the list of those elements that satisfy the predicate; i.e.,

filter p xs = [ x | x <- xs, p x]

zip :: [a] -> [b] -> [(a, b)] #

zip takes two lists and returns a list of corresponding pairs.

zip [1, 2] ['a', 'b'] = [(1, 'a'), (2, 'b')]

If one input list is short, excess elements of the longer list are discarded:

zip [1] ['a', 'b'] = [(1, 'a')]
zip [1, 2] ['a'] = [(1, 'a')]

zip is right-lazy:

zip [] _|_ = []
zip _|_ [] = _|_

map :: (a -> b) -> [a] -> [b] #

map f xs is the list obtained by applying f to each element of xs, i.e.,

map f [x1, x2, ..., xn] == [f x1, f x2, ..., f xn]
map f [x1, x2, ...] == [f x1, f x2, ...]

guard :: Alternative f => Bool -> f () #

Conditional failure of Alternative computations. Defined by

guard True  = pure ()
guard False = empty

Examples

Expand

Common uses of guard include conditionally signaling an error in an error monad and conditionally rejecting the current choice in an Alternative-based parser.

As an example of signaling an error in the error monad Maybe, consider a safe division function safeDiv x y that returns Nothing when the denominator y is zero and Just (x `div` y) otherwise. For example:

>>> safeDiv 4 0
Nothing
>>> safeDiv 4 2
Just 2

A definition of safeDiv using guards, but not guard:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y | y /= 0    = Just (x `div` y)
            | otherwise = Nothing

A definition of safeDiv using guard and Monad do-notation:

safeDiv :: Int -> Int -> Maybe Int
safeDiv x y = do
  guard (y /= 0)
  return (x `div` y)

join :: Monad m => m (m a) -> m a #

The join function is the conventional monad join operator. It is used to remove one level of monadic structure, projecting its bound argument into the outer level.

Examples

Expand

A common use of join is to run an IO computation returned from an STM transaction, since STM transactions can't perform IO directly. Recall that

atomically :: STM a -> IO a

is used to run STM transactions atomically. So, by specializing the types of atomically and join to

atomically :: STM (IO b) -> IO (IO b)
join       :: IO (IO b)  -> IO b

we can compose them as

join . atomically :: STM (IO b) -> IO b

to run an STM transaction and the IO action it returns.

class Applicative m => Monad (m :: Type -> Type) where #

The Monad class defines the basic operations over a monad, a concept from a branch of mathematics known as category theory. From the perspective of a Haskell programmer, however, it is best to think of a monad as an abstract datatype of actions. Haskell's do expressions provide a convenient syntax for writing monadic expressions.

Instances of Monad should satisfy the following laws:

Furthermore, the Monad and Applicative operations should relate as follows:

The above laws imply:

and that pure and (<*>) satisfy the applicative functor laws.

The instances of Monad for lists, Maybe and IO defined in the Prelude satisfy these laws.

Minimal complete definition

(>>=)

Methods

(>>=) :: m a -> (a -> m b) -> m b infixl 1 #

Sequentially compose two actions, passing any value produced by the first as an argument to the second.

(>>) :: m a -> m b -> m b infixl 1 #

Sequentially compose two actions, discarding any value produced by the first, like sequencing operators (such as the semicolon) in imperative languages.

return :: a -> m a #

Inject a value into the monadic type.

fail :: String -> m a #

Fail with a message. This operation is not part of the mathematical definition of a monad, but is invoked on pattern-match failure in a do expression.

As part of the MonadFail proposal (MFP), this function is moved to its own class MonadFail (see Control.Monad.Fail for more details). The definition here will be removed in a future release.

Instances
Monad []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: [a] -> (a -> [b]) -> [b] #

(>>) :: [a] -> [b] -> [b] #

return :: a -> [a] #

fail :: String -> [a] #

Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #

(>>) :: Maybe a -> Maybe b -> Maybe b #

return :: a -> Maybe a #

fail :: String -> Maybe a #

Monad IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: IO a -> (a -> IO b) -> IO b #

(>>) :: IO a -> IO b -> IO b #

return :: a -> IO a #

fail :: String -> IO a #

Monad Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: Par1 a -> (a -> Par1 b) -> Par1 b #

(>>) :: Par1 a -> Par1 b -> Par1 b #

return :: a -> Par1 a #

fail :: String -> Par1 a #

Monad Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

(>>=) :: Q a -> (a -> Q b) -> Q b #

(>>) :: Q a -> Q b -> Q b #

return :: a -> Q a #

fail :: String -> Q a #

Monad Rose 
Instance details

Defined in Test.QuickCheck.Property

Methods

(>>=) :: Rose a -> (a -> Rose b) -> Rose b #

(>>) :: Rose a -> Rose b -> Rose b #

return :: a -> Rose a #

fail :: String -> Rose a #

Monad Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

(>>=) :: Gen a -> (a -> Gen b) -> Gen b #

(>>) :: Gen a -> Gen b -> Gen b #

return :: a -> Gen a #

fail :: String -> Gen a #

Monad IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(>>=) :: IResult a -> (a -> IResult b) -> IResult b #

(>>) :: IResult a -> IResult b -> IResult b #

return :: a -> IResult a #

fail :: String -> IResult a #

Monad Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(>>=) :: Result a -> (a -> Result b) -> Result b #

(>>) :: Result a -> Result b -> Result b #

return :: a -> Result a #

fail :: String -> Result a #

Monad Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

(>>=) :: Parser a -> (a -> Parser b) -> Parser b #

(>>) :: Parser a -> Parser b -> Parser b #

return :: a -> Parser a #

fail :: String -> Parser a #

Monad Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

(>>=) :: Complex a -> (a -> Complex b) -> Complex b #

(>>) :: Complex a -> Complex b -> Complex b #

return :: a -> Complex a #

fail :: String -> Complex a #

Monad Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Min a -> (a -> Min b) -> Min b #

(>>) :: Min a -> Min b -> Min b #

return :: a -> Min a #

fail :: String -> Min a #

Monad Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Max a -> (a -> Max b) -> Max b #

(>>) :: Max a -> Max b -> Max b #

return :: a -> Max a #

fail :: String -> Max a #

Monad First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: First a -> (a -> First b) -> First b #

(>>) :: First a -> First b -> First b #

return :: a -> First a #

fail :: String -> First a #

Monad Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Last a -> (a -> Last b) -> Last b #

(>>) :: Last a -> Last b -> Last b #

return :: a -> Last a #

fail :: String -> Last a #

Monad Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

(>>=) :: Option a -> (a -> Option b) -> Option b #

(>>) :: Option a -> Option b -> Option b #

return :: a -> Option a #

fail :: String -> Option a #

Monad Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

(>>=) :: Identity a -> (a -> Identity b) -> Identity b #

(>>) :: Identity a -> Identity b -> Identity b #

return :: a -> Identity a #

fail :: String -> Identity a #

Monad STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

(>>=) :: STM a -> (a -> STM b) -> STM b #

(>>) :: STM a -> STM b -> STM b #

return :: a -> STM a #

fail :: String -> STM a #

Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: First a -> (a -> First b) -> First b #

(>>) :: First a -> First b -> First b #

return :: a -> First a #

fail :: String -> First a #

Monad Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Last a -> (a -> Last b) -> Last b #

(>>) :: Last a -> Last b -> Last b #

return :: a -> Last a #

fail :: String -> Last a #

Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Dual a -> (a -> Dual b) -> Dual b #

(>>) :: Dual a -> Dual b -> Dual b #

return :: a -> Dual a #

fail :: String -> Dual a #

Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Sum a -> (a -> Sum b) -> Sum b #

(>>) :: Sum a -> Sum b -> Sum b #

return :: a -> Sum a #

fail :: String -> Sum a #

Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Product a -> (a -> Product b) -> Product b #

(>>) :: Product a -> Product b -> Product b #

return :: a -> Product a #

fail :: String -> Product a #

Monad Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

(>>=) :: Down a -> (a -> Down b) -> Down b #

(>>) :: Down a -> Down b -> Down b #

return :: a -> Down a #

fail :: String -> Down a #

Monad ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

(>>=) :: ReadPrec a -> (a -> ReadPrec b) -> ReadPrec b #

(>>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

return :: a -> ReadPrec a #

fail :: String -> ReadPrec a #

Monad ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

(>>=) :: ReadP a -> (a -> ReadP b) -> ReadP b #

(>>) :: ReadP a -> ReadP b -> ReadP b #

return :: a -> ReadP a #

fail :: String -> ReadP a #

Monad NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: NonEmpty a -> (a -> NonEmpty b) -> NonEmpty b #

(>>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

return :: a -> NonEmpty a #

fail :: String -> NonEmpty a #

Monad PutM 
Instance details

Defined in Data.Binary.Put

Methods

(>>=) :: PutM a -> (a -> PutM b) -> PutM b #

(>>) :: PutM a -> PutM b -> PutM b #

return :: a -> PutM a #

fail :: String -> PutM a #

Monad Get 
Instance details

Defined in Data.Binary.Get.Internal

Methods

(>>=) :: Get a -> (a -> Get b) -> Get b #

(>>) :: Get a -> Get b -> Get b #

return :: a -> Get a #

fail :: String -> Get a #

Monad Tree 
Instance details

Defined in Data.Tree

Methods

(>>=) :: Tree a -> (a -> Tree b) -> Tree b #

(>>) :: Tree a -> Tree b -> Tree b #

return :: a -> Tree a #

fail :: String -> Tree a #

Monad Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

(>>=) :: Seq a -> (a -> Seq b) -> Seq b #

(>>) :: Seq a -> Seq b -> Seq b #

return :: a -> Seq a #

fail :: String -> Seq a #

Monad DList 
Instance details

Defined in Data.DList

Methods

(>>=) :: DList a -> (a -> DList b) -> DList b #

(>>) :: DList a -> DList b -> DList b #

return :: a -> DList a #

fail :: String -> DList a #

Monad Eval 
Instance details

Defined in Control.Parallel.Strategies

Methods

(>>=) :: Eval a -> (a -> Eval b) -> Eval b #

(>>) :: Eval a -> Eval b -> Eval b #

return :: a -> Eval a #

fail :: String -> Eval a #

Monad Vector 
Instance details

Defined in Data.Vector

Methods

(>>=) :: Vector a -> (a -> Vector b) -> Vector b #

(>>) :: Vector a -> Vector b -> Vector b #

return :: a -> Vector a #

fail :: String -> Vector a #

Monad SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

(>>=) :: SmallArray a -> (a -> SmallArray b) -> SmallArray b #

(>>) :: SmallArray a -> SmallArray b -> SmallArray b #

return :: a -> SmallArray a #

fail :: String -> SmallArray a #

Monad Array 
Instance details

Defined in Data.Primitive.Array

Methods

(>>=) :: Array a -> (a -> Array b) -> Array b #

(>>) :: Array a -> Array b -> Array b #

return :: a -> Array a #

fail :: String -> Array a #

Monad Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

(>>=) :: Rules a -> (a -> Rules b) -> Rules b #

(>>) :: Rules a -> Rules b -> Rules b #

return :: a -> Rules a #

fail :: String -> Rules a #

Monad Action 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

(>>=) :: Action a -> (a -> Action b) -> Action b #

(>>) :: Action a -> Action b -> Action b #

return :: a -> Action a #

fail :: String -> Action a #

Monad Id 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

(>>=) :: Id a -> (a -> Id b) -> Id b #

(>>) :: Id a -> Id b -> Id b #

return :: a -> Id a #

fail :: String -> Id a #

Monad Box 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

(>>=) :: Box a -> (a -> Box b) -> Box b #

(>>) :: Box a -> Box b -> Box b #

return :: a -> Box a #

fail :: String -> Box a #

Monad P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

(>>=) :: P a -> (a -> P b) -> P b #

(>>) :: P a -> P b -> P b #

return :: a -> P a #

fail :: String -> P a #

Monad (Either e)

Since: base-4.4.0.0

Instance details

Defined in Data.Either

Methods

(>>=) :: Either e a -> (a -> Either e b) -> Either e b #

(>>) :: Either e a -> Either e b -> Either e b #

return :: a -> Either e a #

fail :: String -> Either e a #

Monad (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: U1 a -> (a -> U1 b) -> U1 b #

(>>) :: U1 a -> U1 b -> U1 b #

return :: a -> U1 a #

fail :: String -> U1 a #

Monoid a => Monad ((,) a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

(>>=) :: (a, a0) -> (a0 -> (a, b)) -> (a, b) #

(>>) :: (a, a0) -> (a, b) -> (a, b) #

return :: a0 -> (a, a0) #

fail :: String -> (a, a0) #

Monad (ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

(>>=) :: ST s a -> (a -> ST s b) -> ST s b #

(>>) :: ST s a -> ST s b -> ST s b #

return :: a -> ST s a #

fail :: String -> ST s a #

Representable f => Monad (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

(>>=) :: Co f a -> (a -> Co f b) -> Co f b #

(>>) :: Co f a -> Co f b -> Co f b #

return :: a -> Co f a #

fail :: String -> Co f a #

Monad (Parser i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

(>>=) :: Parser i a -> (a -> Parser i b) -> Parser i b #

(>>) :: Parser i a -> Parser i b -> Parser i b #

return :: a -> Parser i a #

fail :: String -> Parser i a #

Monad (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

(>>=) :: ST s a -> (a -> ST s b) -> ST s b #

(>>) :: ST s a -> ST s b -> ST s b #

return :: a -> ST s a #

fail :: String -> ST s a #

Monad m => Monad (WrappedMonad m)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #

(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

return :: a -> WrappedMonad m a #

fail :: String -> WrappedMonad m a #

ArrowApply a => Monad (ArrowMonad a)

Since: base-2.1

Instance details

Defined in Control.Arrow

Methods

(>>=) :: ArrowMonad a a0 -> (a0 -> ArrowMonad a b) -> ArrowMonad a b #

(>>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

return :: a0 -> ArrowMonad a a0 #

fail :: String -> ArrowMonad a a0 #

Monad (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

(>>=) :: Proxy a -> (a -> Proxy b) -> Proxy b #

(>>) :: Proxy a -> Proxy b -> Proxy b #

return :: a -> Proxy a #

fail :: String -> Proxy a #

Monad m => Monad (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

(>>=) :: MaybeT m a -> (a -> MaybeT m b) -> MaybeT m b #

(>>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

return :: a -> MaybeT m a #

fail :: String -> MaybeT m a #

Monad m => Monad (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

(>>=) :: ResourceT m a -> (a -> ResourceT m b) -> ResourceT m b #

(>>) :: ResourceT m a -> ResourceT m b -> ResourceT m b #

return :: a -> ResourceT m a #

fail :: String -> ResourceT m a #

Monad (Eff r) 
Instance details

Defined in Control.Eff.Internal

Methods

(>>=) :: Eff r a -> (a -> Eff r b) -> Eff r b #

(>>) :: Eff r a -> Eff r b -> Eff r b #

return :: a -> Eff r a #

fail :: String -> Eff r a #

Alternative f => Monad (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

(>>=) :: Cofree f a -> (a -> Cofree f b) -> Cofree f b #

(>>) :: Cofree f a -> Cofree f b -> Cofree f b #

return :: a -> Cofree f a #

fail :: String -> Cofree f a #

Functor f => Monad (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

(>>=) :: Free f a -> (a -> Free f b) -> Free f b #

(>>) :: Free f a -> Free f b -> Free f b #

return :: a -> Free f a #

fail :: String -> Free f a #

Monad m => Monad (Yoneda m) 
Instance details

Defined in Data.Functor.Yoneda

Methods

(>>=) :: Yoneda m a -> (a -> Yoneda m b) -> Yoneda m b #

(>>) :: Yoneda m a -> Yoneda m b -> Yoneda m b #

return :: a -> Yoneda m a #

fail :: String -> Yoneda m a #

Monad (ReifiedGetter s) 
Instance details

Defined in Control.Lens.Reified

Methods

(>>=) :: ReifiedGetter s a -> (a -> ReifiedGetter s b) -> ReifiedGetter s b #

(>>) :: ReifiedGetter s a -> ReifiedGetter s b -> ReifiedGetter s b #

return :: a -> ReifiedGetter s a #

fail :: String -> ReifiedGetter s a #

Monad (ReifiedFold s) 
Instance details

Defined in Control.Lens.Reified

Methods

(>>=) :: ReifiedFold s a -> (a -> ReifiedFold s b) -> ReifiedFold s b #

(>>) :: ReifiedFold s a -> ReifiedFold s b -> ReifiedFold s b #

return :: a -> ReifiedFold s a #

fail :: String -> ReifiedFold s a #

Monad m => Monad (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

(>>=) :: ListT m a -> (a -> ListT m b) -> ListT m b #

(>>) :: ListT m a -> ListT m b -> ListT m b #

return :: a -> ListT m a #

fail :: String -> ListT m a #

(Monad (Rep p), Representable p) => Monad (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

(>>=) :: Prep p a -> (a -> Prep p b) -> Prep p b #

(>>) :: Prep p a -> Prep p b -> Prep p b #

return :: a -> Prep p a #

fail :: String -> Prep p a #

Monad f => Monad (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: Rec1 f a -> (a -> Rec1 f b) -> Rec1 f b #

(>>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #

return :: a -> Rec1 f a #

fail :: String -> Rec1 f a #

Monad f => Monad (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b #

(>>) :: Ap f a -> Ap f b -> Ap f b #

return :: a -> Ap f a #

fail :: String -> Ap f a #

Monad f => Monad (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b #

(>>) :: Alt f a -> Alt f b -> Alt f b #

return :: a -> Alt f a #

fail :: String -> Alt f a #

Monad m => Monad (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

(>>=) :: IdentityT m a -> (a -> IdentityT m b) -> IdentityT m b #

(>>) :: IdentityT m a -> IdentityT m b -> IdentityT m b #

return :: a -> IdentityT m a #

fail :: String -> IdentityT m a #

(Monoid w, Monad m) => Monad (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

return :: a -> WriterT w m a #

fail :: String -> WriterT w m a #

(Monoid w, Monad m) => Monad (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

(>>=) :: WriterT w m a -> (a -> WriterT w m b) -> WriterT w m b #

(>>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

return :: a -> WriterT w m a #

fail :: String -> WriterT w m a #

Monad m => Monad (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

(>>) :: StateT s m a -> StateT s m b -> StateT s m b #

return :: a -> StateT s m a #

fail :: String -> StateT s m a #

Monad m => Monad (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

(>>=) :: StateT s m a -> (a -> StateT s m b) -> StateT s m b #

(>>) :: StateT s m a -> StateT s m b -> StateT s m b #

return :: a -> StateT s m a #

fail :: String -> StateT s m a #

Monad m => Monad (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

(>>=) :: ExceptT e m a -> (a -> ExceptT e m b) -> ExceptT e m b #

(>>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

return :: a -> ExceptT e m a #

fail :: String -> ExceptT e m a #

(Applicative f, Monad f) => Monad (WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)).

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

(>>=) :: WhenMissing f x a -> (a -> WhenMissing f x b) -> WhenMissing f x b #

(>>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #

return :: a -> WhenMissing f x a #

fail :: String -> WhenMissing f x a #

(Functor f, Monad m) => Monad (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

(>>=) :: FreeT f m a -> (a -> FreeT f m b) -> FreeT f m b #

(>>) :: FreeT f m a -> FreeT f m b -> FreeT f m b #

return :: a -> FreeT f m a #

fail :: String -> FreeT f m a #

(Alternative f, Monad w) => Monad (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

(>>=) :: CofreeT f w a -> (a -> CofreeT f w b) -> CofreeT f w b #

(>>) :: CofreeT f w a -> CofreeT f w b -> CofreeT f w b #

return :: a -> CofreeT f w a #

fail :: String -> CofreeT f w a #

(Monad m, Error e) => Monad (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

(>>=) :: ErrorT e m a -> (a -> ErrorT e m b) -> ErrorT e m b #

(>>) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m b #

return :: a -> ErrorT e m a #

fail :: String -> ErrorT e m a #

Monad (Indexed i a) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

(>>=) :: Indexed i a a0 -> (a0 -> Indexed i a b) -> Indexed i a b #

(>>) :: Indexed i a a0 -> Indexed i a b -> Indexed i a b #

return :: a0 -> Indexed i a a0 #

fail :: String -> Indexed i a a0 #

Monad (RAW ro rw) 
Instance details

Defined in Development.Shake.Internal.Core.Monad

Methods

(>>=) :: RAW ro rw a -> (a -> RAW ro rw b) -> RAW ro rw b #

(>>) :: RAW ro rw a -> RAW ro rw b -> RAW ro rw b #

return :: a -> RAW ro rw a #

fail :: String -> RAW ro rw a #

Monad (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

(>>=) :: Tagged s a -> (a -> Tagged s b) -> Tagged s b #

(>>) :: Tagged s a -> Tagged s b -> Tagged s b #

return :: a -> Tagged s a #

fail :: String -> Tagged s a #

(Monoid w, Functor m, Monad m) => Monad (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

(>>=) :: AccumT w m a -> (a -> AccumT w m b) -> AccumT w m b #

(>>) :: AccumT w m a -> AccumT w m b -> AccumT w m b #

return :: a -> AccumT w m a #

fail :: String -> AccumT w m a #

Monad m => Monad (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

(>>=) :: SelectT r m a -> (a -> SelectT r m b) -> SelectT r m b #

(>>) :: SelectT r m a -> SelectT r m b -> SelectT r m b #

return :: a -> SelectT r m a #

fail :: String -> SelectT r m a #

Monad ((->) r :: Type -> Type)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: (r -> a) -> (a -> r -> b) -> r -> b #

(>>) :: (r -> a) -> (r -> b) -> r -> b #

return :: a -> r -> a #

fail :: String -> r -> a #

(Monad f, Monad g) => Monad (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: (f :*: g) a -> (a -> (f :*: g) b) -> (f :*: g) b #

(>>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b #

return :: a -> (f :*: g) a #

fail :: String -> (f :*: g) a #

(Monad f, Monad g) => Monad (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

(>>=) :: Product f g a -> (a -> Product f g b) -> Product f g b #

(>>) :: Product f g a -> Product f g b -> Product f g b #

return :: a -> Product f g a #

fail :: String -> Product f g a #

Monad m => Monad (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

(>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b #

(>>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

return :: a -> ReaderT r m a #

fail :: String -> ReaderT r m a #

Monad (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

(>>=) :: ConduitT i o m a -> (a -> ConduitT i o m b) -> ConduitT i o m b #

(>>) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m b #

return :: a -> ConduitT i o m a #

fail :: String -> ConduitT i o m a #

(Monad f, Applicative f) => Monad (WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

(>>=) :: WhenMatched f x y a -> (a -> WhenMatched f x y b) -> WhenMatched f x y b #

(>>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b #

return :: a -> WhenMatched f x y a #

fail :: String -> WhenMatched f x y a #

(Applicative f, Monad f) => Monad (WhenMissing f k x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

(>>=) :: WhenMissing f k x a -> (a -> WhenMissing f k x b) -> WhenMissing f k x b #

(>>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b #

return :: a -> WhenMissing f k x a #

fail :: String -> WhenMissing f k x a #

Monad (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

(>>=) :: ContT r m a -> (a -> ContT r m b) -> ContT r m b #

(>>) :: ContT r m a -> ContT r m b -> ContT r m b #

return :: a -> ContT r m a #

fail :: String -> ContT r m a #

Monad (ParsecT s u m) 
Instance details

Defined in Text.Parsec.Prim

Methods

(>>=) :: ParsecT s u m a -> (a -> ParsecT s u m b) -> ParsecT s u m b #

(>>) :: ParsecT s u m a -> ParsecT s u m b -> ParsecT s u m b #

return :: a -> ParsecT s u m a #

fail :: String -> ParsecT s u m a #

Monad f => Monad (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

(>>=) :: M1 i c f a -> (a -> M1 i c f b) -> M1 i c f b #

(>>) :: M1 i c f a -> M1 i c f b -> M1 i c f b #

return :: a -> M1 i c f a #

fail :: String -> M1 i c f a #

(Monoid w, Monad m) => Monad (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #

(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

return :: a -> RWST r w s m a #

fail :: String -> RWST r w s m a #

(Monoid w, Monad m) => Monad (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

(>>=) :: RWST r w s m a -> (a -> RWST r w s m b) -> RWST r w s m b #

(>>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

return :: a -> RWST r w s m a #

fail :: String -> RWST r w s m a #

(Monad f, Applicative f) => Monad (WhenMatched f k x y)

Equivalent to ReaderT k (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

(>>=) :: WhenMatched f k x y a -> (a -> WhenMatched f k x y b) -> WhenMatched f k x y b #

(>>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b #

return :: a -> WhenMatched f k x y a #

fail :: String -> WhenMatched f k x y a #

Monad m => Monad (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

(>>=) :: Pipe l i o u m a -> (a -> Pipe l i o u m b) -> Pipe l i o u m b #

(>>) :: Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m b #

return :: a -> Pipe l i o u m a #

fail :: String -> Pipe l i o u m a #

class Functor (f :: Type -> Type) where #

The Functor class is used for types that can be mapped over. Instances of Functor should satisfy the following laws:

fmap id  ==  id
fmap (f . g)  ==  fmap f . fmap g

The instances of Functor for lists, Maybe and IO satisfy these laws.

Minimal complete definition

fmap

Methods

fmap :: (a -> b) -> f a -> f b #

(<$) :: a -> f b -> f a infixl 4 #

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.

Instances
Functor []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> [a] -> [b] #

(<$) :: a -> [b] -> [a] #

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b #

(<$) :: a -> Maybe b -> Maybe a #

Functor IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> IO a -> IO b #

(<$) :: a -> IO b -> IO a #

Functor Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Par1 a -> Par1 b #

(<$) :: a -> Par1 b -> Par1 a #

Functor Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

fmap :: (a -> b) -> Q a -> Q b #

(<$) :: a -> Q b -> Q a #

Functor Rose 
Instance details

Defined in Test.QuickCheck.Property

Methods

fmap :: (a -> b) -> Rose a -> Rose b #

(<$) :: a -> Rose b -> Rose a #

Functor Blind 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Blind a -> Blind b #

(<$) :: a -> Blind b -> Blind a #

Functor Fixed 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Fixed a -> Fixed b #

(<$) :: a -> Fixed b -> Fixed a #

Functor OrderedList 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> OrderedList a -> OrderedList b #

(<$) :: a -> OrderedList b -> OrderedList a #

Functor NonEmptyList 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> NonEmptyList a -> NonEmptyList b #

(<$) :: a -> NonEmptyList b -> NonEmptyList a #

Functor SortedList 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> SortedList a -> SortedList b #

(<$) :: a -> SortedList b -> SortedList a #

Functor Positive 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Positive a -> Positive b #

(<$) :: a -> Positive b -> Positive a #

Functor Negative 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Negative a -> Negative b #

(<$) :: a -> Negative b -> Negative a #

Functor NonZero 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> NonZero a -> NonZero b #

(<$) :: a -> NonZero b -> NonZero a #

Functor NonNegative 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> NonNegative a -> NonNegative b #

(<$) :: a -> NonNegative b -> NonNegative a #

Functor NonPositive 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> NonPositive a -> NonPositive b #

(<$) :: a -> NonPositive b -> NonPositive a #

Functor Large 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Large a -> Large b #

(<$) :: a -> Large b -> Large a #

Functor Small 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Small a -> Small b #

(<$) :: a -> Small b -> Small a #

Functor Shrink2 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Shrink2 a -> Shrink2 b #

(<$) :: a -> Shrink2 b -> Shrink2 a #

Functor Smart 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Smart a -> Smart b #

(<$) :: a -> Smart b -> Smart a #

Functor Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

fmap :: (a -> b) -> Gen a -> Gen b #

(<$) :: a -> Gen b -> Gen a #

Functor FromJSONKeyFunction

Only law abiding up to interpretation

Instance details

Defined in Data.Aeson.Types.FromJSON

Functor IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fmap :: (a -> b) -> IResult a -> IResult b #

(<$) :: a -> IResult b -> IResult a #

Functor Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fmap :: (a -> b) -> Result a -> Result b #

(<$) :: a -> Result b -> Result a #

Functor Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

fmap :: (a -> b) -> Parser a -> Parser b #

(<$) :: a -> Parser b -> Parser a #

Functor Async 
Instance details

Defined in Control.Concurrent.Async

Methods

fmap :: (a -> b) -> Async a -> Async b #

(<$) :: a -> Async b -> Async a #

Functor Concurrently 
Instance details

Defined in Control.Concurrent.Async

Methods

fmap :: (a -> b) -> Concurrently a -> Concurrently b #

(<$) :: a -> Concurrently b -> Concurrently a #

Functor Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

fmap :: (a -> b) -> Complex a -> Complex b #

(<$) :: a -> Complex b -> Complex a #

Functor Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Min a -> Min b #

(<$) :: a -> Min b -> Min a #

Functor Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Max a -> Max b #

(<$) :: a -> Max b -> Max a #

Functor First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> First a -> First b #

(<$) :: a -> First b -> First a #

Functor Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Last a -> Last b #

(<$) :: a -> Last b -> Last a #

Functor Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a -> b) -> Option a -> Option b #

(<$) :: a -> Option b -> Option a #

Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> ZipList a -> ZipList b #

(<$) :: a -> ZipList b -> ZipList a #

Functor Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

fmap :: (a -> b) -> Identity a -> Identity b #

(<$) :: a -> Identity b -> Identity a #

Functor Handler

Since: base-4.6.0.0

Instance details

Defined in Control.Exception

Methods

fmap :: (a -> b) -> Handler a -> Handler b #

(<$) :: a -> Handler b -> Handler a #

Functor STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

fmap :: (a -> b) -> STM a -> STM b #

(<$) :: a -> STM b -> STM a #

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> First a -> First b #

(<$) :: a -> First b -> First a #

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Last a -> Last b #

(<$) :: a -> Last b -> Last a #

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Dual a -> Dual b #

(<$) :: a -> Dual b -> Dual a #

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Sum a -> Sum b #

(<$) :: a -> Sum b -> Sum a #

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Product a -> Product b #

(<$) :: a -> Product b -> Product a #

Functor Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

fmap :: (a -> b) -> Down a -> Down b #

(<$) :: a -> Down b -> Down a #

Functor ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

fmap :: (a -> b) -> ReadPrec a -> ReadPrec b #

(<$) :: a -> ReadPrec b -> ReadPrec a #

Functor ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fmap :: (a -> b) -> ReadP a -> ReadP b #

(<$) :: a -> ReadP b -> ReadP a #

Functor NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> NonEmpty a -> NonEmpty b #

(<$) :: a -> NonEmpty b -> NonEmpty a #

Functor PutM 
Instance details

Defined in Data.Binary.Put

Methods

fmap :: (a -> b) -> PutM a -> PutM b #

(<$) :: a -> PutM b -> PutM a #

Functor Decoder 
Instance details

Defined in Data.Binary.Get.Internal

Methods

fmap :: (a -> b) -> Decoder a -> Decoder b #

(<$) :: a -> Decoder b -> Decoder a #

Functor Get 
Instance details

Defined in Data.Binary.Get.Internal

Methods

fmap :: (a -> b) -> Get a -> Get b #

(<$) :: a -> Get b -> Get a #

Functor Flush 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> Flush a -> Flush b #

(<$) :: a -> Flush b -> Flush a #

Functor IntMap 
Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> IntMap a -> IntMap b #

(<$) :: a -> IntMap b -> IntMap a #

Functor Tree 
Instance details

Defined in Data.Tree

Methods

fmap :: (a -> b) -> Tree a -> Tree b #

(<$) :: a -> Tree b -> Tree a #

Functor Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Seq a -> Seq b #

(<$) :: a -> Seq b -> Seq a #

Functor FingerTree 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> FingerTree a -> FingerTree b #

(<$) :: a -> FingerTree b -> FingerTree a #

Functor Digit 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Digit a -> Digit b #

(<$) :: a -> Digit b -> Digit a #

Functor Node 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Node a -> Node b #

(<$) :: a -> Node b -> Node a #

Functor Elem 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> Elem a -> Elem b #

(<$) :: a -> Elem b -> Elem a #

Functor ViewL 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> ViewL a -> ViewL b #

(<$) :: a -> ViewL b -> ViewL a #

Functor ViewR 
Instance details

Defined in Data.Sequence.Internal

Methods

fmap :: (a -> b) -> ViewR a -> ViewR b #

(<$) :: a -> ViewR b -> ViewR a #

Functor DList 
Instance details

Defined in Data.DList

Methods

fmap :: (a -> b) -> DList a -> DList b #

(<$) :: a -> DList b -> DList a #

Functor Eval 
Instance details

Defined in Control.Parallel.Strategies

Methods

fmap :: (a -> b) -> Eval a -> Eval b #

(<$) :: a -> Eval b -> Eval a #

Functor Vector 
Instance details

Defined in Data.Vector

Methods

fmap :: (a -> b) -> Vector a -> Vector b #

(<$) :: a -> Vector b -> Vector a #

Functor Consumed 
Instance details

Defined in Text.Parsec.Prim

Methods

fmap :: (a -> b) -> Consumed a -> Consumed b #

(<$) :: a -> Consumed b -> Consumed a #

Functor Doc 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> Doc a -> Doc b #

(<$) :: a -> Doc b -> Doc a #

Functor AnnotDetails 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> AnnotDetails a -> AnnotDetails b #

(<$) :: a -> AnnotDetails b -> AnnotDetails a #

Functor Span 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

fmap :: (a -> b) -> Span a -> Span b #

(<$) :: a -> Span b -> Span a #

Functor SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

fmap :: (a -> b) -> SmallArray a -> SmallArray b #

(<$) :: a -> SmallArray b -> SmallArray a #

Functor Array 
Instance details

Defined in Data.Primitive.Array

Methods

fmap :: (a -> b) -> Array a -> Array b #

(<$) :: a -> Array b -> Array a #

Functor Result 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

fmap :: (a -> b) -> Result a -> Result b #

(<$) :: a -> Result b -> Result a #

Functor UserRule 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

fmap :: (a -> b) -> UserRule a -> UserRule b #

(<$) :: a -> UserRule b -> UserRule a #

Functor Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

fmap :: (a -> b) -> Rules a -> Rules b #

(<$) :: a -> Rules b -> Rules a #

Functor Action 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

fmap :: (a -> b) -> Action a -> Action b #

(<$) :: a -> Action b -> Action a #

Functor RunResult 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

fmap :: (a -> b) -> RunResult a -> RunResult b #

(<$) :: a -> RunResult b -> RunResult a #

Functor Id 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

fmap :: (a -> b) -> Id a -> Id b #

(<$) :: a -> Id b -> Id a #

Functor Box 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

fmap :: (a -> b) -> Box a -> Box b #

(<$) :: a -> Box b -> Box a #

Functor P

Since: base-4.8.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

fmap :: (a -> b) -> P a -> P b #

(<$) :: a -> P b -> P a #

Functor (Either a)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

fmap :: (a0 -> b) -> Either a a0 -> Either a b #

(<$) :: a0 -> Either a b -> Either a a0 #

Functor (V1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> V1 a -> V1 b #

(<$) :: a -> V1 b -> V1 a #

Functor (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> U1 a -> U1 b #

(<$) :: a -> U1 b -> U1 a #

Functor ((,) a)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a0 -> b) -> (a, a0) -> (a, b) #

(<$) :: a0 -> (a, b) -> (a, a0) #

Functor (ST s)

Since: base-2.1

Instance details

Defined in GHC.ST

Methods

fmap :: (a -> b) -> ST s a -> ST s b #

(<$) :: a -> ST s b -> ST s a #

Functor ((:->) a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

fmap :: (a0 -> b) -> (a :-> a0) -> a :-> b #

(<$) :: a0 -> (a :-> b) -> a :-> a0 #

Functor (Fun a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

fmap :: (a0 -> b) -> Fun a a0 -> Fun a b #

(<$) :: a0 -> Fun a b -> Fun a a0 #

Functor (Shrinking s) 
Instance details

Defined in Test.QuickCheck.Modifiers

Methods

fmap :: (a -> b) -> Shrinking s a -> Shrinking s b #

(<$) :: a -> Shrinking s b -> Shrinking s a #

Functor f => Functor (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

fmap :: (a -> b) -> Co f a -> Co f b #

(<$) :: a -> Co f b -> Co f a #

Functor (HashMap k) 
Instance details

Defined in Data.HashMap.Base

Methods

fmap :: (a -> b) -> HashMap k a -> HashMap k b #

(<$) :: a -> HashMap k b -> HashMap k a #

Functor (Map k) 
Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> Map k a -> Map k b #

(<$) :: a -> Map k b -> Map k a #

Functor (Array i)

Since: base-2.1

Instance details

Defined in GHC.Arr

Methods

fmap :: (a -> b) -> Array i a -> Array i b #

(<$) :: a -> Array i b -> Array i a #

Functor (IResult i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

fmap :: (a -> b) -> IResult i a -> IResult i b #

(<$) :: a -> IResult i b -> IResult i a #

Functor (Parser i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

fmap :: (a -> b) -> Parser i a -> Parser i b #

(<$) :: a -> Parser i b -> Parser i a #

Functor (Arg a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

fmap :: (a0 -> b) -> Arg a a0 -> Arg a b #

(<$) :: a0 -> Arg a b -> Arg a a0 #

Functor (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

fmap :: (a -> b) -> ST s a -> ST s b #

(<$) :: a -> ST s b -> ST s a #

Monad m => Functor (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

(<$) :: a -> WrappedMonad m b -> WrappedMonad m a #

Arrow a => Functor (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

fmap :: (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

(<$) :: a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Functor (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

fmap :: (a -> b) -> Proxy a -> Proxy b #

(<$) :: a -> Proxy b -> Proxy a #

Functor m => Functor (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

fmap :: (a -> b) -> MaybeT m a -> MaybeT m b #

(<$) :: a -> MaybeT m b -> MaybeT m a #

Monad m => Functor (ZipSource m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ZipSource m a -> ZipSource m b #

(<$) :: a -> ZipSource m b -> ZipSource m a #

Functor m => Functor (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

fmap :: (a -> b) -> ResourceT m a -> ResourceT m b #

(<$) :: a -> ResourceT m b -> ResourceT m a #

Monad m => Functor (Handler m) 
Instance details

Defined in Control.Monad.Catch

Methods

fmap :: (a -> b) -> Handler m a -> Handler m b #

(<$) :: a -> Handler m b -> Handler m a #

Functor (Eff r) 
Instance details

Defined in Control.Eff.Internal

Methods

fmap :: (a -> b) -> Eff r a -> Eff r b #

(<$) :: a -> Eff r b -> Eff r a #

Functor f => Functor (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

fmap :: (a -> b) -> Cofree f a -> Cofree f b #

(<$) :: a -> Cofree f b -> Cofree f a #

Functor f => Functor (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

fmap :: (a -> b) -> Free f a -> Free f b #

(<$) :: a -> Free f b -> Free f a #

Functor (Yoneda f) 
Instance details

Defined in Data.Functor.Yoneda

Methods

fmap :: (a -> b) -> Yoneda f a -> Yoneda f b #

(<$) :: a -> Yoneda f b -> Yoneda f a #

Functor (ReifiedGetter s) 
Instance details

Defined in Control.Lens.Reified

Methods

fmap :: (a -> b) -> ReifiedGetter s a -> ReifiedGetter s b #

(<$) :: a -> ReifiedGetter s b -> ReifiedGetter s a #

Functor (ReifiedFold s) 
Instance details

Defined in Control.Lens.Reified

Methods

fmap :: (a -> b) -> ReifiedFold s a -> ReifiedFold s b #

(<$) :: a -> ReifiedFold s b -> ReifiedFold s a #

Functor (Level i) 
Instance details

Defined in Control.Lens.Internal.Level

Methods

fmap :: (a -> b) -> Level i a -> Level i b #

(<$) :: a -> Level i b -> Level i a #

Functor f => Functor (Indexing f) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

fmap :: (a -> b) -> Indexing f a -> Indexing f b #

(<$) :: a -> Indexing f b -> Indexing f a #

Functor f => Functor (Indexing64 f) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

fmap :: (a -> b) -> Indexing64 f a -> Indexing64 f b #

(<$) :: a -> Indexing64 f b -> Indexing64 f a #

Functor m => Functor (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

fmap :: (a -> b) -> ListT m a -> ListT m b #

(<$) :: a -> ListT m b -> ListT m a #

Profunctor p => Functor (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

fmap :: (a -> b) -> Prep p a -> Prep p b #

(<$) :: a -> Prep p b -> Prep p a #

Profunctor p => Functor (Coprep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

fmap :: (a -> b) -> Coprep p a -> Coprep p b #

(<$) :: a -> Coprep p b -> Coprep p a #

Functor (AST c) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Methods

fmap :: (a -> b) -> AST c a -> AST c b #

(<$) :: a -> AST c b -> AST c a #

Functor f => Functor (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> Rec1 f a -> Rec1 f b #

(<$) :: a -> Rec1 f b -> Rec1 f a #

Functor (URec Char :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Char a -> URec Char b #

(<$) :: a -> URec Char b -> URec Char a #

Functor (URec Double :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Double a -> URec Double b #

(<$) :: a -> URec Double b -> URec Double a #

Functor (URec Float :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Float a -> URec Float b #

(<$) :: a -> URec Float b -> URec Float a #

Functor (URec Int :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Int a -> URec Int b #

(<$) :: a -> URec Int b -> URec Int a #

Functor (URec Word :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec Word a -> URec Word b #

(<$) :: a -> URec Word b -> URec Word a #

Functor (URec (Ptr ()) :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> URec (Ptr ()) a -> URec (Ptr ()) b #

(<$) :: a -> URec (Ptr ()) b -> URec (Ptr ()) a #

Arrow a => Functor (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

(<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Functor (Const m :: Type -> Type)

Since: base-2.1

Instance details

Defined in Data.Functor.Const

Methods

fmap :: (a -> b) -> Const m a -> Const m b #

(<$) :: a -> Const m b -> Const m a #

Functor f => Functor (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Ap f a -> Ap f b #

(<$) :: a -> Ap f b -> Ap f a #

Functor f => Functor (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Alt f a -> Alt f b #

(<$) :: a -> Alt f b -> Alt f a #

Bifunctor p => Functor (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

fmap :: (a -> b) -> Join p a -> Join p b #

(<$) :: a -> Join p b -> Join p a #

Bifunctor p => Functor (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

fmap :: (a -> b) -> Fix p a -> Fix p b #

(<$) :: a -> Fix p b -> Fix p a #

Functor m => Functor (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

fmap :: (a -> b) -> IdentityT m a -> IdentityT m b #

(<$) :: a -> IdentityT m b -> IdentityT m a #

Functor m => Functor (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

fmap :: (a -> b) -> WriterT w m a -> WriterT w m b #

(<$) :: a -> WriterT w m b -> WriterT w m a #

Functor m => Functor (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

fmap :: (a -> b) -> WriterT w m a -> WriterT w m b #

(<$) :: a -> WriterT w m b -> WriterT w m a #

Functor m => Functor (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

fmap :: (a -> b) -> StateT s m a -> StateT s m b #

(<$) :: a -> StateT s m b -> StateT s m a #

Functor m => Functor (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

fmap :: (a -> b) -> StateT s m a -> StateT s m b #

(<$) :: a -> StateT s m b -> StateT s m a #

Functor m => Functor (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

fmap :: (a -> b) -> ExceptT e m a -> ExceptT e m b #

(<$) :: a -> ExceptT e m b -> ExceptT e m a #

Monad m => Functor (ZipSink i m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ZipSink i m a -> ZipSink i m b #

(<$) :: a -> ZipSink i m b -> ZipSink i m a #

(Applicative f, Monad f) => Functor (WhenMissing f x)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> WhenMissing f x a -> WhenMissing f x b #

(<$) :: a -> WhenMissing f x b -> WhenMissing f x a #

Functor f => Functor (FreeF f a) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fmap :: (a0 -> b) -> FreeF f a a0 -> FreeF f a b #

(<$) :: a0 -> FreeF f a b -> FreeF f a a0 #

(Functor f, Monad m) => Functor (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

fmap :: (a -> b) -> FreeT f m a -> FreeT f m b #

(<$) :: a -> FreeT f m b -> FreeT f m a #

Functor f => Functor (CofreeF f a) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

fmap :: (a0 -> b) -> CofreeF f a a0 -> CofreeF f a b #

(<$) :: a0 -> CofreeF f a b -> CofreeF f a a0 #

(Functor f, Functor w) => Functor (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

fmap :: (a -> b) -> CofreeT f w a -> CofreeT f w b #

(<$) :: a -> CofreeT f w b -> CofreeT f w a #

Functor (Day f g) 
Instance details

Defined in Data.Functor.Day

Methods

fmap :: (a -> b) -> Day f g a -> Day f g b #

(<$) :: a -> Day f g b -> Day f g a #

Functor m => Functor (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

fmap :: (a -> b) -> ErrorT e m a -> ErrorT e m b #

(<$) :: a -> ErrorT e m b -> ErrorT e m a #

Functor (ReifiedIndexedGetter i s) 
Instance details

Defined in Control.Lens.Reified

Methods

fmap :: (a -> b) -> ReifiedIndexedGetter i s a -> ReifiedIndexedGetter i s b #

(<$) :: a -> ReifiedIndexedGetter i s b -> ReifiedIndexedGetter i s a #

Functor (ReifiedIndexedFold i s) 
Instance details

Defined in Control.Lens.Reified

Methods

fmap :: (a -> b) -> ReifiedIndexedFold i s a -> ReifiedIndexedFold i s b #

(<$) :: a -> ReifiedIndexedFold i s b -> ReifiedIndexedFold i s a #

Functor (Mafic a b) 
Instance details

Defined in Control.Lens.Internal.Magma

Methods

fmap :: (a0 -> b0) -> Mafic a b a0 -> Mafic a b b0 #

(<$) :: a0 -> Mafic a b b0 -> Mafic a b a0 #

Functor (Flows i b) 
Instance details

Defined in Control.Lens.Internal.Level

Methods

fmap :: (a -> b0) -> Flows i b a -> Flows i b b0 #

(<$) :: a -> Flows i b b0 -> Flows i b a #

Functor (Context a b) 
Instance details

Defined in Control.Lens.Internal.Context

Methods

fmap :: (a0 -> b0) -> Context a b a0 -> Context a b b0 #

(<$) :: a0 -> Context a b b0 -> Context a b a0 #

Functor (Indexed i a) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

fmap :: (a0 -> b) -> Indexed i a a0 -> Indexed i a b #

(<$) :: a0 -> Indexed i a b -> Indexed i a a0 #

Functor (Reply s u) 
Instance details

Defined in Text.Parsec.Prim

Methods

fmap :: (a -> b) -> Reply s u a -> Reply s u b #

(<$) :: a -> Reply s u b -> Reply s u a #

Profunctor p => Functor (TambaraSum p a) 
Instance details

Defined in Data.Profunctor.Choice

Methods

fmap :: (a0 -> b) -> TambaraSum p a a0 -> TambaraSum p a b #

(<$) :: a0 -> TambaraSum p a b -> TambaraSum p a a0 #

Functor (CotambaraSum p a) 
Instance details

Defined in Data.Profunctor.Choice

Methods

fmap :: (a0 -> b) -> CotambaraSum p a a0 -> CotambaraSum p a b #

(<$) :: a0 -> CotambaraSum p a b -> CotambaraSum p a a0 #

Functor (RAW ro rw) 
Instance details

Defined in Development.Shake.Internal.Core.Monad

Methods

fmap :: (a -> b) -> RAW ro rw a -> RAW ro rw b #

(<$) :: a -> RAW ro rw b -> RAW ro rw a #

Functor (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

fmap :: (a -> b) -> Tagged s a -> Tagged s b #

(<$) :: a -> Tagged s b -> Tagged s a #

Functor m => Functor (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

fmap :: (a -> b) -> AccumT w m a -> AccumT w m b #

(<$) :: a -> AccumT w m b -> AccumT w m a #

Functor m => Functor (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

fmap :: (a -> b) -> SelectT r m a -> SelectT r m b #

(<$) :: a -> SelectT r m b -> SelectT r m a #

Monad m => Functor (Bundle m v) 
Instance details

Defined in Data.Vector.Fusion.Bundle.Monadic

Methods

fmap :: (a -> b) -> Bundle m v a -> Bundle m v b #

(<$) :: a -> Bundle m v b -> Bundle m v a #

Functor (Mag a b) 
Instance details

Defined in Data.Biapplicative

Methods

fmap :: (a0 -> b0) -> Mag a b a0 -> Mag a b b0 #

(<$) :: a0 -> Mag a b b0 -> Mag a b a0 #

Functor (Holes t m) 
Instance details

Defined in Control.Lens.Traversal

Methods

fmap :: (a -> b) -> Holes t m a -> Holes t m b #

(<$) :: a -> Holes t m b -> Holes t m a #

Functor ((->) r :: Type -> Type)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> (r -> a) -> r -> b #

(<$) :: a -> (r -> b) -> r -> a #

Functor (K1 i c :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> K1 i c a -> K1 i c b #

(<$) :: a -> K1 i c b -> K1 i c a #

(Functor f, Functor g) => Functor (f :+: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :+: g) a -> (f :+: g) b #

(<$) :: a -> (f :+: g) b -> (f :+: g) a #

(Functor f, Functor g) => Functor (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :*: g) a -> (f :*: g) b #

(<$) :: a -> (f :*: g) b -> (f :*: g) a #

(Functor f, Functor g) => Functor (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

fmap :: (a -> b) -> Product f g a -> Product f g b #

(<$) :: a -> Product f g b -> Product f g a #

(Functor f, Functor g) => Functor (Sum f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Sum

Methods

fmap :: (a -> b) -> Sum f g a -> Sum f g b #

(<$) :: a -> Sum f g b -> Sum f g a #

Functor m => Functor (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b #

(<$) :: a -> ReaderT r m b -> ReaderT r m a #

Functor (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ConduitT i o m a -> ConduitT i o m b #

(<$) :: a -> ConduitT i o m b -> ConduitT i o m a #

Functor (ZipConduit i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

fmap :: (a -> b) -> ZipConduit i o m a -> ZipConduit i o m b #

(<$) :: a -> ZipConduit i o m b -> ZipConduit i o m a #

Functor f => Functor (WhenMatched f x y)

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

fmap :: (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #

(<$) :: a -> WhenMatched f x y b -> WhenMatched f x y a #

(Applicative f, Monad f) => Functor (WhenMissing f k x)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b #

(<$) :: a -> WhenMissing f k x b -> WhenMissing f k x a #

Functor (Magma i t b) 
Instance details

Defined in Control.Lens.Internal.Magma

Methods

fmap :: (a -> b0) -> Magma i t b a -> Magma i t b b0 #

(<$) :: a -> Magma i t b b0 -> Magma i t b a #

Functor (Molten i a b) 
Instance details

Defined in Control.Lens.Internal.Magma

Methods

fmap :: (a0 -> b0) -> Molten i a b a0 -> Molten i a b b0 #

(<$) :: a0 -> Molten i a b b0 -> Molten i a b a0 #

Functor (Exchange a b s) 
Instance details

Defined in Control.Lens.Internal.Iso

Methods

fmap :: (a0 -> b0) -> Exchange a b s a0 -> Exchange a b s b0 #

(<$) :: a0 -> Exchange a b s b0 -> Exchange a b s a0 #

Functor (Bazaar p a b) 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

fmap :: (a0 -> b0) -> Bazaar p a b a0 -> Bazaar p a b b0 #

(<$) :: a0 -> Bazaar p a b b0 -> Bazaar p a b a0 #

Functor (Bazaar1 p a b) 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

fmap :: (a0 -> b0) -> Bazaar1 p a b a0 -> Bazaar1 p a b b0 #

(<$) :: a0 -> Bazaar1 p a b b0 -> Bazaar1 p a b a0 #

Functor (Pretext p a b) 
Instance details

Defined in Control.Lens.Internal.Context

Methods

fmap :: (a0 -> b0) -> Pretext p a b a0 -> Pretext p a b b0 #

(<$) :: a0 -> Pretext p a b b0 -> Pretext p a b a0 #

Functor (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

fmap :: (a -> b) -> ContT r m a -> ContT r m b #

(<$) :: a -> ContT r m b -> ContT r m a #

Functor (ParsecT s u m) 
Instance details

Defined in Text.Parsec.Prim

Methods

fmap :: (a -> b) -> ParsecT s u m a -> ParsecT s u m b #

(<$) :: a -> ParsecT s u m b -> ParsecT s u m a #

Profunctor p => Functor (Procompose p q a) 
Instance details

Defined in Data.Profunctor.Composition

Methods

fmap :: (a0 -> b) -> Procompose p q a a0 -> Procompose p q a b #

(<$) :: a0 -> Procompose p q a b -> Procompose p q a a0 #

Profunctor p => Functor (Rift p q a) 
Instance details

Defined in Data.Profunctor.Composition

Methods

fmap :: (a0 -> b) -> Rift p q a a0 -> Rift p q a b #

(<$) :: a0 -> Rift p q a b -> Rift p q a a0 #

Functor f => Functor (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> M1 i c f a -> M1 i c f b #

(<$) :: a -> M1 i c f b -> M1 i c f a #

(Functor f, Functor g) => Functor (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

fmap :: (a -> b) -> (f :.: g) a -> (f :.: g) b #

(<$) :: a -> (f :.: g) b -> (f :.: g) a #

(Functor f, Functor g) => Functor (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

fmap :: (a -> b) -> Compose f g a -> Compose f g b #

(<$) :: a -> Compose f g b -> Compose f g a #

Bifunctor p => Functor (WrappedBifunctor p a) 
Instance details

Defined in Data.Bifunctor.Wrapped

Methods

fmap :: (a0 -> b) -> WrappedBifunctor p a a0 -> WrappedBifunctor p a b #

(<$) :: a0 -> WrappedBifunctor p a b -> WrappedBifunctor p a a0 #

Functor g => Functor (Joker g a) 
Instance details

Defined in Data.Bifunctor.Joker

Methods

fmap :: (a0 -> b) -> Joker g a a0 -> Joker g a b #

(<$) :: a0 -> Joker g a b -> Joker g a a0 #

Bifunctor p => Functor (Flip p a) 
Instance details

Defined in Data.Bifunctor.Flip

Methods

fmap :: (a0 -> b) -> Flip p a a0 -> Flip p a b #

(<$) :: a0 -> Flip p a b -> Flip p a a0 #

Functor (Clown f a :: Type -> Type) 
Instance details

Defined in Data.Bifunctor.Clown

Methods

fmap :: (a0 -> b) -> Clown f a a0 -> Clown f a b #

(<$) :: a0 -> Clown f a b -> Clown f a a0 #

Functor m => Functor (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

fmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #

(<$) :: a -> RWST r w s m b -> RWST r w s m a #

Functor m => Functor (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

fmap :: (a -> b) -> RWST r w s m a -> RWST r w s m b #

(<$) :: a -> RWST r w s m b -> RWST r w s m a #

Functor f => Functor (WhenMatched f k x y)

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

fmap :: (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b #

(<$) :: a -> WhenMatched f k x y b -> WhenMatched f k x y a #

Functor (TakingWhile p f a b) 
Instance details

Defined in Control.Lens.Internal.Magma

Methods

fmap :: (a0 -> b0) -> TakingWhile p f a b a0 -> TakingWhile p f a b b0 #

(<$) :: a0 -> TakingWhile p f a b b0 -> TakingWhile p f a b a0 #

Functor (BazaarT p g a b) 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

fmap :: (a0 -> b0) -> BazaarT p g a b a0 -> BazaarT p g a b b0 #

(<$) :: a0 -> BazaarT p g a b b0 -> BazaarT p g a b a0 #

Functor (BazaarT1 p g a b) 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

fmap :: (a0 -> b0) -> BazaarT1 p g a b a0 -> BazaarT1 p g a b b0 #

(<$) :: a0 -> BazaarT1 p g a b b0 -> BazaarT1 p g a b a0 #

Functor (PretextT p g a b) 
Instance details

Defined in Control.Lens.Internal.Context

Methods

fmap :: (a0 -> b0) -> PretextT p g a b a0 -> PretextT p g a b b0 #

(<$) :: a0 -> PretextT p g a b b0 -> PretextT p g a b a0 #

Reifies s (ReifiedApplicative f) => Functor (ReflectedApplicative f s) 
Instance details

Defined in Data.Reflection

Methods

fmap :: (a -> b) -> ReflectedApplicative f s a -> ReflectedApplicative f s b #

(<$) :: a -> ReflectedApplicative f s b -> ReflectedApplicative f s a #

Monad m => Functor (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

fmap :: (a -> b) -> Pipe l i o u m a -> Pipe l i o u m b #

(<$) :: a -> Pipe l i o u m b -> Pipe l i o u m a #

(Functor f, Bifunctor p) => Functor (Tannen f p a) 
Instance details

Defined in Data.Bifunctor.Tannen

Methods

fmap :: (a0 -> b) -> Tannen f p a a0 -> Tannen f p a b #

(<$) :: a0 -> Tannen f p a b -> Tannen f p a a0 #

(Bifunctor p, Functor g) => Functor (Biff p f g a) 
Instance details

Defined in Data.Bifunctor.Biff

Methods

fmap :: (a0 -> b) -> Biff p f g a a0 -> Biff p f g a b #

(<$) :: a0 -> Biff p f g a b -> Biff p f g a a0 #

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

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:

As a consequence of these laws, the Functor instance for f will satisfy

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

(which implies that pure and <*> satisfy the applicative functor laws).

Minimal complete definition

pure, ((<*>) | liftA2)

Methods

pure :: a -> f a #

Lift a value.

(<*>) :: f (a -> b) -> f a -> f b infixl 4 #

Sequential application.

A few functors support an implementation of <*> that is more efficient than the default one.

liftA2 :: (a -> b -> c) -> f a -> f b -> f c #

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 <*>.

(*>) :: f a -> f b -> f b infixl 4 #

Sequence actions, discarding the value of the first argument.

(<*) :: f a -> f b -> f a infixl 4 #

Sequence actions, discarding the value of the second argument.

Instances
Applicative []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a -> [a] #

(<*>) :: [a -> b] -> [a] -> [b] #

liftA2 :: (a -> b -> c) -> [a] -> [b] -> [c] #

(*>) :: [a] -> [b] -> [b] #

(<*) :: [a] -> [b] -> [a] #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: 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 #

Applicative IO

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: 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 #

Applicative Par1

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Par1 a #

(<*>) :: Par1 (a -> b) -> Par1 a -> Par1 b #

liftA2 :: (a -> b -> c) -> Par1 a -> Par1 b -> Par1 c #

(*>) :: Par1 a -> Par1 b -> Par1 b #

(<*) :: Par1 a -> Par1 b -> Par1 a #

Applicative Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

pure :: a -> Q a #

(<*>) :: Q (a -> b) -> Q a -> Q b #

liftA2 :: (a -> b -> c) -> Q a -> Q b -> Q c #

(*>) :: Q a -> Q b -> Q b #

(<*) :: Q a -> Q b -> Q a #

Applicative Rose 
Instance details

Defined in Test.QuickCheck.Property

Methods

pure :: a -> Rose a #

(<*>) :: Rose (a -> b) -> Rose a -> Rose b #

liftA2 :: (a -> b -> c) -> Rose a -> Rose b -> Rose c #

(*>) :: Rose a -> Rose b -> Rose b #

(<*) :: Rose a -> Rose b -> Rose a #

Applicative Gen 
Instance details

Defined in Test.QuickCheck.Gen

Methods

pure :: a -> Gen a #

(<*>) :: Gen (a -> b) -> Gen a -> Gen b #

liftA2 :: (a -> b -> c) -> Gen a -> Gen b -> Gen c #

(*>) :: Gen a -> Gen b -> Gen b #

(<*) :: Gen a -> Gen b -> Gen a #

Applicative IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

pure :: a -> IResult a #

(<*>) :: IResult (a -> b) -> IResult a -> IResult b #

liftA2 :: (a -> b -> c) -> IResult a -> IResult b -> IResult c #

(*>) :: IResult a -> IResult b -> IResult b #

(<*) :: IResult a -> IResult b -> IResult a #

Applicative Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

pure :: a -> Result a #

(<*>) :: Result (a -> b) -> Result a -> Result b #

liftA2 :: (a -> b -> c) -> Result a -> Result b -> Result c #

(*>) :: Result a -> Result b -> Result b #

(<*) :: Result a -> Result b -> Result a #

Applicative Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

pure :: a -> Parser a #

(<*>) :: Parser (a -> b) -> Parser a -> Parser b #

liftA2 :: (a -> b -> c) -> Parser a -> Parser b -> Parser c #

(*>) :: Parser a -> Parser b -> Parser b #

(<*) :: Parser a -> Parser b -> Parser a #

Applicative Concurrently 
Instance details

Defined in Control.Concurrent.Async

Applicative Complex

Since: base-4.9.0.0

Instance details

Defined in Data.Complex

Methods

pure :: a -> Complex a #

(<*>) :: Complex (a -> b) -> Complex a -> Complex b #

liftA2 :: (a -> b -> c) -> Complex a -> Complex b -> Complex c #

(*>) :: Complex a -> Complex b -> Complex b #

(<*) :: Complex a -> Complex b -> Complex a #

Applicative Min

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Min a #

(<*>) :: Min (a -> b) -> Min a -> Min b #

liftA2 :: (a -> b -> c) -> Min a -> Min b -> Min c #

(*>) :: Min a -> Min b -> Min b #

(<*) :: Min a -> Min b -> Min a #

Applicative Max

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Max a #

(<*>) :: Max (a -> b) -> Max a -> Max b #

liftA2 :: (a -> b -> c) -> Max a -> Max b -> Max c #

(*>) :: Max a -> Max b -> Max b #

(<*) :: Max a -> Max b -> Max a #

Applicative First

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Applicative Last

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Applicative Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

pure :: a -> Option a #

(<*>) :: Option (a -> b) -> Option a -> Option b #

liftA2 :: (a -> b -> c) -> Option a -> Option b -> Option c #

(*>) :: Option a -> Option b -> Option b #

(<*) :: Option a -> Option b -> Option a #

Applicative ZipList
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 details

Defined in Control.Applicative

Methods

pure :: a -> ZipList a #

(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b #

liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

(*>) :: ZipList a -> ZipList b -> ZipList b #

(<*) :: ZipList a -> ZipList b -> ZipList a #

Applicative Identity

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Identity

Methods

pure :: a -> Identity a #

(<*>) :: Identity (a -> b) -> Identity a -> Identity b #

liftA2 :: (a -> b -> c) -> Identity a -> Identity b -> Identity c #

(*>) :: Identity a -> Identity b -> Identity b #

(<*) :: Identity a -> Identity b -> Identity a #

Applicative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

pure :: a -> STM a #

(<*>) :: STM (a -> b) -> STM a -> STM b #

liftA2 :: (a -> b -> c) -> STM a -> STM b -> STM c #

(*>) :: STM a -> STM b -> STM b #

(<*) :: STM a -> STM b -> STM a #

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Applicative Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Dual a #

(<*>) :: Dual (a -> b) -> Dual a -> Dual b #

liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #

(*>) :: Dual a -> Dual b -> Dual b #

(<*) :: Dual a -> Dual b -> Dual a #

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Sum a #

(<*>) :: Sum (a -> b) -> Sum a -> Sum b #

liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

(*>) :: Sum a -> Sum b -> Sum b #

(<*) :: Sum a -> Sum b -> Sum a #

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Product a #

(<*>) :: Product (a -> b) -> Product a -> Product b #

liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c #

(*>) :: Product a -> Product b -> Product b #

(<*) :: Product a -> Product b -> Product a #

Applicative Down

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

pure :: a -> Down a #

(<*>) :: Down (a -> b) -> Down a -> Down b #

liftA2 :: (a -> b -> c) -> Down a -> Down b -> Down c #

(*>) :: Down a -> Down b -> Down b #

(<*) :: Down a -> Down b -> Down a #

Applicative ReadPrec

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

pure :: a -> ReadPrec a #

(<*>) :: ReadPrec (a -> b) -> ReadPrec a -> ReadPrec b #

liftA2 :: (a -> b -> c) -> ReadPrec a -> ReadPrec b -> ReadPrec c #

(*>) :: ReadPrec a -> ReadPrec b -> ReadPrec b #

(<*) :: ReadPrec a -> ReadPrec b -> ReadPrec a #

Applicative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> ReadP a #

(<*>) :: ReadP (a -> b) -> ReadP a -> ReadP b #

liftA2 :: (a -> b -> c) -> ReadP a -> ReadP b -> ReadP c #

(*>) :: ReadP a -> ReadP b -> ReadP b #

(<*) :: ReadP a -> ReadP b -> ReadP a #

Applicative NonEmpty

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

pure :: a -> NonEmpty a #

(<*>) :: NonEmpty (a -> b) -> NonEmpty a -> NonEmpty b #

liftA2 :: (a -> b -> c) -> NonEmpty a -> NonEmpty b -> NonEmpty c #

(*>) :: NonEmpty a -> NonEmpty b -> NonEmpty b #

(<*) :: NonEmpty a -> NonEmpty b -> NonEmpty a #

Applicative PutM 
Instance details

Defined in Data.Binary.Put

Methods

pure :: a -> PutM a #

(<*>) :: PutM (a -> b) -> PutM a -> PutM b #

liftA2 :: (a -> b -> c) -> PutM a -> PutM b -> PutM c #

(*>) :: PutM a -> PutM b -> PutM b #

(<*) :: PutM a -> PutM b -> PutM a #

Applicative Get 
Instance details

Defined in Data.Binary.Get.Internal

Methods

pure :: a -> Get a #

(<*>) :: Get (a -> b) -> Get a -> Get b #

liftA2 :: (a -> b -> c) -> Get a -> Get b -> Get c #

(*>) :: Get a -> Get b -> Get b #

(<*) :: Get a -> Get b -> Get a #

Applicative Tree 
Instance details

Defined in Data.Tree

Methods

pure :: a -> Tree a #

(<*>) :: Tree (a -> b) -> Tree a -> Tree b #

liftA2 :: (a -> b -> c) -> Tree a -> Tree b -> Tree c #

(*>) :: Tree a -> Tree b -> Tree b #

(<*) :: Tree a -> Tree b -> Tree a #

Applicative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

pure :: a -> Seq a #

(<*>) :: Seq (a -> b) -> Seq a -> Seq b #

liftA2 :: (a -> b -> c) -> Seq a -> Seq b -> Seq c #

(*>) :: Seq a -> Seq b -> Seq b #

(<*) :: Seq a -> Seq b -> Seq a #

Applicative DList 
Instance details

Defined in Data.DList

Methods

pure :: a -> DList a #

(<*>) :: DList (a -> b) -> DList a -> DList b #

liftA2 :: (a -> b -> c) -> DList a -> DList b -> DList c #

(*>) :: DList a -> DList b -> DList b #

(<*) :: DList a -> DList b -> DList a #

Applicative Eval 
Instance details

Defined in Control.Parallel.Strategies

Methods

pure :: a -> Eval a #

(<*>) :: Eval (a -> b) -> Eval a -> Eval b #

liftA2 :: (a -> b -> c) -> Eval a -> Eval b -> Eval c #

(*>) :: Eval a -> Eval b -> Eval b #

(<*) :: Eval a -> Eval b -> Eval a #

Applicative Vector 
Instance details

Defined in Data.Vector

Methods

pure :: a -> Vector a #

(<*>) :: Vector (a -> b) -> Vector a -> Vector b #

liftA2 :: (a -> b -> c) -> Vector a -> Vector b -> Vector c #

(*>) :: Vector a -> Vector b -> Vector b #

(<*) :: Vector a -> Vector b -> Vector a #

Applicative SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Methods

pure :: a -> SmallArray a #

(<*>) :: SmallArray (a -> b) -> SmallArray a -> SmallArray b #

liftA2 :: (a -> b -> c) -> SmallArray a -> SmallArray b -> SmallArray c #

(*>) :: SmallArray a -> SmallArray b -> SmallArray b #

(<*) :: SmallArray a -> SmallArray b -> SmallArray a #

Applicative Array 
Instance details

Defined in Data.Primitive.Array

Methods

pure :: a -> Array a #

(<*>) :: Array (a -> b) -> Array a -> Array b #

liftA2 :: (a -> b -> c) -> Array a -> Array b -> Array c #

(*>) :: Array a -> Array b -> Array b #

(<*) :: Array a -> Array b -> Array a #

Applicative Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

pure :: a -> Rules a #

(<*>) :: Rules (a -> b) -> Rules a -> Rules b #

liftA2 :: (a -> b -> c) -> Rules a -> Rules b -> Rules c #

(*>) :: Rules a -> Rules b -> Rules b #

(<*) :: Rules a -> Rules b -> Rules a #

Applicative Action 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

pure :: a -> Action a #

(<*>) :: Action (a -> b) -> Action a -> Action b #

liftA2 :: (a -> b -> c) -> Action a -> Action b -> Action c #

(*>) :: Action a -> Action b -> Action b #

(<*) :: Action a -> Action b -> Action a #

Applicative Id 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

pure :: a -> Id a #

(<*>) :: Id (a -> b) -> Id a -> Id b #

liftA2 :: (a -> b -> c) -> Id a -> Id b -> Id c #

(*>) :: Id a -> Id b -> Id b #

(<*) :: Id a -> Id b -> Id a #

Applicative Box 
Instance details

Defined in Data.Vector.Fusion.Util

Methods

pure :: a -> Box a #

(<*>) :: Box (a -> b) -> Box a -> Box b #

liftA2 :: (a -> b -> c) -> Box a -> Box b -> Box c #

(*>) :: Box a -> Box b -> Box b #

(<*) :: Box a -> Box b -> Box a #

Applicative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

pure :: a -> P a #

(<*>) :: P (a -> b) -> P a -> P b #

liftA2 :: (a -> b -> c) -> P a -> P b -> P c #

(*>) :: P a -> P b -> P b #

(<*) :: P a -> P b -> P a #

Applicative (Either e)

Since: base-3.0

Instance details

Defined in Data.Either

Methods

pure :: a -> Either e a #

(<*>) :: Either e (a -> b) -> Either e a -> Either e b #

liftA2 :: (a -> b -> c) -> Either e a -> Either e b -> Either e c #

(*>) :: Either e a -> Either e b -> Either e b #

(<*) :: Either e a -> Either e b -> Either e a #

Applicative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> U1 a #

(<*>) :: U1 (a -> b) -> U1 a -> U1 b #

liftA2 :: (a -> b -> c) -> U1 a -> U1 b -> U1 c #

(*>) :: U1 a -> U1 b -> U1 b #

(<*) :: U1 a -> U1 b -> U1 a #

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 details

Defined in GHC.Base

Methods

pure :: a0 -> (a, a0) #

(<*>) :: (a, a0 -> b) -> (a, a0) -> (a, b) #

liftA2 :: (a0 -> b -> c) -> (a, a0) -> (a, b) -> (a, c) #

(*>) :: (a, a0) -> (a, b) -> (a, b) #

(<*) :: (a, a0) -> (a, b) -> (a, a0) #

Applicative (ST s)

Since: base-4.4.0.0

Instance details

Defined in GHC.ST

Methods

pure :: a -> ST s a #

(<*>) :: ST s (a -> b) -> ST s a -> ST s b #

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c #

(*>) :: ST s a -> ST s b -> ST s b #

(<*) :: ST s a -> ST s b -> ST s a #

Representable f => Applicative (Co f) 
Instance details

Defined in Data.Functor.Rep

Methods

pure :: a -> Co f a #

(<*>) :: Co f (a -> b) -> Co f a -> Co f b #

liftA2 :: (a -> b -> c) -> Co f a -> Co f b -> Co f c #

(*>) :: Co f a -> Co f b -> Co f b #

(<*) :: Co f a -> Co f b -> Co f a #

Applicative (Parser i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

pure :: a -> Parser i a #

(<*>) :: Parser i (a -> b) -> Parser i a -> Parser i b #

liftA2 :: (a -> b -> c) -> Parser i a -> Parser i b -> Parser i c #

(*>) :: Parser i a -> Parser i b -> Parser i b #

(<*) :: Parser i a -> Parser i b -> Parser i a #

Applicative (ST s)

Since: base-2.1

Instance details

Defined in Control.Monad.ST.Lazy.Imp

Methods

pure :: a -> ST s a #

(<*>) :: ST s (a -> b) -> ST s a -> ST s b #

liftA2 :: (a -> b -> c) -> ST s a -> ST s b -> ST s c #

(*>) :: ST s a -> ST s b -> ST s b #

(<*) :: ST s a -> ST s b -> ST s a #

Monad m => Applicative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> WrappedMonad m a #

(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

Arrow a => Applicative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

pure :: a0 -> ArrowMonad a a0 #

(<*>) :: ArrowMonad a (a0 -> b) -> ArrowMonad a a0 -> ArrowMonad a b #

liftA2 :: (a0 -> b -> c) -> ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a c #

(*>) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a b #

(<*) :: ArrowMonad a a0 -> ArrowMonad a b -> ArrowMonad a a0 #

Applicative (Proxy :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

pure :: a -> Proxy a #

(<*>) :: Proxy (a -> b) -> Proxy a -> Proxy b #

liftA2 :: (a -> b -> c) -> Proxy a -> Proxy b -> Proxy c #

(*>) :: Proxy a -> Proxy b -> Proxy b #

(<*) :: Proxy a -> Proxy b -> Proxy a #

(Functor m, Monad m) => Applicative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

pure :: a -> MaybeT m a #

(<*>) :: MaybeT m (a -> b) -> MaybeT m a -> MaybeT m b #

liftA2 :: (a -> b -> c) -> MaybeT m a -> MaybeT m b -> MaybeT m c #

(*>) :: MaybeT m a -> MaybeT m b -> MaybeT m b #

(<*) :: MaybeT m a -> MaybeT m b -> MaybeT m a #

Monad m => Applicative (ZipSource m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ZipSource m a #

(<*>) :: ZipSource m (a -> b) -> ZipSource m a -> ZipSource m b #

liftA2 :: (a -> b -> c) -> ZipSource m a -> ZipSource m b -> ZipSource m c #

(*>) :: ZipSource m a -> ZipSource m b -> ZipSource m b #

(<*) :: ZipSource m a -> ZipSource m b -> ZipSource m a #

Applicative m => Applicative (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

pure :: a -> ResourceT m a #

(<*>) :: ResourceT m (a -> b) -> ResourceT m a -> ResourceT m b #

liftA2 :: (a -> b -> c) -> ResourceT m a -> ResourceT m b -> ResourceT m c #

(*>) :: ResourceT m a -> ResourceT m b -> ResourceT m b #

(<*) :: ResourceT m a -> ResourceT m b -> ResourceT m a #

Applicative (Eff r) 
Instance details

Defined in Control.Eff.Internal

Methods

pure :: a -> Eff r a #

(<*>) :: Eff r (a -> b) -> Eff r a -> Eff r b #

liftA2 :: (a -> b -> c) -> Eff r a -> Eff r b -> Eff r c #

(*>) :: Eff r a -> Eff r b -> Eff r b #

(<*) :: Eff r a -> Eff r b -> Eff r a #

Alternative f => Applicative (Cofree f) 
Instance details

Defined in Control.Comonad.Cofree

Methods

pure :: a -> Cofree f a #

(<*>) :: Cofree f (a -> b) -> Cofree f a -> Cofree f b #

liftA2 :: (a -> b -> c) -> Cofree f a -> Cofree f b -> Cofree f c #

(*>) :: Cofree f a -> Cofree f b -> Cofree f b #

(<*) :: Cofree f a -> Cofree f b -> Cofree f a #

Functor f => Applicative (Free f) 
Instance details

Defined in Control.Monad.Free

Methods

pure :: a -> Free f a #

(<*>) :: Free f (a -> b) -> Free f a -> Free f b #

liftA2 :: (a -> b -> c) -> Free f a -> Free f b -> Free f c #

(*>) :: Free f a -> Free f b -> Free f b #

(<*) :: Free f a -> Free f b -> Free f a #

Applicative f => Applicative (Yoneda f) 
Instance details

Defined in Data.Functor.Yoneda

Methods

pure :: a -> Yoneda f a #

(<*>) :: Yoneda f (a -> b) -> Yoneda f a -> Yoneda f b #

liftA2 :: (a -> b -> c) -> Yoneda f a -> Yoneda f b -> Yoneda f c #

(*>) :: Yoneda f a -> Yoneda f b -> Yoneda f b #

(<*) :: Yoneda f a -> Yoneda f b -> Yoneda f a #

Applicative (ReifiedGetter s) 
Instance details

Defined in Control.Lens.Reified

Methods

pure :: a -> ReifiedGetter s a #

(<*>) :: ReifiedGetter s (a -> b) -> ReifiedGetter s a -> ReifiedGetter s b #

liftA2 :: (a -> b -> c) -> ReifiedGetter s a -> ReifiedGetter s b -> ReifiedGetter s c #

(*>) :: ReifiedGetter s a -> ReifiedGetter s b -> ReifiedGetter s b #

(<*) :: ReifiedGetter s a -> ReifiedGetter s b -> ReifiedGetter s a #

Applicative (ReifiedFold s) 
Instance details

Defined in Control.Lens.Reified

Methods

pure :: a -> ReifiedFold s a #

(<*>) :: ReifiedFold s (a -> b) -> ReifiedFold s a -> ReifiedFold s b #

liftA2 :: (a -> b -> c) -> ReifiedFold s a -> ReifiedFold s b -> ReifiedFold s c #

(*>) :: ReifiedFold s a -> ReifiedFold s b -> ReifiedFold s b #

(<*) :: ReifiedFold s a -> ReifiedFold s b -> ReifiedFold s a #

Applicative f => Applicative (Indexing f) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

pure :: a -> Indexing f a #

(<*>) :: Indexing f (a -> b) -> Indexing f a -> Indexing f b #

liftA2 :: (a -> b -> c) -> Indexing f a -> Indexing f b -> Indexing f c #

(*>) :: Indexing f a -> Indexing f b -> Indexing f b #

(<*) :: Indexing f a -> Indexing f b -> Indexing f a #

Applicative f => Applicative (Indexing64 f) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

pure :: a -> Indexing64 f a #

(<*>) :: Indexing64 f (a -> b) -> Indexing64 f a -> Indexing64 f b #

liftA2 :: (a -> b -> c) -> Indexing64 f a -> Indexing64 f b -> Indexing64 f c #

(*>) :: Indexing64 f a -> Indexing64 f b -> Indexing64 f b #

(<*) :: Indexing64 f a -> Indexing64 f b -> Indexing64 f a #

Applicative m => Applicative (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

pure :: a -> ListT m a #

(<*>) :: ListT m (a -> b) -> ListT m a -> ListT m b #

liftA2 :: (a -> b -> c) -> ListT m a -> ListT m b -> ListT m c #

(*>) :: ListT m a -> ListT m b -> ListT m b #

(<*) :: ListT m a -> ListT m b -> ListT m a #

(Applicative (Rep p), Representable p) => Applicative (Prep p) 
Instance details

Defined in Data.Profunctor.Rep

Methods

pure :: a -> Prep p a #

(<*>) :: Prep p (a -> b) -> Prep p a -> Prep p b #

liftA2 :: (a -> b -> c) -> Prep p a -> Prep p b -> Prep p c #

(*>) :: Prep p a -> Prep p b -> Prep p b #

(<*) :: Prep p a -> Prep p b -> Prep p a #

Applicative f => Applicative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> Rec1 f a #

(<*>) :: Rec1 f (a -> b) -> Rec1 f a -> Rec1 f b #

liftA2 :: (a -> b -> c) -> Rec1 f a -> Rec1 f b -> Rec1 f c #

(*>) :: Rec1 f a -> Rec1 f b -> Rec1 f b #

(<*) :: Rec1 f a -> Rec1 f b -> Rec1 f a #

Arrow a => Applicative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a0 -> WrappedArrow a b a0 #

(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Monoid m => Applicative (Const m :: Type -> Type)

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Methods

pure :: a -> Const m a #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

(*>) :: Const m a -> Const m b -> Const m b #

(<*) :: Const m a -> Const m b -> Const m a #

Applicative f => Applicative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Ap f a #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c #

(*>) :: Ap f a -> Ap f b -> Ap f b #

(<*) :: Ap f a -> Ap f b -> Ap f a #

Applicative f => Applicative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Alt f a #

(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b #

liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c #

(*>) :: Alt f a -> Alt f b -> Alt f b #

(<*) :: Alt f a -> Alt f b -> Alt f a #

Biapplicative p => Applicative (Join p) 
Instance details

Defined in Data.Bifunctor.Join

Methods

pure :: a -> Join p a #

(<*>) :: Join p (a -> b) -> Join p a -> Join p b #

liftA2 :: (a -> b -> c) -> Join p a -> Join p b -> Join p c #

(*>) :: Join p a -> Join p b -> Join p b #

(<*) :: Join p a -> Join p b -> Join p a #

Biapplicative p => Applicative (Fix p) 
Instance details

Defined in Data.Bifunctor.Fix

Methods

pure :: a -> Fix p a #

(<*>) :: Fix p (a -> b) -> Fix p a -> Fix p b #

liftA2 :: (a -> b -> c) -> Fix p a -> Fix p b -> Fix p c #

(*>) :: Fix p a -> Fix p b -> Fix p b #

(<*) :: Fix p a -> Fix p b -> Fix p a #

Applicative m => Applicative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

pure :: a -> IdentityT m a #

(<*>) :: IdentityT m (a -> b) -> IdentityT m a -> IdentityT m b #

liftA2 :: (a -> b -> c) -> IdentityT m a -> IdentityT m b -> IdentityT m c #

(*>) :: IdentityT m a -> IdentityT m b -> IdentityT m b #

(<*) :: IdentityT m a -> IdentityT m b -> IdentityT m a #

(Monoid w, Applicative m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

(Monoid w, Applicative m) => Applicative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

pure :: a -> WriterT w m a #

(<*>) :: WriterT w m (a -> b) -> WriterT w m a -> WriterT w m b #

liftA2 :: (a -> b -> c) -> WriterT w m a -> WriterT w m b -> WriterT w m c #

(*>) :: WriterT w m a -> WriterT w m b -> WriterT w m b #

(<*) :: WriterT w m a -> WriterT w m b -> WriterT w m a #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

pure :: a -> StateT s m a #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a #

(Functor m, Monad m) => Applicative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

pure :: a -> StateT s m a #

(<*>) :: StateT s m (a -> b) -> StateT s m a -> StateT s m b #

liftA2 :: (a -> b -> c) -> StateT s m a -> StateT s m b -> StateT s m c #

(*>) :: StateT s m a -> StateT s m b -> StateT s m b #

(<*) :: StateT s m a -> StateT s m b -> StateT s m a #

(Functor m, Monad m) => Applicative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

pure :: a -> ExceptT e m a #

(<*>) :: ExceptT e m (a -> b) -> ExceptT e m a -> ExceptT e m b #

liftA2 :: (a -> b -> c) -> ExceptT e m a -> ExceptT e m b -> ExceptT e m c #

(*>) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m b #

(<*) :: ExceptT e m a -> ExceptT e m b -> ExceptT e m a #

Monad m => Applicative (ZipSink i m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ZipSink i m a #

(<*>) :: ZipSink i m (a -> b) -> ZipSink i m a -> ZipSink i m b #

liftA2 :: (a -> b -> c) -> ZipSink i m a -> ZipSink i m b -> ZipSink i m c #

(*>) :: ZipSink i m a -> ZipSink i m b -> ZipSink i m b #

(<*) :: ZipSink i m a -> ZipSink i m b -> ZipSink i m a #

(Applicative f, Monad f) => Applicative (WhenMissing f x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)).

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

pure :: a -> WhenMissing f x a #

(<*>) :: WhenMissing f x (a -> b) -> WhenMissing f x a -> WhenMissing f x b #

liftA2 :: (a -> b -> c) -> WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x c #

(*>) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x b #

(<*) :: WhenMissing f x a -> WhenMissing f x b -> WhenMissing f x a #

(Functor f, Monad m) => Applicative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

pure :: a -> FreeT f m a #

(<*>) :: FreeT f m (a -> b) -> FreeT f m a -> FreeT f m b #

liftA2 :: (a -> b -> c) -> FreeT f m a -> FreeT f m b -> FreeT f m c #

(*>) :: FreeT f m a -> FreeT f m b -> FreeT f m b #

(<*) :: FreeT f m a -> FreeT f m b -> FreeT f m a #

(Alternative f, Applicative w) => Applicative (CofreeT f w) 
Instance details

Defined in Control.Comonad.Trans.Cofree

Methods

pure :: a -> CofreeT f w a #

(<*>) :: CofreeT f w (a -> b) -> CofreeT f w a -> CofreeT f w b #

liftA2 :: (a -> b -> c) -> CofreeT f w a -> CofreeT f w b -> CofreeT f w c #

(*>) :: CofreeT f w a -> CofreeT f w b -> CofreeT f w b #

(<*) :: CofreeT f w a -> CofreeT f w b -> CofreeT f w a #

(Applicative f, Applicative g) => Applicative (Day f g) 
Instance details

Defined in Data.Functor.Day

Methods

pure :: a -> Day f g a #

(<*>) :: Day f g (a -> b) -> Day f g a -> Day f g b #

liftA2 :: (a -> b -> c) -> Day f g a -> Day f g b -> Day f g c #

(*>) :: Day f g a -> Day f g b -> Day f g b #

(<*) :: Day f g a -> Day f g b -> Day f g a #

(Functor m, Monad m) => Applicative (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

pure :: a -> ErrorT e m a #

(<*>) :: ErrorT e m (a -> b) -> ErrorT e m a -> ErrorT e m b #

liftA2 :: (a -> b -> c) -> ErrorT e m a -> ErrorT e m b -> ErrorT e m c #

(*>) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m b #

(<*) :: ErrorT e m a -> ErrorT e m b -> ErrorT e m a #

Applicative (Mafic a b) 
Instance details

Defined in Control.Lens.Internal.Magma

Methods

pure :: a0 -> Mafic a b a0 #

(<*>) :: Mafic a b (a0 -> b0) -> Mafic a b a0 -> Mafic a b b0 #

liftA2 :: (a0 -> b0 -> c) -> Mafic a b a0 -> Mafic a b b0 -> Mafic a b c #

(*>) :: Mafic a b a0 -> Mafic a b b0 -> Mafic a b b0 #

(<*) :: Mafic a b a0 -> Mafic a b b0 -> Mafic a b a0 #

Applicative (Flows i b)

This is an illegal Applicative.

Instance details

Defined in Control.Lens.Internal.Level

Methods

pure :: a -> Flows i b a #

(<*>) :: Flows i b (a -> b0) -> Flows i b a -> Flows i b b0 #

liftA2 :: (a -> b0 -> c) -> Flows i b a -> Flows i b b0 -> Flows i b c #

(*>) :: Flows i b a -> Flows i b b0 -> Flows i b b0 #

(<*) :: Flows i b a -> Flows i b b0 -> Flows i b a #

Applicative (Indexed i a) 
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

pure :: a0 -> Indexed i a a0 #

(<*>) :: Indexed i a (a0 -> b) -> Indexed i a a0 -> Indexed i a b #

liftA2 :: (a0 -> b -> c) -> Indexed i a a0 -> Indexed i a b -> Indexed i a c #

(*>) :: Indexed i a a0 -> Indexed i a b -> Indexed i a b #

(<*) :: Indexed i a a0 -> Indexed i a b -> Indexed i a a0 #

Applicative (RAW ro rw) 
Instance details

Defined in Development.Shake.Internal.Core.Monad

Methods

pure :: a -> RAW ro rw a #

(<*>) :: RAW ro rw (a -> b) -> RAW ro rw a -> RAW ro rw b #

liftA2 :: (a -> b -> c) -> RAW ro rw a -> RAW ro rw b -> RAW ro rw c #

(*>) :: RAW ro rw a -> RAW ro rw b -> RAW ro rw b #

(<*) :: RAW ro rw a -> RAW ro rw b -> RAW ro rw a #

Applicative (Tagged s) 
Instance details

Defined in Data.Tagged

Methods

pure :: a -> Tagged s a #

(<*>) :: Tagged s (a -> b) -> Tagged s a -> Tagged s b #

liftA2 :: (a -> b -> c) -> Tagged s a -> Tagged s b -> Tagged s c #

(*>) :: Tagged s a -> Tagged s b -> Tagged s b #

(<*) :: Tagged s a -> Tagged s b -> Tagged s a #

(Monoid w, Functor m, Monad m) => Applicative (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

pure :: a -> AccumT w m a #

(<*>) :: AccumT w m (a -> b) -> AccumT w m a -> AccumT w m b #

liftA2 :: (a -> b -> c) -> AccumT w m a -> AccumT w m b -> AccumT w m c #

(*>) :: AccumT w m a -> AccumT w m b -> AccumT w m b #

(<*) :: AccumT w m a -> AccumT w m b -> AccumT w m a #

(Functor m, Monad m) => Applicative (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

pure :: a -> SelectT r m a #

(<*>) :: SelectT r m (a -> b) -> SelectT r m a -> SelectT r m b #

liftA2 :: (a -> b -> c) -> SelectT r m a -> SelectT r m b -> SelectT r m c #

(*>) :: SelectT r m a -> SelectT r m b -> SelectT r m b #

(<*) :: SelectT r m a -> SelectT r m b -> SelectT r m a #

Applicative (Mag a b) 
Instance details

Defined in Data.Biapplicative

Methods

pure :: a0 -> Mag a b a0 #

(<*>) :: Mag a b (a0 -> b0) -> Mag a b a0 -> Mag a b b0 #

liftA2 :: (a0 -> b0 -> c) -> Mag a b a0 -> Mag a b b0 -> Mag a b c #

(*>) :: Mag a b a0 -> Mag a b b0 -> Mag a b b0 #

(<*) :: Mag a b a0 -> Mag a b b0 -> Mag a b a0 #

Monoid m => Applicative (Holes t m) 
Instance details

Defined in Control.Lens.Traversal

Methods

pure :: a -> Holes t m a #

(<*>) :: Holes t m (a -> b) -> Holes t m a -> Holes t m b #

liftA2 :: (a -> b -> c) -> Holes t m a -> Holes t m b -> Holes t m c #

(*>) :: Holes t m a -> Holes t m b -> Holes t m b #

(<*) :: Holes t m a -> Holes t m b -> Holes t m a #

Applicative ((->) a :: Type -> Type)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: a0 -> a -> a0 #

(<*>) :: (a -> (a0 -> b)) -> (a -> a0) -> a -> b #

liftA2 :: (a0 -> b -> c) -> (a -> a0) -> (a -> b) -> a -> c #

(*>) :: (a -> a0) -> (a -> b) -> a -> b #

(<*) :: (a -> a0) -> (a -> b) -> a -> a0 #

Monoid c => Applicative (K1 i c :: Type -> Type)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> K1 i c a #

(<*>) :: K1 i c (a -> b) -> K1 i c a -> K1 i c b #

liftA2 :: (a -> b -> c0) -> K1 i c a -> K1 i c b -> K1 i c c0 #

(*>) :: K1 i c a -> K1 i c b -> K1 i c b #

(<*) :: K1 i c a -> K1 i c b -> K1 i c a #

(Applicative f, Applicative g) => Applicative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :*: g) a #

(<*>) :: (f :*: g) (a -> b) -> (f :*: g) a -> (f :*: g) b #

liftA2 :: (a -> b -> c) -> (f :*: g) a -> (f :*: g) b -> (f :*: g) c #

(*>) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) b #

(<*) :: (f :*: g) a -> (f :*: g) b -> (f :*: g) a #

(Applicative f, Applicative g) => Applicative (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

pure :: a -> Product f g a #

(<*>) :: Product f g (a -> b) -> Product f g a -> Product f g b #

liftA2 :: (a -> b -> c) -> Product f g a -> Product f g b -> Product f g c #

(*>) :: Product f g a -> Product f g b -> Product f g b #

(<*) :: Product f g a -> Product f g b -> Product f g a #

Applicative m => Applicative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

pure :: a -> ReaderT r m a #

(<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b #

liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

(<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

Applicative (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ConduitT i o m a #

(<*>) :: ConduitT i o m (a -> b) -> ConduitT i o m a -> ConduitT i o m b #

liftA2 :: (a -> b -> c) -> ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m c #

(*>) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m b #

(<*) :: ConduitT i o m a -> ConduitT i o m b -> ConduitT i o m a #

Monad m => Applicative (ZipConduit i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

pure :: a -> ZipConduit i o m a #

(<*>) :: ZipConduit i o m (a -> b) -> ZipConduit i o m a -> ZipConduit i o m b #

liftA2 :: (a -> b -> c) -> ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m c #

(*>) :: ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m b #

(<*) :: ZipConduit i o m a -> ZipConduit i o m b -> ZipConduit i o m a #

(Monad f, Applicative f) => Applicative (WhenMatched f x y)

Equivalent to ReaderT Key (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.IntMap.Internal

Methods

pure :: a -> WhenMatched f x y a #

(<*>) :: WhenMatched f x y (a -> b) -> WhenMatched f x y a -> WhenMatched f x y b #

liftA2 :: (a -> b -> c) -> WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y c #

(*>) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y b #

(<*) :: WhenMatched f x y a -> WhenMatched f x y b -> WhenMatched f x y a #

(Applicative f, Monad f) => Applicative (WhenMissing f k x)

Equivalent to ReaderT k (ReaderT x (MaybeT f)) .

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMissing f k x a #

(<*>) :: WhenMissing f k x (a -> b) -> WhenMissing f k x a -> WhenMissing f k x b #

liftA2 :: (a -> b -> c) -> WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x c #

(*>) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x b #

(<*) :: WhenMissing f k x a -> WhenMissing f k x b -> WhenMissing f k x a #

Applicative (Molten i a b) 
Instance details

Defined in Control.Lens.Internal.Magma

Methods

pure :: a0 -> Molten i a b a0 #

(<*>) :: Molten i a b (a0 -> b0) -> Molten i a b a0 -> Molten i a b b0 #

liftA2 :: (a0 -> b0 -> c) -> Molten i a b a0 -> Molten i a b b0 -> Molten i a b c #

(*>) :: Molten i a b a0 -> Molten i a b b0 -> Molten i a b b0 #

(<*) :: Molten i a b a0 -> Molten i a b b0 -> Molten i a b a0 #

Applicative (Bazaar p a b) 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

pure :: a0 -> Bazaar p a b a0 #

(<*>) :: Bazaar p a b (a0 -> b0) -> Bazaar p a b a0 -> Bazaar p a b b0 #

liftA2 :: (a0 -> b0 -> c) -> Bazaar p a b a0 -> Bazaar p a b b0 -> Bazaar p a b c #

(*>) :: Bazaar p a b a0 -> Bazaar p a b b0 -> Bazaar p a b b0 #

(<*) :: Bazaar p a b a0 -> Bazaar p a b b0 -> Bazaar p a b a0 #

Applicative (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

pure :: a -> ContT r m a #

(<*>) :: ContT r m (a -> b) -> ContT r m a -> ContT r m b #

liftA2 :: (a -> b -> c) -> ContT r m a -> ContT r m b -> ContT r m c #

(*>) :: ContT r m a -> ContT r m b -> ContT r m b #

(<*) :: ContT r m a -> ContT r m b -> ContT r m a #

Applicative (ParsecT s u m) 
Instance details

Defined in Text.Parsec.Prim

Methods

pure :: a -> ParsecT s u m a #

(<*>) :: ParsecT s u m (a -> b) -> ParsecT s u m a -> ParsecT s u m b #

liftA2 :: (a -> b -> c) -> ParsecT s u m a -> ParsecT s u m b -> ParsecT s u m c #

(*>) :: ParsecT s u m a -> ParsecT s u m b -> ParsecT s u m b #

(<*) :: ParsecT s u m a -> ParsecT s u m b -> ParsecT s u m a #

Applicative f => Applicative (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> M1 i c f a #

(<*>) :: M1 i c f (a -> b) -> M1 i c f a -> M1 i c f b #

liftA2 :: (a -> b -> c0) -> M1 i c f a -> M1 i c f b -> M1 i c f c0 #

(*>) :: M1 i c f a -> M1 i c f b -> M1 i c f b #

(<*) :: M1 i c f a -> M1 i c f b -> M1 i c f a #

(Applicative f, Applicative g) => Applicative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

pure :: a -> (f :.: g) a #

(<*>) :: (f :.: g) (a -> b) -> (f :.: g) a -> (f :.: g) b #

liftA2 :: (a -> b -> c) -> (f :.: g) a -> (f :.: g) b -> (f :.: g) c #

(*>) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) b #

(<*) :: (f :.: g) a -> (f :.: g) b -> (f :.: g) a #

(Applicative f, Applicative g) => Applicative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

pure :: a -> Compose f g a #

(<*>) :: Compose f g (a -> b) -> Compose f g a -> Compose f g b #

liftA2 :: (a -> b -> c) -> Compose f g a -> Compose f g b -> Compose f g c #

(*>) :: Compose f g a -> Compose f g b -> Compose f g b #

(<*) :: Compose f g a -> Compose f g b -> Compose f g a #

(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

pure :: a -> RWST r w s m a #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

(Monoid w, Functor m, Monad m) => Applicative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

pure :: a -> RWST r w s m a #

(<*>) :: RWST r w s m (a -> b) -> RWST r w s m a -> RWST r w s m b #

liftA2 :: (a -> b -> c) -> RWST r w s m a -> RWST r w s m b -> RWST r w s m c #

(*>) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m b #

(<*) :: RWST r w s m a -> RWST r w s m b -> RWST r w s m a #

(Monad f, Applicative f) => Applicative (WhenMatched f k x y)

Equivalent to ReaderT k (ReaderT x (ReaderT y (MaybeT f)))

Since: containers-0.5.9

Instance details

Defined in Data.Map.Internal

Methods

pure :: a -> WhenMatched f k x y a #

(<*>) :: WhenMatched f k x y (a -> b) -> WhenMatched f k x y a -> WhenMatched f k x y b #

liftA2 :: (a -> b -> c) -> WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y c #

(*>) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y b #

(<*) :: WhenMatched f k x y a -> WhenMatched f k x y b -> WhenMatched f k x y a #

Applicative (TakingWhile p f a b) 
Instance details

Defined in Control.Lens.Internal.Magma

Methods

pure :: a0 -> TakingWhile p f a b a0 #

(<*>) :: TakingWhile p f a b (a0 -> b0) -> TakingWhile p f a b a0 -> TakingWhile p f a b b0 #

liftA2 :: (a0 -> b0 -> c) -> TakingWhile p f a b a0 -> TakingWhile p f a b b0 -> TakingWhile p f a b c #

(*>) :: TakingWhile p f a b a0 -> TakingWhile p f a b b0 -> TakingWhile p f a b b0 #

(<*) :: TakingWhile p f a b a0 -> TakingWhile p f a b b0 -> TakingWhile p f a b a0 #

Applicative (BazaarT p g a b) 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

pure :: a0 -> BazaarT p g a b a0 #

(<*>) :: BazaarT p g a b (a0 -> b0) -> BazaarT p g a b a0 -> BazaarT p g a b b0 #

liftA2 :: (a0 -> b0 -> c) -> BazaarT p g a b a0 -> BazaarT p g a b b0 -> BazaarT p g a b c #

(*>) :: BazaarT p g a b a0 -> BazaarT p g a b b0 -> BazaarT p g a b b0 #

(<*) :: BazaarT p g a b a0 -> BazaarT p g a b b0 -> BazaarT p g a b a0 #

Reifies s (ReifiedApplicative f) => Applicative (ReflectedApplicative f s) 
Instance details

Defined in Data.Reflection

Monad m => Applicative (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

pure :: a -> Pipe l i o u m a #

(<*>) :: Pipe l i o u m (a -> b) -> Pipe l i o u m a -> Pipe l i o u m b #

liftA2 :: (a -> b -> c) -> Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m c #

(*>) :: Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m b #

(<*) :: Pipe l i o u m a -> Pipe l i o u m b -> Pipe l i o u m a #

foldr :: Foldable t => (a -> b -> b) -> b -> t a -> b #

Right-associative fold of a structure.

In the case of lists, foldr, when applied to a binary operator, a starting value (typically the right-identity of the operator), and a list, reduces the list using the binary operator, from right to left:

foldr f z [x1, x2, ..., xn] == x1 `f` (x2 `f` ... (xn `f` z)...)

Note that, since the head of the resulting expression is produced by an application of the operator to the first element of the list, foldr can produce a terminating expression from an infinite list.

For a general Foldable structure this should be semantically identical to,

foldr f z = foldr f z . toList

length :: Foldable t => t a -> Int #

Returns the size/length of a finite structure as an Int. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

null :: Foldable t => t a -> Bool #

Test whether the structure is empty. The default implementation is optimized for structures that are similar to cons-lists, because there is no general way to do better.

foldl :: Foldable t => (b -> a -> b) -> b -> t a -> b #

Left-associative fold of a structure.

In the case of lists, foldl, when applied to a binary operator, a starting value (typically the left-identity of the operator), and a list, reduces the list using the binary operator, from left to right:

foldl f z [x1, x2, ..., xn] == (...((z `f` x1) `f` x2) `f`...) `f` xn

Note that to produce the outermost application of the operator the entire input list must be traversed. This means that foldl' will diverge if given an infinite list.

Also note that if you want an efficient left-fold, you probably want to use foldl' instead of foldl. The reason for this is that latter does not force the "inner" results (e.g. z f x1 in the above example) before applying them to the operator (e.g. to (f x2)). This results in a thunk chain O(n) elements long, which then must be evaluated from the outside-in.

For a general Foldable structure this should be semantically identical to,

foldl f z = foldl f z . toList

foldl' :: Foldable t => (b -> a -> b) -> b -> t a -> b #

Left-associative fold of a structure but with strict application of the operator.

This ensures that each step of the fold is forced to weak head normal form before being applied, avoiding the collection of thunks that would otherwise occur. This is often what you want to strictly reduce a finite list to a single, monolithic result (e.g. length).

For a general Foldable structure this should be semantically identical to,

foldl f z = foldl' f z . toList

foldl1 :: Foldable t => (a -> a -> a) -> t a -> a #

A variant of foldl that has no base case, and thus may only be applied to non-empty structures.

foldl1 f = foldl1 f . toList

sum :: (Foldable t, Num a) => t a -> a #

The sum function computes the sum of the numbers of a structure.

product :: (Foldable t, Num a) => t a -> a #

The product function computes the product of the numbers of a structure.

foldr1 :: Foldable t => (a -> a -> a) -> t a -> a #

A variant of foldr that has no base case, and thus may only be applied to non-empty structures.

foldr1 f = foldr1 f . toList

maximum :: (Foldable t, Ord a) => t a -> a #

The largest element of a non-empty structure.

minimum :: (Foldable t, Ord a) => t a -> a #

The least element of a non-empty structure.

elem :: (Foldable t, Eq a) => a -> t a -> Bool infix 4 #

Does the element occur in the structure?

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

Map each element of a structure to a monadic action, evaluate these actions from left to right, and collect the results. For a version that ignores the results see mapM_.

sequence :: (Traversable t, Monad m) => t (m a) -> m (t a) #

Evaluate each monadic action in the structure from left to right, and collect the results. For a version that ignores the results see sequence_.

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

An associative operation.

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 laws:

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

mempty

Methods

mempty :: a #

Identity of mappend

mappend :: a -> a -> a #

An associative operation

NOTE: This method is redundant and has the default implementation mappend = '(<>)' since base-4.11.0.0.

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.

Instances
Monoid Ordering

Since: base-2.1

Instance details

Defined in GHC.Base

Monoid ()

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: () #

mappend :: () -> () -> () #

mconcat :: [()] -> () #

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Lazy.Internal

Monoid Series 
Instance details

Defined in Data.Aeson.Encoding.Internal

Monoid More 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

mempty :: More #

mappend :: More -> More -> More #

mconcat :: [More] -> More #

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: All #

mappend :: All -> All -> All #

mconcat :: [All] -> All #

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Any #

mappend :: Any -> Any -> Any #

mconcat :: [Any] -> Any #

Monoid ShortByteString 
Instance details

Defined in Data.ByteString.Short.Internal

Monoid IntSet 
Instance details

Defined in Data.IntSet.Internal

Monoid Doc 
Instance details

Defined in Text.PrettyPrint.HughesPJ

Methods

mempty :: Doc #

mappend :: Doc -> Doc -> Doc #

mconcat :: [Doc] -> Doc #

Monoid ByteArray 
Instance details

Defined in Data.Primitive.ByteArray

Monoid Depends 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

mempty :: Depends #

mappend :: Depends -> Depends -> Depends #

mconcat :: [Depends] -> Depends #

Monoid CmdArgument 
Instance details

Defined in Development.Shake.Command

Monoid Progress 
Instance details

Defined in Development.Shake.Internal.Options

Monoid RamSize Source # 
Instance details

Defined in B9.ExecEnv

Monoid CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Monoid Resources Source # 
Instance details

Defined in B9.ExecEnv

Monoid Script Source # 
Instance details

Defined in B9.ShellScript

Monoid Environment Source # 
Instance details

Defined in B9.Environment

Monoid B9Config Source # 
Instance details

Defined in B9.B9Config

Monoid ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

Monoid SRules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

mempty :: SRules #

mappend :: SRules -> SRules -> SRules #

mconcat :: [SRules] -> SRules #

Monoid [a]

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: [a] #

mappend :: [a] -> [a] -> [a] #

mconcat :: [[a]] -> [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 details

Defined in GHC.Base

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Monoid a => Monoid (IO a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mempty :: IO a #

mappend :: IO a -> IO a -> IO a #

mconcat :: [IO a] -> IO a #

Monoid p => Monoid (Par1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Par1 p #

mappend :: Par1 p -> Par1 p -> Par1 p #

mconcat :: [Par1 p] -> Par1 p #

Monoid (IResult a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mempty :: IResult a #

mappend :: IResult a -> IResult a -> IResult a #

mconcat :: [IResult a] -> IResult a #

Monoid (Result a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mempty :: Result a #

mappend :: Result a -> Result a -> Result a #

mconcat :: [Result a] -> Result a #

Monoid (Parser a) 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mempty :: Parser a #

mappend :: Parser a -> Parser a -> Parser a #

mconcat :: [Parser a] -> Parser a #

(Semigroup a, Monoid a) => Monoid (Concurrently a)

Since: async-2.1.0

Instance details

Defined in Control.Concurrent.Async

Monoid (Predicate a) 
Instance details

Defined in Data.Functor.Contravariant

Monoid (Comparison a) 
Instance details

Defined in Data.Functor.Contravariant

Monoid (Equivalence a) 
Instance details

Defined in Data.Functor.Contravariant

(Ord a, Bounded a) => Monoid (Min a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Min a #

mappend :: Min a -> Min a -> Min a #

mconcat :: [Min a] -> Min a #

(Ord a, Bounded a) => Monoid (Max a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Max a #

mappend :: Max a -> Max a -> Max a #

mconcat :: [Max a] -> Max a #

Monoid m => Monoid (WrappedMonoid m)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Semigroup a => Monoid (Option a)

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mempty :: Option a #

mappend :: Option a -> Option a -> Option a #

mconcat :: [Option a] -> Option a #

Monoid a => Monoid (Identity a)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Identity

Methods

mempty :: Identity a #

mappend :: Identity a -> Identity a -> Identity a #

mconcat :: [Identity a] -> Identity a #

Monoid (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: First a #

mappend :: First a -> First a -> First a #

mconcat :: [First a] -> First a #

Monoid (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: Last a #

mappend :: Last a -> Last a -> Last a #

mconcat :: [Last a] -> Last a #

Monoid a => Monoid (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Dual a #

mappend :: Dual a -> Dual a -> Dual a #

mconcat :: [Dual a] -> Dual a #

Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a #

mappend :: Endo a -> Endo a -> Endo a #

mconcat :: [Endo a] -> Endo a #

Num a => Monoid (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Sum a #

mappend :: Sum a -> Sum a -> Sum a #

mconcat :: [Sum a] -> Sum a #

Num a => Monoid (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Product a #

mappend :: Product a -> Product a -> Product a #

mconcat :: [Product a] -> Product a #

Monoid a => Monoid (Down a)

Since: base-4.11.0.0

Instance details

Defined in Data.Ord

Methods

mempty :: Down a #

mappend :: Down a -> Down a -> Down a #

mconcat :: [Down a] -> Down a #

Monoid (PutM ()) 
Instance details

Defined in Data.Binary.Put

Methods

mempty :: PutM () #

mappend :: PutM () -> PutM () -> PutM () #

mconcat :: [PutM ()] -> PutM () #

Monoid (IntMap a) 
Instance details

Defined in Data.IntMap.Internal

Methods

mempty :: IntMap a #

mappend :: IntMap a -> IntMap a -> IntMap a #

mconcat :: [IntMap a] -> IntMap a #

Monoid (Seq a) 
Instance details

Defined in Data.Sequence.Internal

Methods

mempty :: Seq a #

mappend :: Seq a -> Seq a -> Seq a #

mconcat :: [Seq a] -> Seq a #

Ord a => Monoid (Set a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: Set a #

mappend :: Set a -> Set a -> Set a #

mconcat :: [Set a] -> Set a #

Monoid (DList a) 
Instance details

Defined in Data.DList

Methods

mempty :: DList a #

mappend :: DList a -> DList a -> DList a #

mconcat :: [DList a] -> DList a #

Prim a => Monoid (Vector a) 
Instance details

Defined in Data.Vector.Primitive

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Storable a => Monoid (Vector a) 
Instance details

Defined in Data.Vector.Storable

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

(Hashable a, Eq a) => Monoid (HashSet a) 
Instance details

Defined in Data.HashSet.Base

Methods

mempty :: HashSet a #

mappend :: HashSet a -> HashSet a -> HashSet a #

mconcat :: [HashSet a] -> HashSet a #

Monoid (Vector a) 
Instance details

Defined in Data.Vector

Methods

mempty :: Vector a #

mappend :: Vector a -> Vector a -> Vector a #

mconcat :: [Vector a] -> Vector a #

Ord a => Monoid (Min a) 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

mempty :: Min a #

mappend :: Min a -> Min a -> Min a #

mconcat :: [Min a] -> Min a #

Ord a => Monoid (Max a) 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

mempty :: Max a #

mappend :: Max a -> Max a -> Max a #

mconcat :: [Max a] -> Max a #

Monoid (Leftmost a) 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

mempty :: Leftmost a #

mappend :: Leftmost a -> Leftmost a -> Leftmost a #

mconcat :: [Leftmost a] -> Leftmost a #

Monoid (Rightmost a) 
Instance details

Defined in Control.Lens.Internal.Fold

Monoid (Doc a) 
Instance details

Defined in Text.PrettyPrint.Annotated.HughesPJ

Methods

mempty :: Doc a #

mappend :: Doc a -> Doc a -> Doc a #

mconcat :: [Doc a] -> Doc a #

PrimUnlifted a => Monoid (UnliftedArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.UnliftedArray

Monoid (PrimArray a)

Since: primitive-0.6.4.0

Instance details

Defined in Data.Primitive.PrimArray

Monoid (SmallArray a) 
Instance details

Defined in Data.Primitive.SmallArray

Monoid (Array a) 
Instance details

Defined in Data.Primitive.Array

Methods

mempty :: Array a #

mappend :: Array a -> Array a -> Array a #

mconcat :: [Array a] -> Array a #

Monoid (UserRuleVersioned a) 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

mempty :: UserRuleVersioned a #

mappend :: UserRuleVersioned a -> UserRuleVersioned a -> UserRuleVersioned a #

mconcat :: [UserRuleVersioned a] -> UserRuleVersioned a #

Monoid (UserRule a) 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

mempty :: UserRule a #

mappend :: UserRule a -> UserRule a -> UserRule a #

mconcat :: [UserRule a] -> UserRule a #

(Semigroup a, Monoid a) => Monoid (Rules a) 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

mempty :: Rules a #

mappend :: Rules a -> Rules a -> Rules a #

mconcat :: [Rules a] -> Rules a #

Monoid a => Monoid (Action a) 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

mempty :: Action a #

mappend :: Action a -> Action a -> Action a #

mconcat :: [Action a] -> Action a #

Monoid (MergeSet a) 
Instance details

Defined in Data.Set.Internal

Methods

mempty :: MergeSet a #

mappend :: MergeSet a -> MergeSet a -> MergeSet a #

mconcat :: [MergeSet a] -> MergeSet a #

Monoid b => Monoid (a -> b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: a -> b #

mappend :: (a -> b) -> (a -> b) -> a -> b #

mconcat :: [a -> b] -> a -> b #

Monoid (U1 p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: U1 p #

mappend :: U1 p -> U1 p -> U1 p #

mconcat :: [U1 p] -> U1 p #

(Monoid a, Monoid b) => Monoid (a, b)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b) #

mappend :: (a, b) -> (a, b) -> (a, b) #

mconcat :: [(a, b)] -> (a, b) #

Monoid a => Monoid (ST s a)

Since: base-4.11.0.0

Instance details

Defined in GHC.ST

Methods

mempty :: ST s a #

mappend :: ST s a -> ST s a -> ST s a #

mconcat :: [ST s a] -> ST s a #

Monoid a => Monoid (Op a b) 
Instance details

Defined in Data.Functor.Contravariant

Methods

mempty :: Op a b #

mappend :: Op a b -> Op a b -> Op a b #

mconcat :: [Op a b] -> Op a b #

(Eq k, Hashable k) => Monoid (HashMap k v) 
Instance details

Defined in Data.HashMap.Base

Methods

mempty :: HashMap k v #

mappend :: HashMap k v -> HashMap k v -> HashMap k v #

mconcat :: [HashMap k v] -> HashMap k v #

Ord k => Monoid (Map k v) 
Instance details

Defined in Data.Map.Internal

Methods

mempty :: Map k v #

mappend :: Map k v -> Map k v -> Map k v #

mconcat :: [Map k v] -> Map k v #

Monoid (Parser i a) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

mempty :: Parser i a #

mappend :: Parser i a -> Parser i a -> Parser i a #

mconcat :: [Parser i a] -> Parser i a #

Monoid (Proxy s)

Since: base-4.7.0.0

Instance details

Defined in Data.Proxy

Methods

mempty :: Proxy s #

mappend :: Proxy s -> Proxy s -> Proxy s #

mconcat :: [Proxy s] -> Proxy s #

Monoid (ReifiedFold s a) 
Instance details

Defined in Control.Lens.Reified

Methods

mempty :: ReifiedFold s a #

mappend :: ReifiedFold s a -> ReifiedFold s a -> ReifiedFold s a #

mconcat :: [ReifiedFold s a] -> ReifiedFold s a #

Monoid (Deepening i a)

This is an illegal Monoid.

Instance details

Defined in Control.Lens.Internal.Level

Methods

mempty :: Deepening i a #

mappend :: Deepening i a -> Deepening i a -> Deepening i a #

mconcat :: [Deepening i a] -> Deepening i a #

Monoid (f a) => Monoid (Indexing f a)
>>> "cat" ^@.. (folded <> folded)
[(0,'c'),(1,'a'),(2,'t'),(0,'c'),(1,'a'),(2,'t')]
>>> "cat" ^@.. indexing (folded <> folded)
[(0,'c'),(1,'a'),(2,'t'),(3,'c'),(4,'a'),(5,'t')]
Instance details

Defined in Control.Lens.Internal.Indexed

Methods

mempty :: Indexing f a #

mappend :: Indexing f a -> Indexing f a -> Indexing f a #

mconcat :: [Indexing f a] -> Indexing f a #

(Contravariant f, Applicative f) => Monoid (Folding f a) 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

mempty :: Folding f a #

mappend :: Folding f a -> Folding f a -> Folding f a #

mconcat :: [Folding f a] -> Folding f a #

Applicative f => Monoid (Traversed a f) 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

mempty :: Traversed a f #

mappend :: Traversed a f -> Traversed a f -> Traversed a f #

mconcat :: [Traversed a f] -> Traversed a f #

(Apply f, Applicative f) => Monoid (TraversedF a f) 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

mempty :: TraversedF a f #

mappend :: TraversedF a f -> TraversedF a f -> TraversedF a f #

mconcat :: [TraversedF a f] -> TraversedF a f #

Monad m => Monoid (Sequenced a m) 
Instance details

Defined in Control.Lens.Internal.Fold

Methods

mempty :: Sequenced a m #

mappend :: Sequenced a m -> Sequenced a m -> Sequenced a m #

mconcat :: [Sequenced a m] -> Sequenced a m #

Monoid (f p) => Monoid (Rec1 f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: Rec1 f p #

mappend :: Rec1 f p -> Rec1 f p -> Rec1 f p #

mconcat :: [Rec1 f p] -> Rec1 f p #

(Monoid a, Monoid b, Monoid c) => Monoid (a, b, c)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (a, b, c) #

mappend :: (a, b, c) -> (a, b, c) -> (a, b, c) #

mconcat :: [(a, b, c)] -> (a, b, c) #

Monoid a => Monoid (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

mempty :: 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 details

Defined in Data.Monoid

Methods

mempty :: 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 details

Defined in Data.Semigroup.Internal

Methods

mempty :: Alt f a #

mappend :: Alt f a -> Alt f a -> Alt f a #

mconcat :: [Alt f a] -> Alt f a #

Monoid (ReifiedIndexedFold i s a) 
Instance details

Defined in Control.Lens.Reified

Reifies s (ReifiedMonoid a) => Monoid (ReflectedMonoid a s) 
Instance details

Defined in Data.Reflection

(Semigroup a, Monoid a) => Monoid (RAW ro rw a) 
Instance details

Defined in Development.Shake.Internal.Core.Monad

Methods

mempty :: RAW ro rw a #

mappend :: RAW ro rw a -> RAW ro rw a -> RAW ro rw a #

mconcat :: [RAW ro rw a] -> RAW ro rw a #

(Semigroup a, Monoid a) => Monoid (Tagged s a) 
Instance details

Defined in Data.Tagged

Methods

mempty :: Tagged s a #

mappend :: Tagged s a -> Tagged s a -> Tagged s a #

mconcat :: [Tagged s a] -> Tagged s a #

Monoid c => Monoid (K1 i c p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: 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 (f p), Monoid (g p)) => Monoid ((f :*: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :*: g) p #

mappend :: (f :*: g) p -> (f :*: g) p -> (f :*: g) p #

mconcat :: [(f :*: g) p] -> (f :*: g) p #

(Monoid a, Monoid b, Monoid c, Monoid d) => Monoid (a, b, c, d)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (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) #

Monad m => Monoid (ConduitT i o m ()) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

mempty :: ConduitT i o m () #

mappend :: ConduitT i o m () -> ConduitT i o m () -> ConduitT i o m () #

mconcat :: [ConduitT i o m ()] -> ConduitT i o m () #

(Monoid a, Semigroup (ParsecT s u m a)) => Monoid (ParsecT s u m a)

The Monoid instance for ParsecT is used for the same purposes as the Semigroup instance.

Since: parsec-3.1.12

Instance details

Defined in Text.Parsec.Prim

Methods

mempty :: ParsecT s u m a #

mappend :: ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a #

mconcat :: [ParsecT s u m a] -> ParsecT s u m a #

Monoid (f p) => Monoid (M1 i c f p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: 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 (f (g p)) => Monoid ((f :.: g) p)

Since: base-4.12.0.0

Instance details

Defined in GHC.Generics

Methods

mempty :: (f :.: g) p #

mappend :: (f :.: g) p -> (f :.: g) p -> (f :.: g) p #

mconcat :: [(f :.: g) p] -> (f :.: g) p #

(Monoid a, Monoid b, Monoid c, Monoid d, Monoid e) => Monoid (a, b, c, d, e)

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mempty :: (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) #

Contravariant g => Monoid (BazaarT p g a b t) 
Instance details

Defined in Control.Lens.Internal.Bazaar

Methods

mempty :: BazaarT p g a b t #

mappend :: BazaarT p g a b t -> BazaarT p g a b t -> BazaarT p g a b t #

mconcat :: [BazaarT p g a b t] -> BazaarT p g a b t #

Monad m => Monoid (Pipe l i o u m ()) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

mempty :: Pipe l i o u m () #

mappend :: Pipe l i o u m () -> Pipe l i o u m () -> Pipe l i o u m () #

mconcat :: [Pipe l i o u m ()] -> Pipe l i o u m () #

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
Monad Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

(>>=) :: Maybe a -> (a -> Maybe b) -> Maybe b #

(>>) :: Maybe a -> Maybe b -> Maybe b #

return :: a -> Maybe a #

fail :: String -> Maybe a #

Functor Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

fmap :: (a -> b) -> Maybe a -> Maybe b #

(<$) :: a -> Maybe b -> Maybe a #

MonadFix Maybe

Since: base-2.1

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Maybe a) -> Maybe a #

MonadFail Maybe

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.Fail

Methods

fail :: String -> Maybe a #

Applicative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

pure :: 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 #

Foldable Maybe

Since: base-2.1

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Maybe m -> 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 #

Traversable Maybe

Since: base-2.1

Instance details

Defined in Data.Traversable

Methods

traverse :: 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) #

Arbitrary1 Maybe 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a -> Gen (Maybe a) #

liftShrink :: (a -> [a]) -> Maybe a -> [Maybe a] #

ToJSON1 Maybe 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Value) -> ([a] -> Value) -> Maybe a -> Value #

liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [Maybe a] -> Value #

liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> Maybe a -> Encoding #

liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [Maybe a] -> Encoding #

FromJSON1 Maybe 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Maybe a) #

liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Maybe a] #

Alternative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

MonadPlus Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a #

mplus :: Maybe a -> Maybe a -> Maybe a #

Eq1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a -> b -> Bool) -> Maybe a -> Maybe b -> Bool #

Ord1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a -> b -> Ordering) -> Maybe a -> Maybe b -> Ordering #

Read1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (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] #

Show1 Maybe

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> Int -> Maybe a -> ShowS #

liftShowList :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> [Maybe a] -> ShowS #

MonadThrow Maybe 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> Maybe a #

NFData1 Maybe

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Maybe a -> () #

Hashable1 Maybe 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a -> Int) -> Int -> Maybe a -> Int #

MonadBaseControl Maybe Maybe 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM Maybe a :: Type #

MonadError () Maybe

Since: mtl-2.2.2

Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: () -> Maybe a #

catchError :: Maybe a -> (() -> Maybe a) -> Maybe a #

FunctorWithIndex () Maybe 
Instance details

Defined in Control.Lens.Indexed

Methods

imap :: (() -> a -> b) -> Maybe a -> Maybe b #

imapped :: IndexedSetter () (Maybe a) (Maybe b) a b #

FoldableWithIndex () Maybe 
Instance details

Defined in Control.Lens.Indexed

Methods

ifoldMap :: Monoid m => (() -> a -> m) -> Maybe a -> m #

ifolded :: IndexedFold () (Maybe a) a #

ifoldr :: (() -> a -> b -> b) -> b -> Maybe a -> b #

ifoldl :: (() -> b -> a -> b) -> b -> Maybe a -> b #

ifoldr' :: (() -> a -> b -> b) -> b -> Maybe a -> b #

ifoldl' :: (() -> b -> a -> b) -> b -> Maybe a -> b #

TraversableWithIndex () Maybe 
Instance details

Defined in Control.Lens.Indexed

Methods

itraverse :: Applicative f => (() -> a -> f b) -> Maybe a -> f (Maybe b) #

itraversed :: IndexedTraversal () (Maybe a) (Maybe b) a b #

MonadBase Maybe Maybe 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: Maybe α -> Maybe α #

(Selector s, GToJSON enc arity (K1 i (Maybe a) :: Type -> Type), KeyValuePair enc pairs, Monoid pairs) => RecordToPairs enc pairs arity (S1 s (K1 i (Maybe a) :: Type -> Type)) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

recordToPairs :: Options -> ToArgs enc arity a0 -> S1 s (K1 i (Maybe a)) a0 -> pairs

(Selector s, FromJSON a) => FromRecord arity (S1 s (K1 i (Maybe a) :: Type -> Type)) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseRecord :: Options -> FromArgs arity a0 -> Object -> Parser (S1 s (K1 i (Maybe a)) a0)

Eq a => Eq (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

(==) :: Maybe a -> Maybe a -> Bool #

(/=) :: Maybe a -> Maybe a -> Bool #

Data a => Data (Maybe a)

Since: base-4.0.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Maybe a -> c (Maybe a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Maybe a) #

toConstr :: Maybe a -> Constr #

dataTypeOf :: Maybe a -> DataType #

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

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

gmapT :: (forall b. Data b => b -> b) -> Maybe a -> Maybe a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Maybe a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Maybe a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Maybe a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Maybe a -> m (Maybe a) #

Ord a => Ord (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Maybe

Methods

compare :: 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 #

Read a => Read (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Read

Show a => Show (Maybe a)

Since: base-2.1

Instance details

Defined in GHC.Show

Methods

showsPrec :: Int -> Maybe a -> ShowS #

show :: Maybe a -> String #

showList :: [Maybe a] -> ShowS #

Generic (Maybe a) 
Instance details

Defined in GHC.Generics

Associated Types

type Rep (Maybe a) :: Type -> Type #

Methods

from :: Maybe a -> Rep (Maybe a) x #

to :: Rep (Maybe a) x -> Maybe a #

Semigroup a => Semigroup (Maybe a)

Since: base-4.9.0.0

Instance details

Defined 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 => 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 details

Defined in GHC.Base

Methods

mempty :: Maybe a #

mappend :: Maybe a -> Maybe a -> Maybe a #

mconcat :: [Maybe a] -> Maybe a #

Lift a => Lift (Maybe a) 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

lift :: Maybe a -> Q Exp #

Testable prop => Testable (Maybe prop) 
Instance details

Defined in Test.QuickCheck.Property

Methods

property :: Maybe prop -> Property #

propertyForAllShrinkShow :: Show a => Gen a -> (a -> [a]) -> (a -> String) -> (a -> Maybe prop) -> Property #

Function a => Function (Maybe a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Maybe a -> b) -> Maybe a :-> b #

Arbitrary a => Arbitrary (Maybe a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Maybe a) #

shrink :: Maybe a -> [Maybe a] #

CoArbitrary a => CoArbitrary (Maybe a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Maybe a -> Gen b -> Gen b #

Hashable a => Hashable (Maybe a) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Maybe a -> Int #

hash :: Maybe a -> Int #

ToJSON a => ToJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON a => FromJSON (Maybe a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

SingKind a => SingKind (Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Associated Types

type DemoteRep (Maybe a) :: Type

Methods

fromSing :: Sing a0 -> DemoteRep (Maybe a)

Binary a => Binary (Maybe a) 
Instance details

Defined in Data.Binary.Class

Methods

put :: Maybe a -> Put #

get :: Get (Maybe a) #

putList :: [Maybe a] -> Put #

NFData a => NFData (Maybe a) 
Instance details

Defined in Control.DeepSeq

Methods

rnf :: Maybe a -> () #

Ixed (Maybe a) 
Instance details

Defined in Control.Lens.At

Methods

ix :: Index (Maybe a) -> Traversal' (Maybe a) (IxValue (Maybe a)) #

At (Maybe a) 
Instance details

Defined in Control.Lens.At

Methods

at :: Index (Maybe a) -> Lens' (Maybe a) (Maybe (IxValue (Maybe a))) #

AsEmpty (Maybe a) 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' (Maybe a) () #

MonoFunctor (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Maybe a #

MonoFoldable (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element (Maybe a) -> m) -> Maybe a -> m #

ofoldr :: (Element (Maybe a) -> b -> b) -> b -> Maybe a -> b #

ofoldl' :: (a0 -> Element (Maybe a) -> a0) -> a0 -> Maybe a -> a0 #

otoList :: Maybe a -> [Element (Maybe a)] #

oall :: (Element (Maybe a) -> Bool) -> Maybe a -> Bool #

oany :: (Element (Maybe a) -> Bool) -> Maybe a -> Bool #

onull :: Maybe a -> Bool #

olength :: Maybe a -> Int #

olength64 :: Maybe a -> Int64 #

ocompareLength :: Integral i => Maybe a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Maybe a) -> f b) -> Maybe a -> f () #

ofor_ :: Applicative f => Maybe a -> (Element (Maybe a) -> f b) -> f () #

omapM_ :: Applicative m => (Element (Maybe a) -> m ()) -> Maybe a -> m () #

oforM_ :: Applicative m => Maybe a -> (Element (Maybe a) -> m ()) -> m () #

ofoldlM :: Monad m => (a0 -> Element (Maybe a) -> m a0) -> a0 -> Maybe a -> m a0 #

ofoldMap1Ex :: Semigroup m => (Element (Maybe a) -> m) -> Maybe a -> m #

ofoldr1Ex :: (Element (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Element (Maybe a) #

ofoldl1Ex' :: (Element (Maybe a) -> Element (Maybe a) -> Element (Maybe a)) -> Maybe a -> Element (Maybe a) #

headEx :: Maybe a -> Element (Maybe a) #

lastEx :: Maybe a -> Element (Maybe a) #

unsafeHead :: Maybe a -> Element (Maybe a) #

unsafeLast :: Maybe a -> Element (Maybe a) #

maximumByEx :: (Element (Maybe a) -> Element (Maybe a) -> Ordering) -> Maybe a -> Element (Maybe a) #

minimumByEx :: (Element (Maybe a) -> Element (Maybe a) -> Ordering) -> Maybe a -> Element (Maybe a) #

oelem :: Element (Maybe a) -> Maybe a -> Bool #

onotElem :: Element (Maybe a) -> Maybe a -> Bool #

MonoTraversable (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Maybe a) -> f (Element (Maybe a))) -> Maybe a -> f (Maybe a) #

omapM :: Applicative m => (Element (Maybe a) -> m (Element (Maybe a))) -> Maybe a -> m (Maybe a) #

MonoPointed (Maybe a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Maybe a) -> Maybe a #

PrettyVal a => PrettyVal (Maybe a) 
Instance details

Defined in Text.Show.PrettyVal

Methods

prettyVal :: Maybe a -> Value #

listValue :: [Maybe a] -> Value

IsCmdArgument a => IsCmdArgument (Maybe a) 
Instance details

Defined in Development.Shake.Command

Generic1 Maybe 
Instance details

Defined in GHC.Generics

Associated Types

type Rep1 Maybe :: k -> Type #

Methods

from1 :: Maybe a -> Rep1 Maybe a #

to1 :: Rep1 Maybe a -> Maybe a #

SingI (Nothing :: Maybe a)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing Nothing

Each (Maybe a) (Maybe b) a b
each :: Traversal (Maybe a) (Maybe b) a b
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal (Maybe a) (Maybe b) a b #

SingI a2 => SingI (Just a2 :: Maybe a1)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

sing :: Sing (Just a2)

type StM Maybe a 
Instance details

Defined in Control.Monad.Trans.Control

type StM Maybe a = a
type Rep (Maybe a)

Since: base-4.6.0.0

Instance details

Defined 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 details

Defined in GHC.Generics

data Sing (b :: Maybe a) where
type DemoteRep (Maybe a) 
Instance details

Defined in GHC.Generics

type DemoteRep (Maybe a) = Maybe (DemoteRep a)
type Index (Maybe a) 
Instance details

Defined in Control.Lens.At

type Index (Maybe a) = ()
type IxValue (Maybe a) 
Instance details

Defined in Control.Lens.At

type IxValue (Maybe a) = a
type Element (Maybe a) 
Instance details

Defined in Data.MonoTraversable

type Element (Maybe a) = a
type Rep1 Maybe

Since: base-4.6.0.0

Instance details

Defined in GHC.Generics

unlines :: [String] -> String #

unlines is an inverse operation to lines. It joins lines, after appending a terminating newline to each.

>>> unlines ["Hello", "World", "!"]
"Hello\nWorld\n!\n"

lines :: String -> [String] #

lines breaks a string up into a list of strings at newline characters. The resulting strings do not contain newlines.

Note that after splitting the string at newline characters, the last part of the string is considered a line even if it doesn't end with a newline. For example,

>>> lines ""
[]
>>> lines "\n"
[""]
>>> lines "one"
["one"]
>>> lines "one\n"
["one"]
>>> lines "one\n\n"
["one",""]
>>> lines "one\ntwo"
["one","two"]
>>> lines "one\ntwo\n"
["one","two"]

Thus lines s contains at least as many elements as newlines in s.

isInfixOf :: Eq a => [a] -> [a] -> Bool #

The isInfixOf function takes two lists and returns True iff the first list is contained, wholly and intact, anywhere within the second.

>>> isInfixOf "Haskell" "I really like Haskell."
True
>>> isInfixOf "Ial" "I really like Haskell."
False

delete :: Eq a => a -> [a] -> [a] #

delete x removes the first occurrence of x from its list argument. For example,

>>> delete 'a' "banana"
"bnana"

It is a special case of deleteBy, which allows the programmer to supply their own equality test.

data Version #

A Version represents the version of a software entity.

An instance of Eq is provided, which implements exact equality modulo reordering of the tags in the versionTags field.

An instance of Ord is also provided, which gives lexicographic ordering on the versionBranch fields (i.e. 2.1 > 2.0, 1.2.3 > 1.2.2, etc.). This is expected to be sufficient for many uses, but note that you may need to use a more specific ordering for your versioning scheme. For example, some versioning schemes may include pre-releases which have tags "pre1", "pre2", and so on, and these would need to be taken into account when determining ordering. In some cases, date ordering may be more appropriate, so the application would have to look for date tags in the versionTags field and compare those. The bottom line is, don't always assume that compare and other Ord operations are the right thing for every Version.

Similarly, concrete representations of versions may differ. One possible concrete representation is provided (see showVersion and parseVersion), but depending on the application a different concrete representation may be more appropriate.

Constructors

Version 

Fields

  • versionBranch :: [Int]

    The numeric branch for this version. This reflects the fact that most software versions are tree-structured; there is a main trunk which is tagged with versions at various points (1,2,3...), and the first branch off the trunk after version 3 is 3.1, the second branch off the trunk after version 3 is 3.2, and so on. The tree can be branched arbitrarily, just by adding more digits.

    We represent the branch as a list of Int, so version 3.2.1 becomes [3,2,1]. Lexicographic ordering (i.e. the default instance of Ord for [Int]) gives the natural ordering of branches.

  • versionTags :: [String]

    A version can be tagged with an arbitrary list of strings. The interpretation of the list of tags is entirely dependent on the entity that this version applies to.

Instances
IsList Version

Since: base-4.8.0.0

Instance details

Defined in GHC.Exts

Associated Types

type Item Version :: Type #

Eq Version

Since: base-2.1

Instance details

Defined in Data.Version

Methods

(==) :: Version -> Version -> Bool #

(/=) :: Version -> Version -> Bool #

Data Version

Since: base-4.7.0.0

Instance details

Defined in Data.Data

Methods

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

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

toConstr :: Version -> Constr #

dataTypeOf :: Version -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Version

Since: base-2.1

Instance details

Defined in Data.Version

Read Version

Since: base-2.1

Instance details

Defined in Data.Version

Show Version

Since: base-2.1

Instance details

Defined in Data.Version

Generic Version 
Instance details

Defined in Data.Version

Associated Types

type Rep Version :: Type -> Type #

Methods

from :: Version -> Rep Version x #

to :: Rep Version x -> Version #

Arbitrary Version

Generates Version with non-empty non-negative versionBranch, and empty versionTags

Instance details

Defined in Test.QuickCheck.Arbitrary

CoArbitrary Version 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Version -> Gen b -> Gen b #

Hashable Version 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Version -> Int #

hash :: Version -> Int #

ToJSON Version 
Instance details

Defined in Data.Aeson.Types.ToJSON

ToJSONKey Version 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Version 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Version 
Instance details

Defined in Data.Aeson.Types.FromJSON

Binary Version

Since: 0.8.0.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Version -> Put #

get :: Get Version #

putList :: [Version] -> Put #

NFData Version

Since: deepseq-1.3.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Version -> () #

type Rep Version

Since: base-4.9.0.0

Instance details

Defined in Data.Version

type Rep Version = D1 (MetaData "Version" "Data.Version" "base" False) (C1 (MetaCons "Version" PrefixI True) (S1 (MetaSel (Just "versionBranch") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Int]) :*: S1 (MetaSel (Just "versionTags") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])))
type Item Version 
Instance details

Defined in GHC.Exts

liftM :: Monad m => (a1 -> r) -> m a1 -> m r #

Promote a function to a monad.

local #

Arguments

:: MonadReader r m 
=> (r -> r)

The function to modify the environment.

-> m a

Reader to run in the modified environment.

-> m a 

Executes a computation in a modified environment.

ask :: MonadReader r m => m r #

Retrieves the monad environment.

data ByteString #

A space-efficient representation of a Word8 vector, supporting many efficient operations.

A ByteString contains 8-bit bytes, or by using the operations from Data.ByteString.Char8 it can be interpreted as containing 8-bit characters.

Instances
Eq ByteString 
Instance details

Defined in Data.ByteString.Internal

Data ByteString 
Instance details

Defined in Data.ByteString.Internal

Methods

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

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

toConstr :: ByteString -> Constr #

dataTypeOf :: ByteString -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord ByteString 
Instance details

Defined in Data.ByteString.Internal

Read ByteString 
Instance details

Defined in Data.ByteString.Internal

Show ByteString 
Instance details

Defined in Data.ByteString.Internal

IsString ByteString 
Instance details

Defined in Data.ByteString.Internal

Semigroup ByteString 
Instance details

Defined in Data.ByteString.Internal

Monoid ByteString 
Instance details

Defined in Data.ByteString.Internal

Hashable ByteString 
Instance details

Defined in Data.Hashable.Class

Chunk ByteString 
Instance details

Defined in Data.Attoparsec.Internal.Types

Associated Types

type ChunkElem ByteString :: Type #

Binary ByteString 
Instance details

Defined in Data.Binary.Class

NFData ByteString 
Instance details

Defined in Data.ByteString.Internal

Methods

rnf :: ByteString -> () #

Ixed ByteString 
Instance details

Defined in Control.Lens.At

AsEmpty ByteString 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' ByteString () #

Reversing ByteString 
Instance details

Defined in Control.Lens.Internal.Iso

SemiSequence ByteString 
Instance details

Defined in Data.Sequences

Associated Types

type Index ByteString :: Type #

IsSequence ByteString 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element ByteString] -> ByteString #

lengthIndex :: ByteString -> Index ByteString #

break :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

span :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

dropWhile :: (Element ByteString -> Bool) -> ByteString -> ByteString #

takeWhile :: (Element ByteString -> Bool) -> ByteString -> ByteString #

splitAt :: Index ByteString -> ByteString -> (ByteString, ByteString) #

unsafeSplitAt :: Index ByteString -> ByteString -> (ByteString, ByteString) #

take :: Index ByteString -> ByteString -> ByteString #

unsafeTake :: Index ByteString -> ByteString -> ByteString #

drop :: Index ByteString -> ByteString -> ByteString #

unsafeDrop :: Index ByteString -> ByteString -> ByteString #

dropEnd :: Index ByteString -> ByteString -> ByteString #

partition :: (Element ByteString -> Bool) -> ByteString -> (ByteString, ByteString) #

uncons :: ByteString -> Maybe (Element ByteString, ByteString) #

unsnoc :: ByteString -> Maybe (ByteString, Element ByteString) #

filter :: (Element ByteString -> Bool) -> ByteString -> ByteString #

filterM :: Monad m => (Element ByteString -> m Bool) -> ByteString -> m ByteString #

replicate :: Index ByteString -> Element ByteString -> ByteString #

replicateM :: Monad m => Index ByteString -> m (Element ByteString) -> m ByteString #

groupBy :: (Element ByteString -> Element ByteString -> Bool) -> ByteString -> [ByteString] #

groupAllOn :: Eq b => (Element ByteString -> b) -> ByteString -> [ByteString] #

subsequences :: ByteString -> [ByteString] #

permutations :: ByteString -> [ByteString] #

tailEx :: ByteString -> ByteString #

tailMay :: ByteString -> Maybe ByteString #

initEx :: ByteString -> ByteString #

initMay :: ByteString -> Maybe ByteString #

unsafeTail :: ByteString -> ByteString #

unsafeInit :: ByteString -> ByteString #

index :: ByteString -> Index ByteString -> Maybe (Element ByteString) #

indexEx :: ByteString -> Index ByteString -> Element ByteString #

unsafeIndex :: ByteString -> Index ByteString -> Element ByteString #

splitWhen :: (Element ByteString -> Bool) -> ByteString -> [ByteString] #

MonoFunctor ByteString 
Instance details

Defined in Data.MonoTraversable

MonoFoldable ByteString 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element ByteString -> m) -> ByteString -> m #

ofoldr :: (Element ByteString -> b -> b) -> b -> ByteString -> b #

ofoldl' :: (a -> Element ByteString -> a) -> a -> ByteString -> a #

otoList :: ByteString -> [Element ByteString] #

oall :: (Element ByteString -> Bool) -> ByteString -> Bool #

oany :: (Element ByteString -> Bool) -> ByteString -> Bool #

onull :: ByteString -> Bool #

olength :: ByteString -> Int #

olength64 :: ByteString -> Int64 #

ocompareLength :: Integral i => ByteString -> i -> Ordering #

otraverse_ :: Applicative f => (Element ByteString -> f b) -> ByteString -> f () #

ofor_ :: Applicative f => ByteString -> (Element ByteString -> f b) -> f () #

omapM_ :: Applicative m => (Element ByteString -> m ()) -> ByteString -> m () #

oforM_ :: Applicative m => ByteString -> (Element ByteString -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element ByteString -> m a) -> a -> ByteString -> m a #

ofoldMap1Ex :: Semigroup m => (Element ByteString -> m) -> ByteString -> m #

ofoldr1Ex :: (Element ByteString -> Element ByteString -> Element ByteString) -> ByteString -> Element ByteString #

ofoldl1Ex' :: (Element ByteString -> Element ByteString -> Element ByteString) -> ByteString -> Element ByteString #

headEx :: ByteString -> Element ByteString #

lastEx :: ByteString -> Element ByteString #

unsafeHead :: ByteString -> Element ByteString #

unsafeLast :: ByteString -> Element ByteString #

maximumByEx :: (Element ByteString -> Element ByteString -> Ordering) -> ByteString -> Element ByteString #

minimumByEx :: (Element ByteString -> Element ByteString -> Ordering) -> ByteString -> Element ByteString #

oelem :: Element ByteString -> ByteString -> Bool #

onotElem :: Element ByteString -> ByteString -> Bool #

MonoTraversable ByteString 
Instance details

Defined in Data.MonoTraversable

MonoPointed ByteString 
Instance details

Defined in Data.MonoTraversable

GrowingAppend ByteString 
Instance details

Defined in Data.MonoTraversable

CmdString ByteString 
Instance details

Defined in Development.Shake.Command

Methods

cmdString :: (Str, Str -> ByteString)

Textual ByteString Source #

Convert a ByteString with UTF-8 encoded string to Text

Since: 0.5.67

Instance details

Defined in B9.Text

Strict ByteString ByteString 
Instance details

Defined in Control.Lens.Iso

LazySequence ByteString ByteString 
Instance details

Defined in Data.Sequences

Utf8 Text ByteString 
Instance details

Defined in Data.Sequences

Monad m => Stream ByteString m Char 
Instance details

Defined in Text.Parsec.Prim

Methods

uncons :: ByteString -> m (Maybe (Char, ByteString)) #

(a ~ Word8, b ~ Word8) => Each ByteString ByteString a b
each :: Traversal ByteString ByteString Word8 Word8
Instance details

Defined in Control.Lens.Each

Cons ByteString ByteString Word8 Word8 
Instance details

Defined in Control.Lens.Cons

Snoc ByteString ByteString Word8 Word8 
Instance details

Defined in Control.Lens.Cons

type State ByteString 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State ByteString = Buffer
type ChunkElem ByteString 
Instance details

Defined in Data.Attoparsec.Internal.Types

type Index ByteString 
Instance details

Defined in Control.Lens.At

type IxValue ByteString 
Instance details

Defined in Control.Lens.At

type Index ByteString 
Instance details

Defined in Data.Sequences

type Element ByteString 
Instance details

Defined in Data.MonoTraversable

(<$>) :: Functor f => (a -> b) -> f a -> f b infixl 4 #

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)

data Text #

A space efficient, packed, unboxed Unicode text type.

Instances
Hashable Text 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Text -> Int #

hash :: Text -> Int #

ToJSON Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

KeyValue Object

Constructs a singleton HashMap. For calling functions that demand an Object for constructing objects. To be used in conjunction with mconcat. Prefer to use object where possible.

Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

(.=) :: ToJSON v => Text -> v -> Object #

KeyValue Pair 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

(.=) :: ToJSON v => Text -> v -> Pair #

ToJSONKey Text 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

FromJSONKey Text 
Instance details

Defined in Data.Aeson.Types.FromJSON

Chunk Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

Associated Types

type ChunkElem Text :: Type #

Ixed Text 
Instance details

Defined in Control.Lens.At

AsEmpty Text 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' Text () #

Reversing Text 
Instance details

Defined in Control.Lens.Internal.Iso

Methods

reversing :: Text -> Text #

SemiSequence Text 
Instance details

Defined in Data.Sequences

Associated Types

type Index Text :: Type #

IsSequence Text 
Instance details

Defined in Data.Sequences

Methods

fromList :: [Element Text] -> Text #

lengthIndex :: Text -> Index Text #

break :: (Element Text -> Bool) -> Text -> (Text, Text) #

span :: (Element Text -> Bool) -> Text -> (Text, Text) #

dropWhile :: (Element Text -> Bool) -> Text -> Text #

takeWhile :: (Element Text -> Bool) -> Text -> Text #

splitAt :: Index Text -> Text -> (Text, Text) #

unsafeSplitAt :: Index Text -> Text -> (Text, Text) #

take :: Index Text -> Text -> Text #

unsafeTake :: Index Text -> Text -> Text #

drop :: Index Text -> Text -> Text #

unsafeDrop :: Index Text -> Text -> Text #

dropEnd :: Index Text -> Text -> Text #

partition :: (Element Text -> Bool) -> Text -> (Text, Text) #

uncons :: Text -> Maybe (Element Text, Text) #

unsnoc :: Text -> Maybe (Text, Element Text) #

filter :: (Element Text -> Bool) -> Text -> Text #

filterM :: Monad m => (Element Text -> m Bool) -> Text -> m Text #

replicate :: Index Text -> Element Text -> Text #

replicateM :: Monad m => Index Text -> m (Element Text) -> m Text #

groupBy :: (Element Text -> Element Text -> Bool) -> Text -> [Text] #

groupAllOn :: Eq b => (Element Text -> b) -> Text -> [Text] #

subsequences :: Text -> [Text] #

permutations :: Text -> [Text] #

tailEx :: Text -> Text #

tailMay :: Text -> Maybe Text #

initEx :: Text -> Text #

initMay :: Text -> Maybe Text #

unsafeTail :: Text -> Text #

unsafeInit :: Text -> Text #

index :: Text -> Index Text -> Maybe (Element Text) #

indexEx :: Text -> Index Text -> Element Text #

unsafeIndex :: Text -> Index Text -> Element Text #

splitWhen :: (Element Text -> Bool) -> Text -> [Text] #

Textual Text 
Instance details

Defined in Data.Sequences

Methods

words :: Text -> [Text] #

unwords :: (Element seq ~ Text, MonoFoldable seq) => seq -> Text #

lines :: Text -> [Text] #

unlines :: (Element seq ~ Text, MonoFoldable seq) => seq -> Text #

toLower :: Text -> Text #

toUpper :: Text -> Text #

toCaseFold :: Text -> Text #

breakWord :: Text -> (Text, Text) #

breakLine :: Text -> (Text, Text) #

MonoFunctor Text 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element Text -> Element Text) -> Text -> Text #

MonoFoldable Text 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m => (Element Text -> m) -> Text -> m #

ofoldr :: (Element Text -> b -> b) -> b -> Text -> b #

ofoldl' :: (a -> Element Text -> a) -> a -> Text -> a #

otoList :: Text -> [Element Text] #

oall :: (Element Text -> Bool) -> Text -> Bool #

oany :: (Element Text -> Bool) -> Text -> Bool #

onull :: Text -> Bool #

olength :: Text -> Int #

olength64 :: Text -> Int64 #

ocompareLength :: Integral i => Text -> i -> Ordering #

otraverse_ :: Applicative f => (Element Text -> f b) -> Text -> f () #

ofor_ :: Applicative f => Text -> (Element Text -> f b) -> f () #

omapM_ :: Applicative m => (Element Text -> m ()) -> Text -> m () #

oforM_ :: Applicative m => Text -> (Element Text -> m ()) -> m () #

ofoldlM :: Monad m => (a -> Element Text -> m a) -> a -> Text -> m a #

ofoldMap1Ex :: Semigroup m => (Element Text -> m) -> Text -> m #

ofoldr1Ex :: (Element Text -> Element Text -> Element Text) -> Text -> Element Text #

ofoldl1Ex' :: (Element Text -> Element Text -> Element Text) -> Text -> Element Text #

headEx :: Text -> Element Text #

lastEx :: Text -> Element Text #

unsafeHead :: Text -> Element Text #

unsafeLast :: Text -> Element Text #

maximumByEx :: (Element Text -> Element Text -> Ordering) -> Text -> Element Text #

minimumByEx :: (Element Text -> Element Text -> Ordering) -> Text -> Element Text #

oelem :: Element Text -> Text -> Bool #

onotElem :: Element Text -> Text -> Bool #

MonoTraversable Text 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element Text -> f (Element Text)) -> Text -> f Text #

omapM :: Applicative m => (Element Text -> m (Element Text)) -> Text -> m Text #

MonoPointed Text 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element Text -> Text #

GrowingAppend Text 
Instance details

Defined in Data.MonoTraversable

PrettyVal Text 
Instance details

Defined in Text.Show.PrettyVal

Methods

prettyVal :: Text -> Value #

listValue :: [Text] -> Value

Textual Text Source # 
Instance details

Defined in B9.Text

Strict Text Text 
Instance details

Defined in Control.Lens.Iso

Methods

strict :: Iso' Text Text0 #

LazySequence Text Text 
Instance details

Defined in Data.Sequences

Utf8 Text ByteString 
Instance details

Defined in Data.Sequences

Monad m => Stream Text m Char 
Instance details

Defined in Text.Parsec.Prim

Methods

uncons :: Text -> m (Maybe (Char, Text)) #

(a ~ Char, b ~ Char) => Each Text Text a b
each :: Traversal Text Text Char Char
Instance details

Defined in Control.Lens.Each

Methods

each :: Traversal Text Text a b #

Cons Text Text Char Char 
Instance details

Defined in Control.Lens.Cons

Methods

_Cons :: Prism Text Text (Char, Text) (Char, Text) #

Snoc Text Text Char Char 
Instance details

Defined in Control.Lens.Cons

Methods

_Snoc :: Prism Text Text (Text, Char) (Text, Char) #

FromPairs Value (DList Pair) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

fromPairs :: DList Pair -> Value

v ~ Value => KeyValuePair v (DList Pair) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

pair :: String -> v -> DList Pair

type State Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

type State Text = Buffer
type ChunkElem Text 
Instance details

Defined in Data.Attoparsec.Internal.Types

type Item Text 
Instance details

Defined in Data.Text

type Item Text = Char
type Index Text 
Instance details

Defined in Control.Lens.At

type Index Text = Int
type IxValue Text 
Instance details

Defined in Control.Lens.At

type Index Text 
Instance details

Defined in Data.Sequences

type Index Text = Int
type Element Text 
Instance details

Defined in Data.MonoTraversable

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

A monoid on applicative functors.

If defined, some and many should be the least solutions of the equations:

Minimal complete definition

empty, (<|>)

Methods

empty :: f a #

The identity of <|>

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

An associative binary operation

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

One or more.

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

Zero or more.

Instances
Alternative []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: [a] #

(<|>) :: [a] -> [a] -> [a] #

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

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

Alternative Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

empty :: Maybe a #

(<|>) :: Maybe a -> Maybe a -> Maybe a #

some :: Maybe a -> Maybe [a] #

many :: Maybe a -> Maybe [a] #

Alternative IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

empty :: IO a #

(<|>) :: IO a -> IO a -> IO a #

some :: IO a -> IO [a] #

many :: IO a -> IO [a] #

Alternative IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

empty :: IResult a #

(<|>) :: IResult a -> IResult a -> IResult a #

some :: IResult a -> IResult [a] #

many :: IResult a -> IResult [a] #

Alternative Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

empty :: Result a #

(<|>) :: Result a -> Result a -> Result a #

some :: Result a -> Result [a] #

many :: Result a -> Result [a] #

Alternative Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

empty :: Parser a #

(<|>) :: Parser a -> Parser a -> Parser a #

some :: Parser a -> Parser [a] #

many :: Parser a -> Parser [a] #

Alternative Concurrently 
Instance details

Defined in Control.Concurrent.Async

Alternative Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

empty :: Option a #

(<|>) :: Option a -> Option a -> Option a #

some :: Option a -> Option [a] #

many :: Option a -> Option [a] #

Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

Methods

empty :: ZipList a #

(<|>) :: ZipList a -> ZipList a -> ZipList a #

some :: ZipList a -> ZipList [a] #

many :: ZipList a -> ZipList [a] #

Alternative STM

Since: base-4.8.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

empty :: STM a #

(<|>) :: STM a -> STM a -> STM a #

some :: STM a -> STM [a] #

many :: STM a -> STM [a] #

Alternative ReadPrec

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

empty :: ReadPrec a #

(<|>) :: ReadPrec a -> ReadPrec a -> ReadPrec a #

some :: ReadPrec a -> ReadPrec [a] #

many :: ReadPrec a -> ReadPrec [a] #

Alternative ReadP

Since: base-4.6.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: ReadP a #

(<|>) :: ReadP a -> ReadP a -> ReadP a #

some :: ReadP a -> ReadP [a] #

many :: ReadP a -> ReadP [a] #

Alternative Get

Since: 0.7.0.0

Instance details

Defined in Data.Binary.Get.Internal

Methods

empty :: Get a #

(<|>) :: Get a -> Get a -> Get a #

some :: Get a -> Get [a] #

many :: Get a -> Get [a] #

Alternative Seq

Since: containers-0.5.4

Instance details

Defined in Data.Sequence.Internal

Methods

empty :: Seq a #

(<|>) :: Seq a -> Seq a -> Seq a #

some :: Seq a -> Seq [a] #

many :: Seq a -> Seq [a] #

Alternative DList 
Instance details

Defined in Data.DList

Methods

empty :: DList a #

(<|>) :: DList a -> DList a -> DList a #

some :: DList a -> DList [a] #

many :: DList a -> DList [a] #

Alternative Vector 
Instance details

Defined in Data.Vector

Methods

empty :: Vector a #

(<|>) :: Vector a -> Vector a -> Vector a #

some :: Vector a -> Vector [a] #

many :: Vector a -> Vector [a] #

Alternative SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

Alternative Array 
Instance details

Defined in Data.Primitive.Array

Methods

empty :: Array a #

(<|>) :: Array a -> Array a -> Array a #

some :: Array a -> Array [a] #

many :: Array a -> Array [a] #

Alternative P

Since: base-4.5.0.0

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

empty :: P a #

(<|>) :: P a -> P a -> P a #

some :: P a -> P [a] #

many :: P a -> P [a] #

Alternative (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: U1 a #

(<|>) :: U1 a -> U1 a -> U1 a #

some :: U1 a -> U1 [a] #

many :: U1 a -> U1 [a] #

Alternative (Parser i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

empty :: Parser i a #

(<|>) :: Parser i a -> Parser i a -> Parser i a #

some :: Parser i a -> Parser i [a] #

many :: Parser i a -> Parser i [a] #

MonadPlus m => Alternative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedMonad m a #

(<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a #

some :: WrappedMonad m a -> WrappedMonad m [a] #

many :: WrappedMonad m a -> WrappedMonad m [a] #

ArrowPlus a => Alternative (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

empty :: ArrowMonad a a0 #

(<|>) :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

some :: ArrowMonad a a0 -> ArrowMonad a [a0] #

many :: ArrowMonad a a0 -> ArrowMonad a [a0] #

Alternative (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

empty :: Proxy a #

(<|>) :: Proxy a -> Proxy a -> Proxy a #

some :: Proxy a -> Proxy [a] #

many :: Proxy a -> Proxy [a] #

(Functor m, Monad m) => Alternative (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

empty :: MaybeT m a #

(<|>) :: MaybeT m a -> MaybeT m a -> MaybeT m a #

some :: MaybeT m a -> MaybeT m [a] #

many :: MaybeT m a -> MaybeT m [a] #

Alternative m => Alternative (ResourceT m)

Since 1.1.5

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

empty :: ResourceT m a #

(<|>) :: ResourceT m a -> ResourceT m a -> ResourceT m a #

some :: ResourceT m a -> ResourceT m [a] #

many :: ResourceT m a -> ResourceT m [a] #

Alternative v => Alternative (Free v)

This violates the Alternative laws, handle with care.

Instance details

Defined in Control.Monad.Free

Methods

empty :: Free v a #

(<|>) :: Free v a -> Free v a -> Free v a #

some :: Free v a -> Free v [a] #

many :: Free v a -> Free v [a] #

Alternative f => Alternative (Yoneda f) 
Instance details

Defined in Data.Functor.Yoneda

Methods

empty :: Yoneda f a #

(<|>) :: Yoneda f a -> Yoneda f a -> Yoneda f a #

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

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

Alternative (ReifiedFold s) 
Instance details

Defined in Control.Lens.Reified

Methods

empty :: ReifiedFold s a #

(<|>) :: ReifiedFold s a -> ReifiedFold s a -> ReifiedFold s a #

some :: ReifiedFold s a -> ReifiedFold s [a] #

many :: ReifiedFold s a -> ReifiedFold s [a] #

Applicative m => Alternative (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

empty :: ListT m a #

(<|>) :: ListT m a -> ListT m a -> ListT m a #

some :: ListT m a -> ListT m [a] #

many :: ListT m a -> ListT m [a] #

Alternative f => Alternative (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: Rec1 f a #

(<|>) :: Rec1 f a -> Rec1 f a -> Rec1 f a #

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

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

(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedArrow a b a0 #

(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Alternative f => Alternative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

empty :: Ap f a #

(<|>) :: Ap f a -> Ap f a -> Ap f a #

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

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

Alternative f => Alternative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

empty :: Alt f a #

(<|>) :: Alt f a -> Alt f a -> Alt f a #

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

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

Alternative m => Alternative (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

empty :: IdentityT m a #

(<|>) :: IdentityT m a -> IdentityT m a -> IdentityT m a #

some :: IdentityT m a -> IdentityT m [a] #

many :: IdentityT m a -> IdentityT m [a] #

(Monoid w, Alternative m) => Alternative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

(Monoid w, Alternative m) => Alternative (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

empty :: WriterT w m a #

(<|>) :: WriterT w m a -> WriterT w m a -> WriterT w m a #

some :: WriterT w m a -> WriterT w m [a] #

many :: WriterT w m a -> WriterT w m [a] #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

empty :: StateT s m a #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a #

some :: StateT s m a -> StateT s m [a] #

many :: StateT s m a -> StateT s m [a] #

(Functor m, MonadPlus m) => Alternative (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

empty :: StateT s m a #

(<|>) :: StateT s m a -> StateT s m a -> StateT s m a #

some :: StateT s m a -> StateT s m [a] #

many :: StateT s m a -> StateT s m [a] #

(Functor m, Monad m, Monoid e) => Alternative (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

empty :: ExceptT e m a #

(<|>) :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

some :: ExceptT e m a -> ExceptT e m [a] #

many :: ExceptT e m a -> ExceptT e m [a] #

(Functor f, MonadPlus m) => Alternative (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

empty :: FreeT f m a #

(<|>) :: FreeT f m a -> FreeT f m a -> FreeT f m a #

some :: FreeT f m a -> FreeT f m [a] #

many :: FreeT f m a -> FreeT f m [a] #

(Functor m, Monad m, Error e) => Alternative (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

empty :: ErrorT e m a #

(<|>) :: ErrorT e m a -> ErrorT e m a -> ErrorT e m a #

some :: ErrorT e m a -> ErrorT e m [a] #

many :: ErrorT e m a -> ErrorT e m [a] #

(Monoid w, Functor m, MonadPlus m) => Alternative (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

empty :: AccumT w m a #

(<|>) :: AccumT w m a -> AccumT w m a -> AccumT w m a #

some :: AccumT w m a -> AccumT w m [a] #

many :: AccumT w m a -> AccumT w m [a] #

(Functor m, MonadPlus m) => Alternative (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

empty :: SelectT r m a #

(<|>) :: SelectT r m a -> SelectT r m a -> SelectT r m a #

some :: SelectT r m a -> SelectT r m [a] #

many :: SelectT r m a -> SelectT r m [a] #

(Alternative f, Alternative g) => Alternative (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :*: g) a #

(<|>) :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

some :: (f :*: g) a -> (f :*: g) [a] #

many :: (f :*: g) a -> (f :*: g) [a] #

(Alternative f, Alternative g) => Alternative (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

empty :: Product f g a #

(<|>) :: Product f g a -> Product f g a -> Product f g a #

some :: Product f g a -> Product f g [a] #

many :: Product f g a -> Product f g [a] #

Alternative m => Alternative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

empty :: ReaderT r m a #

(<|>) :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

some :: ReaderT r m a -> ReaderT r m [a] #

many :: ReaderT r m a -> ReaderT r m [a] #

Alternative (ParsecT s u m) 
Instance details

Defined in Text.Parsec.Prim

Methods

empty :: ParsecT s u m a #

(<|>) :: ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a #

some :: ParsecT s u m a -> ParsecT s u m [a] #

many :: ParsecT s u m a -> ParsecT s u m [a] #

Alternative f => Alternative (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: M1 i c f a #

(<|>) :: M1 i c f a -> M1 i c f a -> M1 i c f a #

some :: M1 i c f a -> M1 i c f [a] #

many :: M1 i c f a -> M1 i c f [a] #

(Alternative f, Applicative g) => Alternative (f :.: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

empty :: (f :.: g) a #

(<|>) :: (f :.: g) a -> (f :.: g) a -> (f :.: g) a #

some :: (f :.: g) a -> (f :.: g) [a] #

many :: (f :.: g) a -> (f :.: g) [a] #

(Alternative f, Applicative g) => Alternative (Compose f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Compose

Methods

empty :: Compose f g a #

(<|>) :: Compose f g a -> Compose f g a -> Compose f g a #

some :: Compose f g a -> Compose f g [a] #

many :: Compose f g a -> Compose f g [a] #

(Monoid w, Functor m, MonadPlus m) => Alternative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

empty :: RWST r w s m a #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

some :: RWST r w s m a -> RWST r w s m [a] #

many :: RWST r w s m a -> RWST r w s m [a] #

(Monoid w, Functor m, MonadPlus m) => Alternative (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

empty :: RWST r w s m a #

(<|>) :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

some :: RWST r w s m a -> RWST r w s m [a] #

many :: RWST r w s m a -> RWST r w s m [a] #

class (Alternative m, Monad m) => MonadPlus (m :: Type -> Type) where #

Monads that also support choice and failure.

Minimal complete definition

Nothing

Methods

mzero :: m a #

The identity of mplus. It should also satisfy the equations

mzero >>= f  =  mzero
v >> mzero   =  mzero

The default definition is

mzero = empty

mplus :: m a -> m a -> m a #

An associative operation. The default definition is

mplus = (<|>)
Instances
MonadPlus []

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: [a] #

mplus :: [a] -> [a] -> [a] #

MonadPlus Maybe

Since: base-2.1

Instance details

Defined in GHC.Base

Methods

mzero :: Maybe a #

mplus :: Maybe a -> Maybe a -> Maybe a #

MonadPlus IO

Since: base-4.9.0.0

Instance details

Defined in GHC.Base

Methods

mzero :: IO a #

mplus :: IO a -> IO a -> IO a #

MonadPlus IResult 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mzero :: IResult a #

mplus :: IResult a -> IResult a -> IResult a #

MonadPlus Result 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mzero :: Result a #

mplus :: Result a -> Result a -> Result a #

MonadPlus Parser 
Instance details

Defined in Data.Aeson.Types.Internal

Methods

mzero :: Parser a #

mplus :: Parser a -> Parser a -> Parser a #

MonadPlus Option

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup

Methods

mzero :: Option a #

mplus :: Option a -> Option a -> Option a #

MonadPlus STM

Since: base-4.3.0.0

Instance details

Defined in GHC.Conc.Sync

Methods

mzero :: STM a #

mplus :: STM a -> STM a -> STM a #

MonadPlus ReadPrec

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadPrec

Methods

mzero :: ReadPrec a #

mplus :: ReadPrec a -> ReadPrec a -> ReadPrec a #

MonadPlus ReadP

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: ReadP a #

mplus :: ReadP a -> ReadP a -> ReadP a #

MonadPlus Get

Since: 0.7.1.0

Instance details

Defined in Data.Binary.Get.Internal

Methods

mzero :: Get a #

mplus :: Get a -> Get a -> Get a #

MonadPlus Seq 
Instance details

Defined in Data.Sequence.Internal

Methods

mzero :: Seq a #

mplus :: Seq a -> Seq a -> Seq a #

MonadPlus DList 
Instance details

Defined in Data.DList

Methods

mzero :: DList a #

mplus :: DList a -> DList a -> DList a #

MonadPlus Vector 
Instance details

Defined in Data.Vector

Methods

mzero :: Vector a #

mplus :: Vector a -> Vector a -> Vector a #

MonadPlus SmallArray 
Instance details

Defined in Data.Primitive.SmallArray

MonadPlus Array 
Instance details

Defined in Data.Primitive.Array

Methods

mzero :: Array a #

mplus :: Array a -> Array a -> Array a #

MonadPlus P

Since: base-2.1

Instance details

Defined in Text.ParserCombinators.ReadP

Methods

mzero :: P a #

mplus :: P a -> P a -> P a #

MonadPlus (U1 :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: U1 a #

mplus :: U1 a -> U1 a -> U1 a #

MonadPlus (Parser i) 
Instance details

Defined in Data.Attoparsec.Internal.Types

Methods

mzero :: Parser i a #

mplus :: Parser i a -> Parser i a -> Parser i a #

(ArrowApply a, ArrowPlus a) => MonadPlus (ArrowMonad a)

Since: base-4.6.0.0

Instance details

Defined in Control.Arrow

Methods

mzero :: ArrowMonad a a0 #

mplus :: ArrowMonad a a0 -> ArrowMonad a a0 -> ArrowMonad a a0 #

MonadPlus (Proxy :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Proxy

Methods

mzero :: Proxy a #

mplus :: Proxy a -> Proxy a -> Proxy a #

Monad m => MonadPlus (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

mzero :: MaybeT m a #

mplus :: MaybeT m a -> MaybeT m a -> MaybeT m a #

MonadPlus m => MonadPlus (ResourceT m)

Since 1.1.5

Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

mzero :: ResourceT m a #

mplus :: ResourceT m a -> ResourceT m a -> ResourceT m a #

(Functor v, MonadPlus v) => MonadPlus (Free v)

This violates the MonadPlus laws, handle with care.

Instance details

Defined in Control.Monad.Free

Methods

mzero :: Free v a #

mplus :: Free v a -> Free v a -> Free v a #

MonadPlus m => MonadPlus (Yoneda m) 
Instance details

Defined in Data.Functor.Yoneda

Methods

mzero :: Yoneda m a #

mplus :: Yoneda m a -> Yoneda m a -> Yoneda m a #

MonadPlus (ReifiedFold s) 
Instance details

Defined in Control.Lens.Reified

Methods

mzero :: ReifiedFold s a #

mplus :: ReifiedFold s a -> ReifiedFold s a -> ReifiedFold s a #

Monad m => MonadPlus (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

mzero :: ListT m a #

mplus :: ListT m a -> ListT m a -> ListT m a #

MonadPlus f => MonadPlus (Rec1 f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: Rec1 f a #

mplus :: Rec1 f a -> Rec1 f a -> Rec1 f a #

MonadPlus f => MonadPlus (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mzero :: Ap f a #

mplus :: Ap f a -> Ap f a -> Ap f a #

MonadPlus f => MonadPlus (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mzero :: Alt f a #

mplus :: Alt f a -> Alt f a -> Alt f a #

MonadPlus m => MonadPlus (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

mzero :: IdentityT m a #

mplus :: IdentityT m a -> IdentityT m a -> IdentityT m a #

(Monoid w, MonadPlus m) => MonadPlus (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

(Monoid w, MonadPlus m) => MonadPlus (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

mzero :: WriterT w m a #

mplus :: WriterT w m a -> WriterT w m a -> WriterT w m a #

MonadPlus m => MonadPlus (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

mzero :: StateT s m a #

mplus :: StateT s m a -> StateT s m a -> StateT s m a #

MonadPlus m => MonadPlus (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

mzero :: StateT s m a #

mplus :: StateT s m a -> StateT s m a -> StateT s m a #

(Monad m, Monoid e) => MonadPlus (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

mzero :: ExceptT e m a #

mplus :: ExceptT e m a -> ExceptT e m a -> ExceptT e m a #

(Functor f, MonadPlus m) => MonadPlus (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

mzero :: FreeT f m a #

mplus :: FreeT f m a -> FreeT f m a -> FreeT f m a #

(Monad m, Error e) => MonadPlus (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

mzero :: ErrorT e m a #

mplus :: ErrorT e m a -> ErrorT e m a -> ErrorT e m a #

(Monoid w, Functor m, MonadPlus m) => MonadPlus (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

mzero :: AccumT w m a #

mplus :: AccumT w m a -> AccumT w m a -> AccumT w m a #

MonadPlus m => MonadPlus (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

mzero :: SelectT r m a #

mplus :: SelectT r m a -> SelectT r m a -> SelectT r m a #

(MonadPlus f, MonadPlus g) => MonadPlus (f :*: g)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: (f :*: g) a #

mplus :: (f :*: g) a -> (f :*: g) a -> (f :*: g) a #

(MonadPlus f, MonadPlus g) => MonadPlus (Product f g)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Product

Methods

mzero :: Product f g a #

mplus :: Product f g a -> Product f g a -> Product f g a #

MonadPlus m => MonadPlus (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzero :: ReaderT r m a #

mplus :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

MonadPlus (ParsecT s u m) 
Instance details

Defined in Text.Parsec.Prim

Methods

mzero :: ParsecT s u m a #

mplus :: ParsecT s u m a -> ParsecT s u m a -> ParsecT s u m a #

MonadPlus f => MonadPlus (M1 i c f)

Since: base-4.9.0.0

Instance details

Defined in GHC.Generics

Methods

mzero :: M1 i c f a #

mplus :: M1 i c f a -> M1 i c f a -> M1 i c f a #

(Monoid w, MonadPlus m) => MonadPlus (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

mzero :: RWST r w s m a #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

(Monoid w, MonadPlus m) => MonadPlus (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

mzero :: RWST r w s m a #

mplus :: RWST r w s m a -> RWST r w s m a -> RWST r w s m a #

class Monad m => MonadIO (m :: Type -> Type) where #

Monads in which IO computations may be embedded. Any monad built by applying a sequence of monad transformers to the IO monad will be an instance of this class.

Instances should satisfy the following laws, which state that liftIO is a transformer of monads:

Methods

liftIO :: IO a -> m a #

Lift a computation from the IO monad.

Instances
MonadIO IO

Since: base-4.9.0.0

Instance details

Defined in Control.Monad.IO.Class

Methods

liftIO :: IO a -> IO a #

MonadIO Q 
Instance details

Defined in Language.Haskell.TH.Syntax

Methods

liftIO :: IO a -> Q a #

MonadIO Rules 
Instance details

Defined in Development.Shake.Internal.Core.Rules

Methods

liftIO :: IO a -> Rules a #

MonadIO Action 
Instance details

Defined in Development.Shake.Internal.Core.Types

Methods

liftIO :: IO a -> Action a #

MonadIO m => MonadIO (MaybeT m) 
Instance details

Defined in Control.Monad.Trans.Maybe

Methods

liftIO :: IO a -> MaybeT m a #

MonadIO m => MonadIO (ResourceT m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftIO :: IO a -> ResourceT m a #

(MonadIO m, Lifted m r) => MonadIO (Eff r) 
Instance details

Defined in Control.Eff.Internal

Methods

liftIO :: IO a -> Eff r a #

MonadIO m => MonadIO (ListT m) 
Instance details

Defined in Control.Monad.Trans.List

Methods

liftIO :: IO a -> ListT m a #

MonadIO m => MonadIO (IdentityT m) 
Instance details

Defined in Control.Monad.Trans.Identity

Methods

liftIO :: IO a -> IdentityT m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Strict

Methods

liftIO :: IO a -> WriterT w m a #

(Monoid w, MonadIO m) => MonadIO (WriterT w m) 
Instance details

Defined in Control.Monad.Trans.Writer.Lazy

Methods

liftIO :: IO a -> WriterT w m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Strict

Methods

liftIO :: IO a -> StateT s m a #

MonadIO m => MonadIO (StateT s m) 
Instance details

Defined in Control.Monad.Trans.State.Lazy

Methods

liftIO :: IO a -> StateT s m a #

MonadIO m => MonadIO (ExceptT e m) 
Instance details

Defined in Control.Monad.Trans.Except

Methods

liftIO :: IO a -> ExceptT e m a #

(Functor f, MonadIO m) => MonadIO (FreeT f m) 
Instance details

Defined in Control.Monad.Trans.Free

Methods

liftIO :: IO a -> FreeT f m a #

(Error e, MonadIO m) => MonadIO (ErrorT e m) 
Instance details

Defined in Control.Monad.Trans.Error

Methods

liftIO :: IO a -> ErrorT e m a #

MonadIO (RAW ro rw) 
Instance details

Defined in Development.Shake.Internal.Core.Monad

Methods

liftIO :: IO a -> RAW ro rw a #

(Monoid w, Functor m, MonadIO m) => MonadIO (AccumT w m) 
Instance details

Defined in Control.Monad.Trans.Accum

Methods

liftIO :: IO a -> AccumT w m a #

MonadIO m => MonadIO (SelectT r m) 
Instance details

Defined in Control.Monad.Trans.Select

Methods

liftIO :: IO a -> SelectT r m a #

MonadIO m => MonadIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a #

MonadIO m => MonadIO (ConduitT i o m) 
Instance details

Defined in Data.Conduit.Internal.Conduit

Methods

liftIO :: IO a -> ConduitT i o m a #

MonadIO m => MonadIO (ContT r m) 
Instance details

Defined in Control.Monad.Trans.Cont

Methods

liftIO :: IO a -> ContT r m a #

MonadIO m => MonadIO (ParsecT s u m) 
Instance details

Defined in Text.Parsec.Prim

Methods

liftIO :: IO a -> ParsecT s u m a #

(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Strict

Methods

liftIO :: IO a -> RWST r w s m a #

(Monoid w, MonadIO m) => MonadIO (RWST r w s m) 
Instance details

Defined in Control.Monad.Trans.RWS.Lazy

Methods

liftIO :: IO a -> RWST r w s m a #

MonadIO m => MonadIO (Pipe l i o u m) 
Instance details

Defined in Data.Conduit.Internal.Pipe

Methods

liftIO :: IO a -> Pipe l i o u m a #

exitWith :: ExitCode -> IO a #

Computation exitWith code throws ExitCode code. Normally this terminates the program, returning code to the program's caller.

On program termination, the standard Handles stdout and stderr are flushed automatically; any other buffered Handles need to be flushed manually, otherwise the buffered data will be discarded.

A program that fails in any other way is treated as if it had called exitFailure. A program that terminates successfully without calling exitWith explicitly is treated as if it had called exitWith ExitSuccess.

As an ExitCode is not an IOException, exitWith bypasses the error handling in the IO monad and cannot be intercepted by catch from the Prelude. However it is a SomeException, and can be caught using the functions of Control.Exception. This means that cleanup computations added with bracket (from Control.Exception) are also executed properly on exitWith.

Note: in GHC, exitWith should be called from the main program thread in order to exit the process. When called from another thread, exitWith will throw an ExitException as normal, but the exception will not cause the process itself to exit.

printf :: PrintfType r => String -> r #

Format a variable number of arguments with the C-style formatting string.

>>> printf "%s, %d, %.4f" "hello" 123 pi
hello, 123, 3.1416

The return value is either String or (IO a) (which should be (IO '()'), but Haskell's type system makes this hard).

The format string consists of ordinary characters and conversion specifications, which specify how to format one of the arguments to printf in the output string. A format specification is introduced by the % character; this character can be self-escaped into the format string using %%. A format specification ends with a /format character/ that provides the primary information about how to format the value. The rest of the conversion specification is optional. In order, one may have flag characters, a width specifier, a precision specifier, and type-specific modifier characters.

Unlike C printf(3), the formatting of this printf is driven by the argument type; formatting is type specific. The types formatted by printf "out of the box" are:

printf is also extensible to support other types: see below.

A conversion specification begins with the character %, followed by zero or more of the following flags:

-      left adjust (default is right adjust)
+      always use a sign (+ or -) for signed conversions
space  leading space for positive numbers in signed conversions
0      pad with zeros rather than spaces
#      use an \"alternate form\": see below

When both flags are given, - overrides 0 and + overrides space. A negative width specifier in a * conversion is treated as positive but implies the left adjust flag.

The "alternate form" for unsigned radix conversions is as in C printf(3):

%o           prefix with a leading 0 if needed
%x           prefix with a leading 0x if nonzero
%X           prefix with a leading 0X if nonzero
%b           prefix with a leading 0b if nonzero
%[eEfFgG]    ensure that the number contains a decimal point

Any flags are followed optionally by a field width:

num    field width
*      as num, but taken from argument list

The field width is a minimum, not a maximum: it will be expanded as needed to avoid mutilating a value.

Any field width is followed optionally by a precision:

.num   precision
.      same as .0
.*     as num, but taken from argument list

Negative precision is taken as 0. The meaning of the precision depends on the conversion type.

Integral    minimum number of digits to show
RealFloat   number of digits after the decimal point
String      maximum number of characters

The precision for Integral types is accomplished by zero-padding. If both precision and zero-pad are given for an Integral field, the zero-pad is ignored.

Any precision is followed optionally for Integral types by a width modifier; the only use of this modifier being to set the implicit size of the operand for conversion of a negative operand to unsigned:

hh     Int8
h      Int16
l      Int32
ll     Int64
L      Int64

The specification ends with a format character:

c      character               Integral
d      decimal                 Integral
o      octal                   Integral
x      hexadecimal             Integral
X      hexadecimal             Integral
b      binary                  Integral
u      unsigned decimal        Integral
f      floating point          RealFloat
F      floating point          RealFloat
g      general format float    RealFloat
G      general format float    RealFloat
e      exponent format float   RealFloat
E      exponent format float   RealFloat
s      string                  String
v      default format          any type

The "%v" specifier is provided for all built-in types, and should be provided for user-defined type formatters as well. It picks a "best" representation for the given type. For the built-in types the "%v" specifier is converted as follows:

c      Char
u      other unsigned Integral
d      other signed Integral
g      RealFloat
s      String

Mismatch between the argument types and the format string, as well as any other syntactic or semantic errors in the format string, will cause an exception to be thrown at runtime.

Note that the formatting for RealFloat types is currently a bit different from that of C printf(3), conforming instead to showEFloat, showFFloat and showGFloat (and their alternate versions showFFloatAlt and showGFloatAlt). This is hard to fix: the fixed versions would format in a backward-incompatible way. In any case the Haskell behavior is generally more sensible than the C behavior. A brief summary of some key differences:

  • Haskell printf never uses the default "6-digit" precision used by C printf.
  • Haskell printf treats the "precision" specifier as indicating the number of digits after the decimal point.
  • Haskell printf prints the exponent of e-format numbers without a gratuitous plus sign, and with the minimum possible number of digits.
  • Haskell printf will place a zero after a decimal point when possible.

mfilter :: MonadPlus m => (a -> Bool) -> m a -> m a #

Direct MonadPlus equivalent of filter.

Examples

Expand

The filter function is just mfilter specialized to the list monad:

filter = ( mfilter :: (a -> Bool) -> [a] -> [a] )

An example using mfilter with the Maybe monad:

>>> mfilter odd (Just 1)
Just 1
>>> mfilter odd (Just 2)
Nothing

(<$!>) :: Monad m => (a -> b) -> m a -> m b infixl 4 #

Strict version of <$>.

Since: base-4.8.0.0

unless :: Applicative f => Bool -> f () -> f () #

The reverse of when.

replicateM_ :: Applicative m => Int -> m a -> m () #

Like replicateM, but discards the result.

replicateM :: Applicative m => Int -> m a -> m [a] #

replicateM n act performs the action n times, gathering the results.

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

Like foldM, but discards the result.

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

The foldM function is analogous to foldl, except that its result is encapsulated in a monad. Note that foldM works from left-to-right over the list arguments. This could be an issue where (>>) and the `folded function' are not commutative.

foldM f a1 [x1, x2, ..., xm]

==

do
  a2 <- f a1 x1
  a3 <- f a2 x2
  ...
  f am xm

If right-to-left evaluation is required, the input list should be reversed.

Note: foldM is the same as foldlM

zipWithM_ :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m () #

zipWithM_ is the extension of zipWithM which ignores the final result.

zipWithM :: Applicative m => (a -> b -> m c) -> [a] -> [b] -> m [c] #

The zipWithM function generalizes zipWith to arbitrary applicative functors.

mapAndUnzipM :: Applicative m => (a -> m (b, c)) -> [a] -> m ([b], [c]) #

The mapAndUnzipM function maps its first argument over a list, returning the result as a pair of lists. This function is mainly used with complicated data structures or a state-transforming monad.

forever :: Applicative f => f a -> f b #

Repeat an action indefinitely.

Examples

Expand

A common use of forever is to process input from network sockets, Handles, and channels (e.g. MVar and Chan).

For example, here is how we might implement an echo server, using forever both to listen for client connections on a network socket and to echo client input on client connection handles:

echoServer :: Socket -> IO ()
echoServer socket = forever $ do
  client <- accept socket
  forkFinally (echo client) (\_ -> hClose client)
  where
    echo :: Handle -> IO ()
    echo client = forever $
      hGetLine client >>= hPutStrLn client

(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c infixr 1 #

Right-to-left composition of Kleisli arrows. (>=>), with the arguments flipped.

Note how this operator resembles function composition (.):

(.)   ::            (b ->   c) -> (a ->   b) -> a ->   c
(<=<) :: Monad m => (b -> m c) -> (a -> m b) -> a -> m c

(>=>) :: Monad m => (a -> m b) -> (b -> m c) -> a -> m c infixr 1 #

Left-to-right composition of Kleisli arrows.

filterM :: Applicative m => (a -> m Bool) -> [a] -> m [a] #

This generalizes the list-based filter function.

makeVersion :: [Int] -> Version #

Construct tag-less Version

Since: base-4.8.0.0

parseVersion :: ReadP Version #

A parser for versions in the format produced by showVersion.

showVersion :: Version -> String #

Provides one possible concrete representation for Version. For a version with versionBranch = [1,2,3] and versionTags = ["tag1","tag2"], the output will be 1.2.3-tag1-tag2.

isSubsequenceOf :: Eq a => [a] -> [a] -> Bool #

The isSubsequenceOf function takes two lists and returns True if all the elements of the first list occur, in order, in the second. The elements do not have to occur consecutively.

isSubsequenceOf x y is equivalent to elem x (subsequences y).

Examples

Expand
>>> isSubsequenceOf "GHC" "The Glorious Haskell Compiler"
True
>>> isSubsequenceOf ['a','d'..'z'] ['a'..'z']
True
>>> isSubsequenceOf [1..10] [10,9..0]
False

Since: base-4.8.0.0

mapAccumR :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) #

The mapAccumR function behaves like a combination of fmap and foldr; it applies a function to each element of a structure, passing an accumulating parameter from right to left, and returning a final value of this accumulator together with the new structure.

mapAccumL :: Traversable t => (a -> b -> (a, c)) -> a -> t b -> (a, t c) #

The mapAccumL function behaves like a combination of fmap and foldl; it applies a function to each element of a structure, passing an accumulating parameter from left to right, and returning a final value of this accumulator together with the new structure.

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

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

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

One or none.

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

Constructors

WrapMonad 

Fields

Instances
Monad m => Monad (WrappedMonad m)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(>>=) :: WrappedMonad m a -> (a -> WrappedMonad m b) -> WrappedMonad m b #

(>>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

return :: a -> WrappedMonad m a #

fail :: String -> WrappedMonad m a #

Monad m => Functor (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

(<$) :: a -> WrappedMonad m b -> WrappedMonad m a #

Monad m => Applicative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a -> WrappedMonad m a #

(<*>) :: WrappedMonad m (a -> b) -> WrappedMonad m a -> WrappedMonad m b #

liftA2 :: (a -> b -> c) -> WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m c #

(*>) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m b #

(<*) :: WrappedMonad m a -> WrappedMonad m b -> WrappedMonad m a #

MonadPlus m => Alternative (WrappedMonad m)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedMonad m a #

(<|>) :: WrappedMonad m a -> WrappedMonad m a -> WrappedMonad m a #

some :: WrappedMonad m a -> WrappedMonad m [a] #

many :: WrappedMonad m a -> WrappedMonad m [a] #

Generic1 (WrappedMonad m :: Type -> Type) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 (WrappedMonad m) :: k -> Type #

Methods

from1 :: WrappedMonad m a -> Rep1 (WrappedMonad m) a #

to1 :: Rep1 (WrappedMonad m) a -> WrappedMonad m a #

Generic (WrappedMonad m a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedMonad m a) :: Type -> Type #

Methods

from :: WrappedMonad m a -> Rep (WrappedMonad m a) x #

to :: Rep (WrappedMonad m a) x -> WrappedMonad m a #

Arbitrary (m a) => Arbitrary (WrappedMonad m a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (WrappedMonad m a) #

shrink :: WrappedMonad m a -> [WrappedMonad m a] #

Wrapped (WrappedMonad m a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (WrappedMonad m a) :: Type #

Monad m => MonoFunctor (WrappedMonad m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (WrappedMonad m a) -> Element (WrappedMonad m a)) -> WrappedMonad m a -> WrappedMonad m a #

Monad m => MonoPointed (WrappedMonad m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (WrappedMonad m a) -> WrappedMonad m a #

t ~ WrappedMonad m' a' => Rewrapped (WrappedMonad m a) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep1 (WrappedMonad m :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined 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)

Since: base-4.7.0.0

Instance details

Defined 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))))
type Unwrapped (WrappedMonad m a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (WrappedMonad m a) = m a
type Element (WrappedMonad m a) 
Instance details

Defined in Data.MonoTraversable

type Element (WrappedMonad m a) = a

newtype WrappedArrow (a :: Type -> Type -> Type) b c #

Constructors

WrapArrow 

Fields

Instances
Generic1 (WrappedArrow a b :: Type -> Type) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 (WrappedArrow a b) :: k -> Type #

Methods

from1 :: WrappedArrow a b a0 -> Rep1 (WrappedArrow a b) a0 #

to1 :: Rep1 (WrappedArrow a b) a0 -> WrappedArrow a b a0 #

Arrow a => Functor (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

(<$) :: a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

Arrow a => Applicative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

pure :: a0 -> WrappedArrow a b a0 #

(<*>) :: WrappedArrow a b (a0 -> b0) -> WrappedArrow a b a0 -> WrappedArrow a b b0 #

liftA2 :: (a0 -> b0 -> c) -> WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b c #

(*>) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b b0 #

(<*) :: WrappedArrow a b a0 -> WrappedArrow a b b0 -> WrappedArrow a b a0 #

(ArrowZero a, ArrowPlus a) => Alternative (WrappedArrow a b)

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

empty :: WrappedArrow a b a0 #

(<|>) :: WrappedArrow a b a0 -> WrappedArrow a b a0 -> WrappedArrow a b a0 #

some :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

many :: WrappedArrow a b a0 -> WrappedArrow a b [a0] #

Generic (WrappedArrow a b c) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (WrappedArrow a b c) :: Type -> Type #

Methods

from :: WrappedArrow a b c -> Rep (WrappedArrow a b c) x #

to :: Rep (WrappedArrow a b c) x -> WrappedArrow a b c #

Arbitrary (a b c) => Arbitrary (WrappedArrow a b c) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (WrappedArrow a b c) #

shrink :: WrappedArrow a b c -> [WrappedArrow a b c] #

Wrapped (WrappedArrow a b c) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (WrappedArrow a b c) :: Type #

Methods

_Wrapped' :: Iso' (WrappedArrow a b c) (Unwrapped (WrappedArrow a b c)) #

Arrow a => MonoFunctor (WrappedArrow a b c) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (WrappedArrow a b c) -> Element (WrappedArrow a b c)) -> WrappedArrow a b c -> WrappedArrow a b c #

Arrow a => MonoPointed (WrappedArrow a b c) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (WrappedArrow a b c) -> WrappedArrow a b c #

t ~ WrappedArrow a' b' c' => Rewrapped (WrappedArrow a b c) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep1 (WrappedArrow a b :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined 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)

Since: base-4.7.0.0

Instance details

Defined 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))))
type Unwrapped (WrappedArrow a b c) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (WrappedArrow a b c) = a b c
type Element (WrappedArrow a b c) 
Instance details

Defined in Data.MonoTraversable

type Element (WrappedArrow a b c) = c

newtype ZipList a #

Lists, but with an Applicative functor based on zipping.

Constructors

ZipList 

Fields

Instances
Functor ZipList

Since: base-2.1

Instance details

Defined in Control.Applicative

Methods

fmap :: (a -> b) -> ZipList a -> ZipList b #

(<$) :: a -> ZipList b -> ZipList a #

Applicative ZipList
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 details

Defined in Control.Applicative

Methods

pure :: a -> ZipList a #

(<*>) :: ZipList (a -> b) -> ZipList a -> ZipList b #

liftA2 :: (a -> b -> c) -> ZipList a -> ZipList b -> ZipList c #

(*>) :: ZipList a -> ZipList b -> ZipList b #

(<*) :: ZipList a -> ZipList b -> ZipList a #

Foldable ZipList

Since: base-4.9.0.0

Instance details

Defined in Control.Applicative

Methods

fold :: Monoid m => ZipList m -> m #

foldMap :: Monoid m => (a -> m) -> ZipList a -> m #

foldr :: (a -> b -> b) -> b -> ZipList a -> b #

foldr' :: (a -> b -> b) -> b -> ZipList a -> b #

foldl :: (b -> a -> b) -> b -> ZipList a -> b #

foldl' :: (b -> a -> b) -> b -> ZipList a -> b #

foldr1 :: (a -> a -> a) -> ZipList a -> a #

foldl1 :: (a -> a -> a) -> ZipList a -> a #

toList :: ZipList a -> [a] #

null :: ZipList a -> Bool #

length :: ZipList a -> Int #

elem :: Eq a => a -> ZipList a -> Bool #

maximum :: Ord a => ZipList a -> a #

minimum :: Ord a => ZipList a -> a #

sum :: Num a => ZipList a -> a #

product :: Num a => ZipList a -> a #

Traversable ZipList

Since: base-4.9.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> ZipList a -> f (ZipList b) #

sequenceA :: Applicative f => ZipList (f a) -> f (ZipList a) #

mapM :: Monad m => (a -> m b) -> ZipList a -> m (ZipList b) #

sequence :: Monad m => ZipList (m a) -> m (ZipList a) #

Arbitrary1 ZipList 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a -> Gen (ZipList a) #

liftShrink :: (a -> [a]) -> ZipList a -> [ZipList a] #

Alternative ZipList

Since: base-4.11.0.0

Instance details

Defined in Control.Applicative

Methods

empty :: ZipList a #

(<|>) :: ZipList a -> ZipList a -> ZipList a #

some :: ZipList a -> ZipList [a] #

many :: ZipList a -> ZipList [a] #

NFData1 ZipList

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> ZipList a -> () #

FunctorWithIndex Int ZipList

Same instance as for [].

Instance details

Defined in Control.Lens.Indexed

Methods

imap :: (Int -> a -> b) -> ZipList a -> ZipList b #

imapped :: IndexedSetter Int (ZipList a) (ZipList b) a b #

FoldableWithIndex Int ZipList 
Instance details

Defined in Control.Lens.Indexed

Methods

ifoldMap :: Monoid m => (Int -> a -> m) -> ZipList a -> m #

ifolded :: IndexedFold Int (ZipList a) a #

ifoldr :: (Int -> a -> b -> b) -> b -> ZipList a -> b #

ifoldl :: (Int -> b -> a -> b) -> b -> ZipList a -> b #

ifoldr' :: (Int -> a -> b -> b) -> b -> ZipList a -> b #

ifoldl' :: (Int -> b -> a -> b) -> b -> ZipList a -> b #

TraversableWithIndex Int ZipList 
Instance details

Defined in Control.Lens.Indexed

Methods

itraverse :: Applicative f => (Int -> a -> f b) -> ZipList a -> f (ZipList b) #

itraversed :: IndexedTraversal Int (ZipList a) (ZipList b) a b #

Eq a => Eq (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

(==) :: ZipList a -> ZipList a -> Bool #

(/=) :: ZipList a -> ZipList a -> Bool #

Ord a => Ord (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

compare :: ZipList a -> ZipList a -> Ordering #

(<) :: ZipList a -> ZipList a -> Bool #

(<=) :: ZipList a -> ZipList a -> Bool #

(>) :: ZipList a -> ZipList a -> Bool #

(>=) :: ZipList a -> ZipList a -> Bool #

max :: ZipList a -> ZipList a -> ZipList a #

min :: ZipList a -> ZipList a -> ZipList a #

Read a => Read (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Show a => Show (ZipList a)

Since: base-4.7.0.0

Instance details

Defined in Control.Applicative

Methods

showsPrec :: Int -> ZipList a -> ShowS #

show :: ZipList a -> String #

showList :: [ZipList a] -> ShowS #

Generic (ZipList a) 
Instance details

Defined in Control.Applicative

Associated Types

type Rep (ZipList a) :: Type -> Type #

Methods

from :: ZipList a -> Rep (ZipList a) x #

to :: Rep (ZipList a) x -> ZipList a #

Arbitrary a => Arbitrary (ZipList a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (ZipList a) #

shrink :: ZipList a -> [ZipList a] #

CoArbitrary a => CoArbitrary (ZipList a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: ZipList a -> Gen b -> Gen b #

NFData a => NFData (ZipList a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ZipList a -> () #

Wrapped (ZipList a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (ZipList a) :: Type #

Methods

_Wrapped' :: Iso' (ZipList a) (Unwrapped (ZipList a)) #

AsEmpty (ZipList a) 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' (ZipList a) () #

MonoFunctor (ZipList a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (ZipList a) -> Element (ZipList a)) -> ZipList a -> ZipList a #

MonoPointed (ZipList a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (ZipList a) -> ZipList a #

Generic1 ZipList 
Instance details

Defined in Control.Applicative

Associated Types

type Rep1 ZipList :: k -> Type #

Methods

from1 :: ZipList a -> Rep1 ZipList a #

to1 :: Rep1 ZipList a -> ZipList a #

t ~ ZipList b => Rewrapped (ZipList a) t 
Instance details

Defined in Control.Lens.Wrapped

Cons (ZipList a) (ZipList b) a b 
Instance details

Defined in Control.Lens.Cons

Methods

_Cons :: Prism (ZipList a) (ZipList b) (a, ZipList a) (b, ZipList b) #

Snoc (ZipList a) (ZipList b) a b 
Instance details

Defined in Control.Lens.Cons

Methods

_Snoc :: Prism (ZipList a) (ZipList b) (ZipList a, a) (ZipList b, b) #

type Rep (ZipList a)

Since: base-4.7.0.0

Instance details

Defined 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 Unwrapped (ZipList a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (ZipList a) = [a]
type Element (ZipList a) 
Instance details

Defined in Data.MonoTraversable

type Element (ZipList a) = a
type Rep1 ZipList

Since: base-4.7.0.0

Instance details

Defined 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 [])))

data ExitCode #

Defines the exit codes that a program can return.

Constructors

ExitSuccess

indicates successful termination;

ExitFailure Int

indicates program failure with an exit code. The exact interpretation of the code is operating-system dependent. In particular, some values may be prohibited (e.g. 0 on a POSIX-compliant system).

Instances
Eq ExitCode 
Instance details

Defined in GHC.IO.Exception

Ord ExitCode 
Instance details

Defined in GHC.IO.Exception

Read ExitCode 
Instance details

Defined in GHC.IO.Exception

Show ExitCode 
Instance details

Defined in GHC.IO.Exception

Generic ExitCode 
Instance details

Defined in GHC.IO.Exception

Associated Types

type Rep ExitCode :: Type -> Type #

Methods

from :: ExitCode -> Rep ExitCode x #

to :: Rep ExitCode x -> ExitCode #

Arbitrary ExitCode 
Instance details

Defined in Test.QuickCheck.Arbitrary

Exception ExitCode

Since: base-4.1.0.0

Instance details

Defined in GHC.IO.Exception

NFData ExitCode

Since: deepseq-1.4.2.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: ExitCode -> () #

CmdResult ExitCode 
Instance details

Defined in Development.Shake.Command

Methods

cmdResult :: ([Result], [Result] -> ExitCode)

type Rep ExitCode 
Instance details

Defined in GHC.IO.Exception

type Rep ExitCode = D1 (MetaData "ExitCode" "GHC.IO.Exception" "base" False) (C1 (MetaCons "ExitSuccess" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ExitFailure" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

newtype Const a (b :: k) :: forall k. Type -> k -> Type #

The Const functor.

Constructors

Const 

Fields

Instances
Generic1 (Const a :: k -> Type) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep1 (Const a) :: k -> Type #

Methods

from1 :: Const a a0 -> Rep1 (Const a) a0 #

to1 :: Rep1 (Const a) a0 -> Const a a0 #

Arbitrary2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary2 :: Gen a -> Gen b -> Gen (Const a b) #

liftShrink2 :: (a -> [a]) -> (b -> [b]) -> Const a b -> [Const a b] #

ToJSON2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON2 :: (a -> Value) -> ([a] -> Value) -> (b -> Value) -> ([b] -> Value) -> Const a b -> Value #

liftToJSONList2 :: (a -> Value) -> ([a] -> Value) -> (b -> Value) -> ([b] -> Value) -> [Const a b] -> Value #

liftToEncoding2 :: (a -> Encoding) -> ([a] -> Encoding) -> (b -> Encoding) -> ([b] -> Encoding) -> Const a b -> Encoding #

liftToEncodingList2 :: (a -> Encoding) -> ([a] -> Encoding) -> (b -> Encoding) -> ([b] -> Encoding) -> [Const a b] -> Encoding #

FromJSON2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON2 :: (Value -> Parser a) -> (Value -> Parser [a]) -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser (Const a b) #

liftParseJSONList2 :: (Value -> Parser a) -> (Value -> Parser [a]) -> (Value -> Parser b) -> (Value -> Parser [b]) -> Value -> Parser [Const a b] #

Bifunctor (Const :: Type -> Type -> Type)

Since: base-4.8.0.0

Instance details

Defined in Data.Bifunctor

Methods

bimap :: (a -> b) -> (c -> d) -> Const a c -> Const b d #

first :: (a -> b) -> Const a c -> Const b c #

second :: (b -> c) -> Const a b -> Const a c #

Eq2 (Const :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq2 :: (a -> b -> Bool) -> (c -> d -> Bool) -> Const a c -> Const b d -> Bool #

Ord2 (Const :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare2 :: (a -> b -> Ordering) -> (c -> d -> Ordering) -> Const a c -> Const b d -> Ordering #

Read2 (Const :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> Int -> ReadS (Const a b) #

liftReadList2 :: (Int -> ReadS a) -> ReadS [a] -> (Int -> ReadS b) -> ReadS [b] -> ReadS [Const a b] #

liftReadPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec (Const a b) #

liftReadListPrec2 :: ReadPrec a -> ReadPrec [a] -> ReadPrec b -> ReadPrec [b] -> ReadPrec [Const a b] #

Show2 (Const :: Type -> Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> Int -> Const a b -> ShowS #

liftShowList2 :: (Int -> a -> ShowS) -> ([a] -> ShowS) -> (Int -> b -> ShowS) -> ([b] -> ShowS) -> [Const a b] -> ShowS #

Biapplicative (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Biapplicative

Methods

bipure :: a -> b -> Const a b #

(<<*>>) :: Const (a -> b) (c -> d) -> Const a c -> Const b d #

biliftA2 :: (a -> b -> c) -> (d -> e -> f) -> Const a d -> Const b e -> Const c f #

(*>>) :: Const a b -> Const c d -> Const c d #

(<<*) :: Const a b -> Const c d -> Const a b #

NFData2 (Const :: Type -> Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf2 :: (a -> ()) -> (b -> ()) -> Const a b -> () #

Hashable2 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt2 :: (Int -> a -> Int) -> (Int -> b -> Int) -> Int -> Const a b -> Int #

Bitraversable1 (Const :: Type -> Type -> Type) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

bitraverse1 :: Apply f => (a -> f b) -> (c -> f d) -> Const a c -> f (Const b d) #

bisequence1 :: Apply f => Const (f a) (f b) -> f (Const a b) #

Functor (Const m :: Type -> Type)

Since: base-2.1

Instance details

Defined in Data.Functor.Const

Methods

fmap :: (a -> b) -> Const m a -> Const m b #

(<$) :: a -> Const m b -> Const m a #

Monoid m => Applicative (Const m :: Type -> Type)

Since: base-2.0.1

Instance details

Defined in Data.Functor.Const

Methods

pure :: a -> Const m a #

(<*>) :: Const m (a -> b) -> Const m a -> Const m b #

liftA2 :: (a -> b -> c) -> Const m a -> Const m b -> Const m c #

(*>) :: Const m a -> Const m b -> Const m b #

(<*) :: Const m a -> Const m b -> Const m a #

Foldable (Const m :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Functor.Const

Methods

fold :: Monoid m0 => Const m m0 -> m0 #

foldMap :: Monoid m0 => (a -> m0) -> Const m a -> m0 #

foldr :: (a -> b -> b) -> b -> Const m a -> b #

foldr' :: (a -> b -> b) -> b -> Const m a -> b #

foldl :: (b -> a -> b) -> b -> Const m a -> b #

foldl' :: (b -> a -> b) -> b -> Const m a -> b #

foldr1 :: (a -> a -> a) -> Const m a -> a #

foldl1 :: (a -> a -> a) -> Const m a -> a #

toList :: Const m a -> [a] #

null :: Const m a -> Bool #

length :: Const m a -> Int #

elem :: Eq a => a -> Const m a -> Bool #

maximum :: Ord a => Const m a -> a #

minimum :: Ord a => Const m a -> a #

sum :: Num a => Const m a -> a #

product :: Num a => Const m a -> a #

Traversable (Const m :: Type -> Type)

Since: base-4.7.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Const m a -> f (Const m b) #

sequenceA :: Applicative f => Const m (f a) -> f (Const m a) #

mapM :: Monad m0 => (a -> m0 b) -> Const m a -> m0 (Const m b) #

sequence :: Monad m0 => Const m (m0 a) -> m0 (Const m a) #

Arbitrary a => Arbitrary1 (Const a :: Type -> Type) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

liftArbitrary :: Gen a0 -> Gen (Const a a0) #

liftShrink :: (a0 -> [a0]) -> Const a a0 -> [Const a a0] #

Contravariant (Const a :: Type -> Type) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a0 -> b) -> Const a b -> Const a a0 #

(>$) :: b -> Const a b -> Const a a0 #

ToJSON a => ToJSON1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a0 -> Value) -> ([a0] -> Value) -> Const a a0 -> Value #

liftToJSONList :: (a0 -> Value) -> ([a0] -> Value) -> [Const a a0] -> Value #

liftToEncoding :: (a0 -> Encoding) -> ([a0] -> Encoding) -> Const a a0 -> Encoding #

liftToEncodingList :: (a0 -> Encoding) -> ([a0] -> Encoding) -> [Const a a0] -> Encoding #

FromJSON a => FromJSON1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser (Const a a0) #

liftParseJSONList :: (Value -> Parser a0) -> (Value -> Parser [a0]) -> Value -> Parser [Const a a0] #

Eq a => Eq1 (Const a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftEq :: (a0 -> b -> Bool) -> Const a a0 -> Const a b -> Bool #

Ord a => Ord1 (Const a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftCompare :: (a0 -> b -> Ordering) -> Const a a0 -> Const a b -> Ordering #

Read a => Read1 (Const a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftReadsPrec :: (Int -> ReadS a0) -> ReadS [a0] -> Int -> ReadS (Const a a0) #

liftReadList :: (Int -> ReadS a0) -> ReadS [a0] -> ReadS [Const a a0] #

liftReadPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec (Const a a0) #

liftReadListPrec :: ReadPrec a0 -> ReadPrec [a0] -> ReadPrec [Const a a0] #

Show a => Show1 (Const a :: Type -> Type)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Classes

Methods

liftShowsPrec :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> Int -> Const a a0 -> ShowS #

liftShowList :: (Int -> a0 -> ShowS) -> ([a0] -> ShowS) -> [Const a a0] -> ShowS #

NFData a => NFData1 (Const a :: Type -> Type)

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a0 -> ()) -> Const a a0 -> () #

Hashable a => Hashable1 (Const a :: Type -> Type) 
Instance details

Defined in Data.Hashable.Class

Methods

liftHashWithSalt :: (Int -> a0 -> Int) -> Int -> Const a a0 -> Int #

Bounded a => Bounded (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

minBound :: Const a b #

maxBound :: Const a b #

Enum a => Enum (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

succ :: Const a b -> Const a b #

pred :: Const a b -> Const a b #

toEnum :: Int -> Const a b #

fromEnum :: Const a b -> Int #

enumFrom :: Const a b -> [Const a b] #

enumFromThen :: Const a b -> Const a b -> [Const a b] #

enumFromTo :: Const a b -> Const a b -> [Const a b] #

enumFromThenTo :: Const a b -> Const a b -> Const a b -> [Const a b] #

Eq a => Eq (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(==) :: Const a b -> Const a b -> Bool #

(/=) :: Const a b -> Const a b -> Bool #

Floating a => Floating (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

pi :: Const a b #

exp :: Const a b -> Const a b #

log :: Const a b -> Const a b #

sqrt :: Const a b -> Const a b #

(**) :: Const a b -> Const a b -> Const a b #

logBase :: Const a b -> Const a b -> Const a b #

sin :: Const a b -> Const a b #

cos :: Const a b -> Const a b #

tan :: Const a b -> Const a b #

asin :: Const a b -> Const a b #

acos :: Const a b -> Const a b #

atan :: Const a b -> Const a b #

sinh :: Const a b -> Const a b #

cosh :: Const a b -> Const a b #

tanh :: Const a b -> Const a b #

asinh :: Const a b -> Const a b #

acosh :: Const a b -> Const a b #

atanh :: Const a b -> Const a b #

log1p :: Const a b -> Const a b #

expm1 :: Const a b -> Const a b #

log1pexp :: Const a b -> Const a b #

log1mexp :: Const a b -> Const a b #

Fractional a => Fractional (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(/) :: Const a b -> Const a b -> Const a b #

recip :: Const a b -> Const a b #

fromRational :: Rational -> Const a b #

Integral a => Integral (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

quot :: Const a b -> Const a b -> Const a b #

rem :: Const a b -> Const a b -> Const a b #

div :: Const a b -> Const a b -> Const a b #

mod :: Const a b -> Const a b -> Const a b #

quotRem :: Const a b -> Const a b -> (Const a b, Const a b) #

divMod :: Const a b -> Const a b -> (Const a b, Const a b) #

toInteger :: Const a b -> Integer #

(Typeable k, Data a, Typeable b) => Data (Const a b)

Since: base-4.10.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b0. Data d => c (d -> b0) -> d -> c b0) -> (forall g. g -> c g) -> Const a b -> c (Const a b) #

gunfold :: (forall b0 r. Data b0 => c (b0 -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Const a b) #

toConstr :: Const a b -> Constr #

dataTypeOf :: Const a b -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Const a b)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Const a b)) #

gmapT :: (forall b0. Data b0 => b0 -> b0) -> Const a b -> Const a b #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Const a b -> r #

gmapQ :: (forall d. Data d => d -> u) -> Const a b -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Const a b -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Const a b -> m (Const a b) #

Num a => Num (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(+) :: Const a b -> Const a b -> Const a b #

(-) :: Const a b -> Const a b -> Const a b #

(*) :: Const a b -> Const a b -> Const a b #

negate :: Const a b -> Const a b #

abs :: Const a b -> Const a b #

signum :: Const a b -> Const a b #

fromInteger :: Integer -> Const a b #

Ord a => Ord (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

compare :: Const a b -> Const a b -> Ordering #

(<) :: Const a b -> Const a b -> Bool #

(<=) :: Const a b -> Const a b -> Bool #

(>) :: Const a b -> Const a b -> Bool #

(>=) :: Const a b -> Const a b -> Bool #

max :: Const a b -> Const a b -> Const a b #

min :: Const a b -> Const a b -> Const a b #

Read a => Read (Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the runConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Real a => Real (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

toRational :: Const a b -> Rational #

RealFloat a => RealFloat (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

floatRadix :: Const a b -> Integer #

floatDigits :: Const a b -> Int #

floatRange :: Const a b -> (Int, Int) #

decodeFloat :: Const a b -> (Integer, Int) #

encodeFloat :: Integer -> Int -> Const a b #

exponent :: Const a b -> Int #

significand :: Const a b -> Const a b #

scaleFloat :: Int -> Const a b -> Const a b #

isNaN :: Const a b -> Bool #

isInfinite :: Const a b -> Bool #

isDenormalized :: Const a b -> Bool #

isNegativeZero :: Const a b -> Bool #

isIEEE :: Const a b -> Bool #

atan2 :: Const a b -> Const a b -> Const a b #

RealFrac a => RealFrac (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

properFraction :: Integral b0 => Const a b -> (b0, Const a b) #

truncate :: Integral b0 => Const a b -> b0 #

round :: Integral b0 => Const a b -> b0 #

ceiling :: Integral b0 => Const a b -> b0 #

floor :: Integral b0 => Const a b -> b0 #

Show a => Show (Const a b)

This instance would be equivalent to the derived instances of the Const newtype if the runConst field were removed

Since: base-4.8.0.0

Instance details

Defined in Data.Functor.Const

Methods

showsPrec :: Int -> Const a b -> ShowS #

show :: Const a b -> String #

showList :: [Const a b] -> ShowS #

Ix a => Ix (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

range :: (Const a b, Const a b) -> [Const a b] #

index :: (Const a b, Const a b) -> Const a b -> Int #

unsafeIndex :: (Const a b, Const a b) -> Const a b -> Int

inRange :: (Const a b, Const a b) -> Const a b -> Bool #

rangeSize :: (Const a b, Const a b) -> Int #

unsafeRangeSize :: (Const a b, Const a b) -> Int

IsString a => IsString (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.String

Methods

fromString :: String -> Const a b #

Generic (Const a b) 
Instance details

Defined in Data.Functor.Const

Associated Types

type Rep (Const a b) :: Type -> Type #

Methods

from :: Const a b -> Rep (Const a b) x #

to :: Rep (Const a b) x -> Const a b #

Semigroup a => Semigroup (Const a b)

Since: base-4.9.0.0

Instance details

Defined 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 #

Monoid a => Monoid (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

mempty :: Const a b #

mappend :: Const a b -> Const a b -> Const a b #

mconcat :: [Const a b] -> Const a b #

Function a => Function (Const a b) 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Const a b -> b0) -> Const a b :-> b0 #

Arbitrary a => Arbitrary (Const a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Const a b) #

shrink :: Const a b -> [Const a b] #

CoArbitrary a => CoArbitrary (Const a b) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Const a b -> Gen b0 -> Gen b0 #

Hashable a => Hashable (Const a b) 
Instance details

Defined in Data.Hashable.Class

Methods

hashWithSalt :: Int -> Const a b -> Int #

hash :: Const a b -> Int #

ToJSON a => ToJSON (Const a b) 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

toJSON :: Const a b -> Value #

toEncoding :: Const a b -> Encoding #

toJSONList :: [Const a b] -> Value #

toEncodingList :: [Const a b] -> Encoding #

FromJSON a => FromJSON (Const a b) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

parseJSON :: Value -> Parser (Const a b) #

parseJSONList :: Value -> Parser [Const a b] #

Storable a => Storable (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

sizeOf :: Const a b -> Int #

alignment :: Const a b -> Int #

peekElemOff :: Ptr (Const a b) -> Int -> IO (Const a b) #

pokeElemOff :: Ptr (Const a b) -> Int -> Const a b -> IO () #

peekByteOff :: Ptr b0 -> Int -> IO (Const a b) #

pokeByteOff :: Ptr b0 -> Int -> Const a b -> IO () #

peek :: Ptr (Const a b) -> IO (Const a b) #

poke :: Ptr (Const a b) -> Const a b -> IO () #

Bits a => Bits (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

Methods

(.&.) :: Const a b -> Const a b -> Const a b #

(.|.) :: Const a b -> Const a b -> Const a b #

xor :: Const a b -> Const a b -> Const a b #

complement :: Const a b -> Const a b #

shift :: Const a b -> Int -> Const a b #

rotate :: Const a b -> Int -> Const a b #

zeroBits :: Const a b #

bit :: Int -> Const a b #

setBit :: Const a b -> Int -> Const a b #

clearBit :: Const a b -> Int -> Const a b #

complementBit :: Const a b -> Int -> Const a b #

testBit :: Const a b -> Int -> Bool #

bitSizeMaybe :: Const a b -> Maybe Int #

bitSize :: Const a b -> Int #

isSigned :: Const a b -> Bool #

shiftL :: Const a b -> Int -> Const a b #

unsafeShiftL :: Const a b -> Int -> Const a b #

shiftR :: Const a b -> Int -> Const a b #

unsafeShiftR :: Const a b -> Int -> Const a b #

rotateL :: Const a b -> Int -> Const a b #

rotateR :: Const a b -> Int -> Const a b #

popCount :: Const a b -> Int #

FiniteBits a => FiniteBits (Const a b)

Since: base-4.9.0.0

Instance details

Defined in Data.Functor.Const

NFData a => NFData (Const a b)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Const a b -> () #

Wrapped (Const a x) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Const a x) :: Type #

Methods

_Wrapped' :: Iso' (Const a x) (Unwrapped (Const a x)) #

MonoFunctor (Const m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (Const m a) -> Element (Const m a)) -> Const m a -> Const m a #

MonoFoldable (Const m a) 
Instance details

Defined in Data.MonoTraversable

Methods

ofoldMap :: Monoid m0 => (Element (Const m a) -> m0) -> Const m a -> m0 #

ofoldr :: (Element (Const m a) -> b -> b) -> b -> Const m a -> b #

ofoldl' :: (a0 -> Element (Const m a) -> a0) -> a0 -> Const m a -> a0 #

otoList :: Const m a -> [Element (Const m a)] #

oall :: (Element (Const m a) -> Bool) -> Const m a -> Bool #

oany :: (Element (Const m a) -> Bool) -> Const m a -> Bool #

onull :: Const m a -> Bool #

olength :: Const m a -> Int #

olength64 :: Const m a -> Int64 #

ocompareLength :: Integral i => Const m a -> i -> Ordering #

otraverse_ :: Applicative f => (Element (Const m a) -> f b) -> Const m a -> f () #

ofor_ :: Applicative f => Const m a -> (Element (Const m a) -> f b) -> f () #

omapM_ :: Applicative m0 => (Element (Const m a) -> m0 ()) -> Const m a -> m0 () #

oforM_ :: Applicative m0 => Const m a -> (Element (Const m a) -> m0 ()) -> m0 () #

ofoldlM :: Monad m0 => (a0 -> Element (Const m a) -> m0 a0) -> a0 -> Const m a -> m0 a0 #

ofoldMap1Ex :: Semigroup m0 => (Element (Const m a) -> m0) -> Const m a -> m0 #

ofoldr1Ex :: (Element (Const m a) -> Element (Const m a) -> Element (Const m a)) -> Const m a -> Element (Const m a) #

ofoldl1Ex' :: (Element (Const m a) -> Element (Const m a) -> Element (Const m a)) -> Const m a -> Element (Const m a) #

headEx :: Const m a -> Element (Const m a) #

lastEx :: Const m a -> Element (Const m a) #

unsafeHead :: Const m a -> Element (Const m a) #

unsafeLast :: Const m a -> Element (Const m a) #

maximumByEx :: (Element (Const m a) -> Element (Const m a) -> Ordering) -> Const m a -> Element (Const m a) #

minimumByEx :: (Element (Const m a) -> Element (Const m a) -> Ordering) -> Const m a -> Element (Const m a) #

oelem :: Element (Const m a) -> Const m a -> Bool #

onotElem :: Element (Const m a) -> Const m a -> Bool #

MonoTraversable (Const m a) 
Instance details

Defined in Data.MonoTraversable

Methods

otraverse :: Applicative f => (Element (Const m a) -> f (Element (Const m a))) -> Const m a -> f (Const m a) #

omapM :: Applicative m0 => (Element (Const m a) -> m0 (Element (Const m a))) -> Const m a -> m0 (Const m a) #

Monoid m => MonoPointed (Const m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (Const m a) -> Const m a #

t ~ Const a' x' => Rewrapped (Const a x) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep1 (Const a :: k -> Type)

Since: base-4.9.0.0

Instance details

Defined 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)

Since: base-4.9.0.0

Instance details

Defined 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)))
type Unwrapped (Const a x) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Const a x) = a
type Element (Const m a) 
Instance details

Defined in Data.MonoTraversable

type Element (Const m a) = a

find :: Foldable t => (a -> Bool) -> t a -> Maybe a #

The find function takes a predicate and a structure and returns the leftmost element of the structure matching the predicate, or Nothing if there is no such element.

notElem :: (Foldable t, Eq a) => a -> t a -> Bool infix 4 #

notElem is the negation of elem.

minimumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a #

The least element of a non-empty structure with respect to the given comparison function.

maximumBy :: Foldable t => (a -> a -> Ordering) -> t a -> a #

The largest element of a non-empty structure with respect to the given comparison function.

all :: Foldable t => (a -> Bool) -> t a -> Bool #

Determines whether all elements of the structure satisfy the predicate.

any :: Foldable t => (a -> Bool) -> t a -> Bool #

Determines whether any element of the structure satisfies the predicate.

or :: Foldable t => t Bool -> Bool #

or returns the disjunction of a container of Bools. For the result to be False, the container must be finite; True, however, results from a True value finitely far from the left end.

and :: Foldable t => t Bool -> Bool #

and returns the conjunction of a container of Bools. For the result to be True, the container must be finite; False, however, results from a False value finitely far from the left end.

concatMap :: Foldable t => (a -> [b]) -> t a -> [b] #

Map a function over all the elements of a container and concatenate the resulting lists.

concat :: Foldable t => t [a] -> [a] #

The concatenation of all the elements of a container of lists.

msum :: (Foldable t, MonadPlus m) => t (m a) -> m a #

The sum of a collection of actions, generalizing concat. As of base 4.8.0.0, msum is just asum, specialized to MonadPlus.

sequence_ :: (Foldable t, Monad m) => t (m a) -> m () #

Evaluate each monadic action in the structure from left to right, and ignore the results. For a version that doesn't ignore the results see sequence.

As of base 4.8.0.0, sequence_ is just sequenceA_, specialized to Monad.

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

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.

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

Map each element of a structure to a monadic action, evaluate these actions from left to right, and ignore the results. For a version that doesn't ignore the results see mapM.

As of base 4.8.0.0, mapM_ is just traverse_, specialized to Monad.

newtype First a #

Maybe monoid returning the leftmost non-Nothing value.

First a is isomorphic to Alt Maybe a, but precedes it historically.

>>> getFirst (First (Just "hello") <> First Nothing <> First (Just "world"))
Just "hello"

Use of this type is discouraged. Note the following equivalence:

Data.Monoid.First x === Maybe (Data.Semigroup.First x)

In addition to being equivalent in the structural sense, the two also have Monoid instances that behave the same. This type will be marked deprecated in GHC 8.8, and removed in GHC 8.10. Users are advised to use the variant from Data.Semigroup and wrap it in Maybe.

Constructors

First 

Fields

Instances
Monad First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: First a -> (a -> First b) -> First b #

(>>) :: First a -> First b -> First b #

return :: a -> First a #

fail :: String -> First a #

Functor First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> First a -> First b #

(<$) :: a -> First b -> First a #

MonadFix First

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> First a) -> First a #

Applicative First

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> First a #

(<*>) :: First (a -> b) -> First a -> First b #

liftA2 :: (a -> b -> c) -> First a -> First b -> First c #

(*>) :: First a -> First b -> First b #

(<*) :: First a -> First b -> First a #

Foldable First

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => First m -> m #

foldMap :: Monoid m => (a -> m) -> First a -> m #

foldr :: (a -> b -> b) -> b -> First a -> b #

foldr' :: (a -> b -> b) -> b -> First a -> b #

foldl :: (b -> a -> b) -> b -> First a -> b #

foldl' :: (b -> a -> b) -> b -> First a -> b #

foldr1 :: (a -> a -> a) -> First a -> a #

foldl1 :: (a -> a -> a) -> First a -> a #

toList :: First a -> [a] #

null :: First a -> Bool #

length :: First a -> Int #

elem :: Eq a => a -> First a -> Bool #

maximum :: Ord a => First a -> a #

minimum :: Ord a => First a -> a #

sum :: Num a => First a -> a #

product :: Num a => First a -> a #

Traversable First

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> First a -> f (First b) #

sequenceA :: Applicative f => First (f a) -> f (First a) #

mapM :: Monad m => (a -> m b) -> First a -> m (First b) #

sequence :: Monad m => First (m a) -> m (First a) #

ToJSON1 First 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Value) -> ([a] -> Value) -> First a -> Value #

liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [First a] -> Value #

liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> First a -> Encoding #

liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [First a] -> Encoding #

FromJSON1 First 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (First a) #

liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [First a] #

NFData1 First

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> First a -> () #

Eq a => Eq (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

(==) :: First a -> First a -> Bool #

(/=) :: First a -> First a -> Bool #

Data a => Data (First a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> First a -> c (First a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (First a) #

toConstr :: First a -> Constr #

dataTypeOf :: First a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (First a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (First a)) #

gmapT :: (forall b. Data b => b -> b) -> First a -> First a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> First a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> First a -> r #

gmapQ :: (forall d. Data d => d -> u) -> First a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> First a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> First a -> m (First a) #

Ord a => Ord (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: First a -> First a -> Ordering #

(<) :: First a -> First a -> Bool #

(<=) :: First a -> First a -> Bool #

(>) :: First a -> First a -> Bool #

(>=) :: First a -> First a -> Bool #

max :: First a -> First a -> First a #

min :: First a -> First a -> First a #

Read a => Read (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> First a -> ShowS #

show :: First a -> String #

showList :: [First a] -> ShowS #

Generic (First a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (First a) :: Type -> Type #

Methods

from :: First a -> Rep (First a) x #

to :: Rep (First a) x -> First a #

Semigroup (First a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: First a -> First a -> First a #

sconcat :: NonEmpty (First a) -> First a #

stimes :: Integral b => b -> First a -> First a #

Monoid (First a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: First a #

mappend :: First a -> First a -> First a #

mconcat :: [First a] -> First a #

Function a => Function (First a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (First a -> b) -> First a :-> b #

Arbitrary a => Arbitrary (First a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (First a) #

shrink :: First a -> [First a] #

CoArbitrary a => CoArbitrary (First a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: First a -> Gen b -> Gen b #

ToJSON a => ToJSON (First a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON a => FromJSON (First a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Binary a => Binary (First a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: First a -> Put #

get :: Get (First a) #

putList :: [First a] -> Put #

NFData a => NFData (First a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: First a -> () #

Wrapped (First a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (First a) :: Type #

Methods

_Wrapped' :: Iso' (First a) (Unwrapped (First a)) #

AsEmpty (First a) 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' (First a) () #

Generic1 First 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 First :: k -> Type #

Methods

from1 :: First a -> Rep1 First a #

to1 :: Rep1 First a -> First a #

t ~ First b => Rewrapped (First a) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep (First a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep (First a) = D1 (MetaData "First" "Data.Monoid" "base" True) (C1 (MetaCons "First" PrefixI True) (S1 (MetaSel (Just "getFirst") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe a))))
type Unwrapped (First a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (First a) = Maybe a
type Rep1 First

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep1 First = D1 (MetaData "First" "Data.Monoid" "base" True) (C1 (MetaCons "First" PrefixI True) (S1 (MetaSel (Just "getFirst") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Maybe)))

newtype Last a #

Maybe monoid returning the rightmost non-Nothing value.

Last a is isomorphic to Dual (First a), and thus to Dual (Alt Maybe a)

>>> getLast (Last (Just "hello") <> Last Nothing <> Last (Just "world"))
Just "world"

Use of this type is discouraged. Note the following equivalence:

Data.Monoid.Last x === Maybe (Data.Semigroup.Last x)

In addition to being equivalent in the structural sense, the two also have Monoid instances that behave the same. This type will be marked deprecated in GHC 8.8, and removed in GHC 8.10. Users are advised to use the variant from Data.Semigroup and wrap it in Maybe.

Constructors

Last 

Fields

Instances
Monad Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Last a -> (a -> Last b) -> Last b #

(>>) :: Last a -> Last b -> Last b #

return :: a -> Last a #

fail :: String -> Last a #

Functor Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Last a -> Last b #

(<$) :: a -> Last b -> Last a #

MonadFix Last

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Last a) -> Last a #

Applicative Last

Since: base-4.8.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Last a #

(<*>) :: Last (a -> b) -> Last a -> Last b #

liftA2 :: (a -> b -> c) -> Last a -> Last b -> Last c #

(*>) :: Last a -> Last b -> Last b #

(<*) :: Last a -> Last b -> Last a #

Foldable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Last m -> m #

foldMap :: Monoid m => (a -> m) -> Last a -> m #

foldr :: (a -> b -> b) -> b -> Last a -> b #

foldr' :: (a -> b -> b) -> b -> Last a -> b #

foldl :: (b -> a -> b) -> b -> Last a -> b #

foldl' :: (b -> a -> b) -> b -> Last a -> b #

foldr1 :: (a -> a -> a) -> Last a -> a #

foldl1 :: (a -> a -> a) -> Last a -> a #

toList :: Last a -> [a] #

null :: Last a -> Bool #

length :: Last a -> Int #

elem :: Eq a => a -> Last a -> Bool #

maximum :: Ord a => Last a -> a #

minimum :: Ord a => Last a -> a #

sum :: Num a => Last a -> a #

product :: Num a => Last a -> a #

Traversable Last

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Last a -> f (Last b) #

sequenceA :: Applicative f => Last (f a) -> f (Last a) #

mapM :: Monad m => (a -> m b) -> Last a -> m (Last b) #

sequence :: Monad m => Last (m a) -> m (Last a) #

ToJSON1 Last 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Value) -> ([a] -> Value) -> Last a -> Value #

liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [Last a] -> Value #

liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> Last a -> Encoding #

liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [Last a] -> Encoding #

FromJSON1 Last 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Last a) #

liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Last a] #

NFData1 Last

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Last a -> () #

Eq a => Eq (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

(==) :: Last a -> Last a -> Bool #

(/=) :: Last a -> Last a -> Bool #

Data a => Data (Last a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Last a -> c (Last a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Last a) #

toConstr :: Last a -> Constr #

dataTypeOf :: Last a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Last a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Last a)) #

gmapT :: (forall b. Data b => b -> b) -> Last a -> Last a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Last a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Last a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Last a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Last a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Last a -> m (Last a) #

Ord a => Ord (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

compare :: Last a -> Last a -> Ordering #

(<) :: Last a -> Last a -> Bool #

(<=) :: Last a -> Last a -> Bool #

(>) :: Last a -> Last a -> Bool #

(>=) :: Last a -> Last a -> Bool #

max :: Last a -> Last a -> Last a #

min :: Last a -> Last a -> Last a #

Read a => Read (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Show a => Show (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Last a -> ShowS #

show :: Last a -> String #

showList :: [Last a] -> ShowS #

Generic (Last a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Last a) :: Type -> Type #

Methods

from :: Last a -> Rep (Last a) x #

to :: Rep (Last a) x -> Last a #

Semigroup (Last a)

Since: base-4.9.0.0

Instance details

Defined in Data.Monoid

Methods

(<>) :: Last a -> Last a -> Last a #

sconcat :: NonEmpty (Last a) -> Last a #

stimes :: Integral b => b -> Last a -> Last a #

Monoid (Last a)

Since: base-2.1

Instance details

Defined in Data.Monoid

Methods

mempty :: Last a #

mappend :: Last a -> Last a -> Last a #

mconcat :: [Last a] -> Last a #

Function a => Function (Last a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Last a -> b) -> Last a :-> b #

Arbitrary a => Arbitrary (Last a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Last a) #

shrink :: Last a -> [Last a] #

CoArbitrary a => CoArbitrary (Last a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Last a -> Gen b -> Gen b #

ToJSON a => ToJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON a => FromJSON (Last a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Binary a => Binary (Last a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Last a -> Put #

get :: Get (Last a) #

putList :: [Last a] -> Put #

NFData a => NFData (Last a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Last a -> () #

Wrapped (Last a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Last a) :: Type #

Methods

_Wrapped' :: Iso' (Last a) (Unwrapped (Last a)) #

AsEmpty (Last a) 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' (Last a) () #

Generic1 Last 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 Last :: k -> Type #

Methods

from1 :: Last a -> Rep1 Last a #

to1 :: Rep1 Last a -> Last a #

t ~ Last b => Rewrapped (Last a) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep (Last a)

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep (Last a) = D1 (MetaData "Last" "Data.Monoid" "base" True) (C1 (MetaCons "Last" PrefixI True) (S1 (MetaSel (Just "getLast") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (Maybe a))))
type Unwrapped (Last a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Last a) = Maybe a
type Rep1 Last

Since: base-4.7.0.0

Instance details

Defined in Data.Monoid

type Rep1 Last = D1 (MetaData "Last" "Data.Monoid" "base" True) (C1 (MetaCons "Last" PrefixI True) (S1 (MetaSel (Just "getLast") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 Maybe)))

newtype Ap (f :: k -> Type) (a :: k) :: forall k. (k -> Type) -> k -> Type #

This data type witnesses the lifting of a Monoid into an Applicative pointwise.

Since: base-4.12.0.0

Constructors

Ap 

Fields

Instances
Generic1 (Ap f :: k -> Type) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep1 (Ap f) :: k -> Type #

Methods

from1 :: Ap f a -> Rep1 (Ap f) a #

to1 :: Rep1 (Ap f) a -> Ap f a #

Monad f => Monad (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(>>=) :: Ap f a -> (a -> Ap f b) -> Ap f b #

(>>) :: Ap f a -> Ap f b -> Ap f b #

return :: a -> Ap f a #

fail :: String -> Ap f a #

Functor f => Functor (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fmap :: (a -> b) -> Ap f a -> Ap f b #

(<$) :: a -> Ap f b -> Ap f a #

MonadFix f => MonadFix (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Ap f a) -> Ap f a #

MonadFail f => MonadFail (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

fail :: String -> Ap f a #

Applicative f => Applicative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

pure :: a -> Ap f a #

(<*>) :: Ap f (a -> b) -> Ap f a -> Ap f b #

liftA2 :: (a -> b -> c) -> Ap f a -> Ap f b -> Ap f c #

(*>) :: Ap f a -> Ap f b -> Ap f b #

(<*) :: Ap f a -> Ap f b -> Ap f a #

Foldable f => Foldable (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Ap f m -> m #

foldMap :: Monoid m => (a -> m) -> Ap f a -> m #

foldr :: (a -> b -> b) -> b -> Ap f a -> b #

foldr' :: (a -> b -> b) -> b -> Ap f a -> b #

foldl :: (b -> a -> b) -> b -> Ap f a -> b #

foldl' :: (b -> a -> b) -> b -> Ap f a -> b #

foldr1 :: (a -> a -> a) -> Ap f a -> a #

foldl1 :: (a -> a -> a) -> Ap f a -> a #

toList :: Ap f a -> [a] #

null :: Ap f a -> Bool #

length :: Ap f a -> Int #

elem :: Eq a => a -> Ap f a -> Bool #

maximum :: Ord a => Ap f a -> a #

minimum :: Ord a => Ap f a -> a #

sum :: Num a => Ap f a -> a #

product :: Num a => Ap f a -> a #

Traversable f => Traversable (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Ap f a -> f0 (Ap f b) #

sequenceA :: Applicative f0 => Ap f (f0 a) -> f0 (Ap f a) #

mapM :: Monad m => (a -> m b) -> Ap f a -> m (Ap f b) #

sequence :: Monad m => Ap f (m a) -> m (Ap f a) #

Alternative f => Alternative (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

empty :: Ap f a #

(<|>) :: Ap f a -> Ap f a -> Ap f a #

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

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

MonadPlus f => MonadPlus (Ap f)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mzero :: Ap f a #

mplus :: Ap f a -> Ap f a -> Ap f a #

(Applicative f, Bounded a) => Bounded (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

minBound :: Ap f a #

maxBound :: Ap f a #

Enum (f a) => Enum (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

succ :: Ap f a -> Ap f a #

pred :: Ap f a -> Ap f a #

toEnum :: Int -> Ap f a #

fromEnum :: Ap f a -> Int #

enumFrom :: Ap f a -> [Ap f a] #

enumFromThen :: Ap f a -> Ap f a -> [Ap f a] #

enumFromTo :: Ap f a -> Ap f a -> [Ap f a] #

enumFromThenTo :: Ap f a -> Ap f a -> Ap f a -> [Ap f a] #

Eq (f a) => Eq (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(==) :: Ap f a -> Ap f a -> Bool #

(/=) :: Ap f a -> Ap f a -> Bool #

(Data (f a), Data a, Typeable f) => Data (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Ap f a -> c (Ap f a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Ap f a) #

toConstr :: Ap f a -> Constr #

dataTypeOf :: Ap f a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Ap f a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Ap f a)) #

gmapT :: (forall b. Data b => b -> b) -> Ap f a -> Ap f a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Ap f a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Ap f a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Ap f a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Ap f a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Ap f a -> m (Ap f a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Ap f a -> m (Ap f a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Ap f a -> m (Ap f a) #

(Applicative f, Num a) => Num (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

(+) :: Ap f a -> Ap f a -> Ap f a #

(-) :: Ap f a -> Ap f a -> Ap f a #

(*) :: Ap f a -> Ap f a -> Ap f a #

negate :: Ap f a -> Ap f a #

abs :: Ap f a -> Ap f a #

signum :: Ap f a -> Ap f a #

fromInteger :: Integer -> Ap f a #

Ord (f a) => Ord (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

compare :: Ap f a -> Ap f a -> Ordering #

(<) :: Ap f a -> Ap f a -> Bool #

(<=) :: Ap f a -> Ap f a -> Bool #

(>) :: Ap f a -> Ap f a -> Bool #

(>=) :: Ap f a -> Ap f a -> Bool #

max :: Ap f a -> Ap f a -> Ap f a #

min :: Ap f a -> Ap f a -> Ap f a #

Read (f a) => Read (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

readsPrec :: Int -> ReadS (Ap f a) #

readList :: ReadS [Ap f a] #

readPrec :: ReadPrec (Ap f a) #

readListPrec :: ReadPrec [Ap f a] #

Show (f a) => Show (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

showsPrec :: Int -> Ap f a -> ShowS #

show :: Ap f a -> String #

showList :: [Ap f a] -> ShowS #

Generic (Ap f a) 
Instance details

Defined in Data.Monoid

Associated Types

type Rep (Ap f a) :: Type -> Type #

Methods

from :: Ap f a -> Rep (Ap f a) x #

to :: Rep (Ap f a) x -> Ap f a #

(Applicative f, Semigroup a) => Semigroup (Ap f a)

Since: base-4.12.0.0

Instance details

Defined 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 #

(Applicative f, Monoid a) => Monoid (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

Methods

mempty :: Ap f a #

mappend :: Ap f a -> Ap f a -> Ap f a #

mconcat :: [Ap f a] -> Ap f a #

type Rep1 (Ap f :: k -> Type)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

type Rep1 (Ap f :: k -> Type) = D1 (MetaData "Ap" "Data.Monoid" "base" True) (C1 (MetaCons "Ap" PrefixI True) (S1 (MetaSel (Just "getAp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 f)))
type Rep (Ap f a)

Since: base-4.12.0.0

Instance details

Defined in Data.Monoid

type Rep (Ap f a) = D1 (MetaData "Ap" "Data.Monoid" "base" True) (C1 (MetaCons "Ap" PrefixI True) (S1 (MetaSel (Just "getAp") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (f a))))

newtype Dual a #

The dual of a Monoid, obtained by swapping the arguments of mappend.

>>> getDual (mappend (Dual "Hello") (Dual "World"))
"WorldHello"

Constructors

Dual 

Fields

Instances
Monad Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Dual a -> (a -> Dual b) -> Dual b #

(>>) :: Dual a -> Dual b -> Dual b #

return :: a -> Dual a #

fail :: String -> Dual a #

Functor Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Dual a -> Dual b #

(<$) :: a -> Dual b -> Dual a #

MonadFix Dual

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Dual a) -> Dual a #

Applicative Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Dual a #

(<*>) :: Dual (a -> b) -> Dual a -> Dual b #

liftA2 :: (a -> b -> c) -> Dual a -> Dual b -> Dual c #

(*>) :: Dual a -> Dual b -> Dual b #

(<*) :: Dual a -> Dual b -> Dual a #

Foldable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Dual m -> m #

foldMap :: Monoid m => (a -> m) -> Dual a -> m #

foldr :: (a -> b -> b) -> b -> Dual a -> b #

foldr' :: (a -> b -> b) -> b -> Dual a -> b #

foldl :: (b -> a -> b) -> b -> Dual a -> b #

foldl' :: (b -> a -> b) -> b -> Dual a -> b #

foldr1 :: (a -> a -> a) -> Dual a -> a #

foldl1 :: (a -> a -> a) -> Dual a -> a #

toList :: Dual a -> [a] #

null :: Dual a -> Bool #

length :: Dual a -> Int #

elem :: Eq a => a -> Dual a -> Bool #

maximum :: Ord a => Dual a -> a #

minimum :: Ord a => Dual a -> a #

sum :: Num a => Dual a -> a #

product :: Num a => Dual a -> a #

Traversable Dual

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Dual a -> f (Dual b) #

sequenceA :: Applicative f => Dual (f a) -> f (Dual a) #

mapM :: Monad m => (a -> m b) -> Dual a -> m (Dual b) #

sequence :: Monad m => Dual (m a) -> m (Dual a) #

Representable Dual 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Dual :: Type #

Methods

tabulate :: (Rep Dual -> a) -> Dual a #

index :: Dual a -> Rep Dual -> a #

ToJSON1 Dual 
Instance details

Defined in Data.Aeson.Types.ToJSON

Methods

liftToJSON :: (a -> Value) -> ([a] -> Value) -> Dual a -> Value #

liftToJSONList :: (a -> Value) -> ([a] -> Value) -> [Dual a] -> Value #

liftToEncoding :: (a -> Encoding) -> ([a] -> Encoding) -> Dual a -> Encoding #

liftToEncodingList :: (a -> Encoding) -> ([a] -> Encoding) -> [Dual a] -> Encoding #

FromJSON1 Dual 
Instance details

Defined in Data.Aeson.Types.FromJSON

Methods

liftParseJSON :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser (Dual a) #

liftParseJSONList :: (Value -> Parser a) -> (Value -> Parser [a]) -> Value -> Parser [Dual a] #

NFData1 Dual

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Dual a -> () #

Traversable1 Dual 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Dual a -> f (Dual b) #

sequence1 :: Apply f => Dual (f b) -> f (Dual b) #

Bounded a => Bounded (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Dual a #

maxBound :: Dual a #

Eq a => Eq (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Dual a -> Dual a -> Bool #

(/=) :: Dual a -> Dual a -> Bool #

Data a => Data (Dual a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Dual a -> c (Dual a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Dual a) #

toConstr :: Dual a -> Constr #

dataTypeOf :: Dual a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Dual a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Dual a)) #

gmapT :: (forall b. Data b => b -> b) -> Dual a -> Dual a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Dual a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Dual a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Dual a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Dual a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Dual a -> m (Dual a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Dual a -> m (Dual a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Dual a -> m (Dual a) #

Ord a => Ord (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Dual a -> Dual a -> Ordering #

(<) :: Dual a -> Dual a -> Bool #

(<=) :: Dual a -> Dual a -> Bool #

(>) :: Dual a -> Dual a -> Bool #

(>=) :: Dual a -> Dual a -> Bool #

max :: Dual a -> Dual a -> Dual a #

min :: Dual a -> Dual a -> Dual a #

Read a => Read (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Dual a -> ShowS #

show :: Dual a -> String #

showList :: [Dual a] -> ShowS #

Generic (Dual a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Dual a) :: Type -> Type #

Methods

from :: Dual a -> Rep (Dual a) x #

to :: Rep (Dual a) x -> Dual a #

Semigroup a => Semigroup (Dual a)

Since: base-4.9.0.0

Instance details

Defined 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 #

Monoid a => Monoid (Dual a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Dual a #

mappend :: Dual a -> Dual a -> Dual a #

mconcat :: [Dual a] -> Dual a #

Function a => Function (Dual a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Dual a -> b) -> Dual a :-> b #

Arbitrary a => Arbitrary (Dual a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Dual a) #

shrink :: Dual a -> [Dual a] #

CoArbitrary a => CoArbitrary (Dual a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Dual a -> Gen b -> Gen b #

ToJSON a => ToJSON (Dual a) 
Instance details

Defined in Data.Aeson.Types.ToJSON

FromJSON a => FromJSON (Dual a) 
Instance details

Defined in Data.Aeson.Types.FromJSON

Binary a => Binary (Dual a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Dual a -> Put #

get :: Get (Dual a) #

putList :: [Dual a] -> Put #

NFData a => NFData (Dual a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Dual a -> () #

Wrapped (Dual a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Dual a) :: Type #

Methods

_Wrapped' :: Iso' (Dual a) (Unwrapped (Dual a)) #

AsEmpty a => AsEmpty (Dual a) 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' (Dual a) () #

Generic1 Dual 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Dual :: k -> Type #

Methods

from1 :: Dual a -> Rep1 Dual a #

to1 :: Rep1 Dual a -> Dual a #

t ~ Dual b => Rewrapped (Dual a) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep Dual 
Instance details

Defined in Data.Functor.Rep

type Rep Dual = ()
type Rep (Dual a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Dual a) = D1 (MetaData "Dual" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "Dual" PrefixI True) (S1 (MetaSel (Just "getDual") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))
type Unwrapped (Dual a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Dual a) = a
type Rep1 Dual

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 Dual = D1 (MetaData "Dual" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "Dual" PrefixI True) (S1 (MetaSel (Just "getDual") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))

newtype Endo a #

The monoid of endomorphisms under composition.

>>> let computation = Endo ("Hello, " ++) <> Endo (++ "!")
>>> appEndo computation "Haskell"
"Hello, Haskell!"

Constructors

Endo 

Fields

Instances
Generic (Endo a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Endo a) :: Type -> Type #

Methods

from :: Endo a -> Rep (Endo a) x #

to :: Rep (Endo a) x -> Endo a #

Semigroup (Endo a)

Since: base-4.9.0.0

Instance details

Defined 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 #

Monoid (Endo a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Endo a #

mappend :: Endo a -> Endo a -> Endo a #

mconcat :: [Endo a] -> Endo a #

(Arbitrary a, CoArbitrary a) => Arbitrary (Endo a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Endo a) #

shrink :: Endo a -> [Endo a] #

(Arbitrary a, CoArbitrary a) => CoArbitrary (Endo a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Endo a -> Gen b -> Gen b #

Wrapped (Endo a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Endo a) :: Type #

Methods

_Wrapped' :: Iso' (Endo a) (Unwrapped (Endo a)) #

t ~ Endo b => Rewrapped (Endo a) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep (Endo a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Endo a) = D1 (MetaData "Endo" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "Endo" PrefixI True) (S1 (MetaSel (Just "appEndo") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (a -> a))))
type Unwrapped (Endo a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Endo a) = a -> a

newtype All #

Boolean monoid under conjunction (&&).

>>> getAll (All True <> mempty <> All False)
False
>>> getAll (mconcat (map (\x -> All (even x)) [2,4,6,7,8]))
False

Constructors

All 

Fields

Instances
Bounded All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: All #

maxBound :: All #

Eq All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: All -> All -> Bool #

(/=) :: All -> All -> Bool #

Data All

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

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

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

toConstr :: All -> Constr #

dataTypeOf :: All -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: All -> All -> Ordering #

(<) :: All -> All -> Bool #

(<=) :: All -> All -> Bool #

(>) :: All -> All -> Bool #

(>=) :: All -> All -> Bool #

max :: All -> All -> All #

min :: All -> All -> All #

Read All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> All -> ShowS #

show :: All -> String #

showList :: [All] -> ShowS #

Generic All 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep All :: Type -> Type #

Methods

from :: All -> Rep All x #

to :: Rep All x -> All #

Semigroup All

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: All -> All -> All #

sconcat :: NonEmpty All -> All #

stimes :: Integral b => b -> All -> All #

Monoid All

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: All #

mappend :: All -> All -> All #

mconcat :: [All] -> All #

Function All 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (All -> b) -> All :-> b #

Arbitrary All 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen All #

shrink :: All -> [All] #

CoArbitrary All 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: All -> Gen b -> Gen b #

Binary All

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: All -> Put #

get :: Get All #

putList :: [All] -> Put #

NFData All

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: All -> () #

Wrapped All 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped All :: Type #

AsEmpty All 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' All () #

t ~ All => Rewrapped All t 
Instance details

Defined in Control.Lens.Wrapped

type Rep All

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep All = D1 (MetaData "All" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "All" PrefixI True) (S1 (MetaSel (Just "getAll") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)))
type Unwrapped All 
Instance details

Defined in Control.Lens.Wrapped

newtype Any #

Boolean monoid under disjunction (||).

>>> getAny (Any True <> mempty <> Any False)
True
>>> getAny (mconcat (map (\x -> Any (even x)) [2,4,6,7,8]))
True

Constructors

Any 

Fields

Instances
Bounded Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Any #

maxBound :: Any #

Eq Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Any -> Any -> Bool #

(/=) :: Any -> Any -> Bool #

Data Any

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

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

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

toConstr :: Any -> Constr #

dataTypeOf :: Any -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Any -> Any -> Ordering #

(<) :: Any -> Any -> Bool #

(<=) :: Any -> Any -> Bool #

(>) :: Any -> Any -> Bool #

(>=) :: Any -> Any -> Bool #

max :: Any -> Any -> Any #

min :: Any -> Any -> Any #

Read Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Any -> ShowS #

show :: Any -> String #

showList :: [Any] -> ShowS #

Generic Any 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep Any :: Type -> Type #

Methods

from :: Any -> Rep Any x #

to :: Rep Any x -> Any #

Semigroup Any

Since: base-4.9.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(<>) :: Any -> Any -> Any #

sconcat :: NonEmpty Any -> Any #

stimes :: Integral b => b -> Any -> Any #

Monoid Any

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Any #

mappend :: Any -> Any -> Any #

mconcat :: [Any] -> Any #

Function Any 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Any -> b) -> Any :-> b #

Arbitrary Any 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen Any #

shrink :: Any -> [Any] #

CoArbitrary Any 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Any -> Gen b -> Gen b #

Binary Any

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Any -> Put #

get :: Get Any #

putList :: [Any] -> Put #

NFData Any

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Any -> () #

Wrapped Any 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped Any :: Type #

AsEmpty Any 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' Any () #

t ~ Any => Rewrapped Any t 
Instance details

Defined in Control.Lens.Wrapped

type Rep Any

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep Any = D1 (MetaData "Any" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "Any" PrefixI True) (S1 (MetaSel (Just "getAny") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool)))
type Unwrapped Any 
Instance details

Defined in Control.Lens.Wrapped

newtype Sum a #

Monoid under addition.

>>> getSum (Sum 1 <> Sum 2 <> mempty)
3

Constructors

Sum 

Fields

Instances
Monad Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Sum a -> (a -> Sum b) -> Sum b #

(>>) :: Sum a -> Sum b -> Sum b #

return :: a -> Sum a #

fail :: String -> Sum a #

Functor Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Sum a -> Sum b #

(<$) :: a -> Sum b -> Sum a #

MonadFix Sum

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Sum a) -> Sum a #

Applicative Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Sum a #

(<*>) :: Sum (a -> b) -> Sum a -> Sum b #

liftA2 :: (a -> b -> c) -> Sum a -> Sum b -> Sum c #

(*>) :: Sum a -> Sum b -> Sum b #

(<*) :: Sum a -> Sum b -> Sum a #

Foldable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Sum m -> m #

foldMap :: Monoid m => (a -> m) -> Sum a -> m #

foldr :: (a -> b -> b) -> b -> Sum a -> b #

foldr' :: (a -> b -> b) -> b -> Sum a -> b #

foldl :: (b -> a -> b) -> b -> Sum a -> b #

foldl' :: (b -> a -> b) -> b -> Sum a -> b #

foldr1 :: (a -> a -> a) -> Sum a -> a #

foldl1 :: (a -> a -> a) -> Sum a -> a #

toList :: Sum a -> [a] #

null :: Sum a -> Bool #

length :: Sum a -> Int #

elem :: Eq a => a -> Sum a -> Bool #

maximum :: Ord a => Sum a -> a #

minimum :: Ord a => Sum a -> a #

sum :: Num a => Sum a -> a #

product :: Num a => Sum a -> a #

Traversable Sum

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Sum a -> f (Sum b) #

sequenceA :: Applicative f => Sum (f a) -> f (Sum a) #

mapM :: Monad m => (a -> m b) -> Sum a -> m (Sum b) #

sequence :: Monad m => Sum (m a) -> m (Sum a) #

Representable Sum 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Sum :: Type #

Methods

tabulate :: (Rep Sum -> a) -> Sum a #

index :: Sum a -> Rep Sum -> a #

NFData1 Sum

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Sum a -> () #

Traversable1 Sum 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Sum a -> f (Sum b) #

sequence1 :: Apply f => Sum (f b) -> f (Sum b) #

Bounded a => Bounded (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

minBound :: Sum a #

maxBound :: Sum a #

Eq a => Eq (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Sum a -> Sum a -> Bool #

(/=) :: Sum a -> Sum a -> Bool #

Data a => Data (Sum a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Sum a -> c (Sum a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Sum a) #

toConstr :: Sum a -> Constr #

dataTypeOf :: Sum a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Sum a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Sum a)) #

gmapT :: (forall b. Data b => b -> b) -> Sum a -> Sum a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Sum a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Sum a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Sum a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Sum a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Sum a -> m (Sum a) #

Num a => Num (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Sum a -> Sum a -> Sum a #

(-) :: Sum a -> Sum a -> Sum a #

(*) :: Sum a -> Sum a -> Sum a #

negate :: Sum a -> Sum a #

abs :: Sum a -> Sum a #

signum :: Sum a -> Sum a #

fromInteger :: Integer -> Sum a #

Ord a => Ord (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Sum a -> Sum a -> Ordering #

(<) :: Sum a -> Sum a -> Bool #

(<=) :: Sum a -> Sum a -> Bool #

(>) :: Sum a -> Sum a -> Bool #

(>=) :: Sum a -> Sum a -> Bool #

max :: Sum a -> Sum a -> Sum a #

min :: Sum a -> Sum a -> Sum a #

Read a => Read (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Sum a -> ShowS #

show :: Sum a -> String #

showList :: [Sum a] -> ShowS #

Generic (Sum a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Sum a) :: Type -> Type #

Methods

from :: Sum a -> Rep (Sum a) x #

to :: Rep (Sum a) x -> Sum a #

Num a => Semigroup (Sum a)

Since: base-4.9.0.0

Instance details

Defined 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 #

Num a => Monoid (Sum a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Sum a #

mappend :: Sum a -> Sum a -> Sum a #

mconcat :: [Sum a] -> Sum a #

Function a => Function (Sum a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Sum a -> b) -> Sum a :-> b #

Arbitrary a => Arbitrary (Sum a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Sum a) #

shrink :: Sum a -> [Sum a] #

CoArbitrary a => CoArbitrary (Sum a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Sum a -> Gen b -> Gen b #

Binary a => Binary (Sum a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Sum a -> Put #

get :: Get (Sum a) #

putList :: [Sum a] -> Put #

NFData a => NFData (Sum a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Sum a -> () #

Wrapped (Sum a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Sum a) :: Type #

Methods

_Wrapped' :: Iso' (Sum a) (Unwrapped (Sum a)) #

(Eq a, Num a) => AsEmpty (Sum a) 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' (Sum a) () #

Generic1 Sum 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Sum :: k -> Type #

Methods

from1 :: Sum a -> Rep1 Sum a #

to1 :: Rep1 Sum a -> Sum a #

t ~ Sum b => Rewrapped (Sum a) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep Sum 
Instance details

Defined in Data.Functor.Rep

type Rep Sum = ()
type Rep (Sum a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Sum a) = D1 (MetaData "Sum" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "Sum" PrefixI True) (S1 (MetaSel (Just "getSum") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))
type Unwrapped (Sum a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Sum a) = a
type Rep1 Sum

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 Sum = D1 (MetaData "Sum" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "Sum" PrefixI True) (S1 (MetaSel (Just "getSum") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))

newtype Product a #

Monoid under multiplication.

>>> getProduct (Product 3 <> Product 4 <> mempty)
12

Constructors

Product 

Fields

Instances
Monad Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Product a -> (a -> Product b) -> Product b #

(>>) :: Product a -> Product b -> Product b #

return :: a -> Product a #

fail :: String -> Product a #

Functor Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Product a -> Product b #

(<$) :: a -> Product b -> Product a #

MonadFix Product

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Product a) -> Product a #

Applicative Product

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Product a #

(<*>) :: Product (a -> b) -> Product a -> Product b #

liftA2 :: (a -> b -> c) -> Product a -> Product b -> Product c #

(*>) :: Product a -> Product b -> Product b #

(<*) :: Product a -> Product b -> Product a #

Foldable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Product m -> m #

foldMap :: Monoid m => (a -> m) -> Product a -> m #

foldr :: (a -> b -> b) -> b -> Product a -> b #

foldr' :: (a -> b -> b) -> b -> Product a -> b #

foldl :: (b -> a -> b) -> b -> Product a -> b #

foldl' :: (b -> a -> b) -> b -> Product a -> b #

foldr1 :: (a -> a -> a) -> Product a -> a #

foldl1 :: (a -> a -> a) -> Product a -> a #

toList :: Product a -> [a] #

null :: Product a -> Bool #

length :: Product a -> Int #

elem :: Eq a => a -> Product a -> Bool #

maximum :: Ord a => Product a -> a #

minimum :: Ord a => Product a -> a #

sum :: Num a => Product a -> a #

product :: Num a => Product a -> a #

Traversable Product

Since: base-4.8.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f => (a -> f b) -> Product a -> f (Product b) #

sequenceA :: Applicative f => Product (f a) -> f (Product a) #

mapM :: Monad m => (a -> m b) -> Product a -> m (Product b) #

sequence :: Monad m => Product (m a) -> m (Product a) #

Representable Product 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep Product :: Type #

Methods

tabulate :: (Rep Product -> a) -> Product a #

index :: Product a -> Rep Product -> a #

NFData1 Product

Since: deepseq-1.4.3.0

Instance details

Defined in Control.DeepSeq

Methods

liftRnf :: (a -> ()) -> Product a -> () #

Traversable1 Product 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f => (a -> f b) -> Product a -> f (Product b) #

sequence1 :: Apply f => Product (f b) -> f (Product b) #

Bounded a => Bounded (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Eq a => Eq (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Product a -> Product a -> Bool #

(/=) :: Product a -> Product a -> Bool #

Data a => Data (Product a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Product a -> c (Product a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Product a) #

toConstr :: Product a -> Constr #

dataTypeOf :: Product a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Product a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Product a)) #

gmapT :: (forall b. Data b => b -> b) -> Product a -> Product a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Product a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Product a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Product a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Product a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Product a -> m (Product a) #

Num a => Num (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Product a -> Product a -> Product a #

(-) :: Product a -> Product a -> Product a #

(*) :: Product a -> Product a -> Product a #

negate :: Product a -> Product a #

abs :: Product a -> Product a #

signum :: Product a -> Product a #

fromInteger :: Integer -> Product a #

Ord a => Ord (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Product a -> Product a -> Ordering #

(<) :: Product a -> Product a -> Bool #

(<=) :: Product a -> Product a -> Bool #

(>) :: Product a -> Product a -> Bool #

(>=) :: Product a -> Product a -> Bool #

max :: Product a -> Product a -> Product a #

min :: Product a -> Product a -> Product a #

Read a => Read (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Show a => Show (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Product a -> ShowS #

show :: Product a -> String #

showList :: [Product a] -> ShowS #

Generic (Product a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Product a) :: Type -> Type #

Methods

from :: Product a -> Rep (Product a) x #

to :: Rep (Product a) x -> Product a #

Num a => Semigroup (Product a)

Since: base-4.9.0.0

Instance details

Defined 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 => Monoid (Product a)

Since: base-2.1

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Product a #

mappend :: Product a -> Product a -> Product a #

mconcat :: [Product a] -> Product a #

Function a => Function (Product a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Product a -> b) -> Product a :-> b #

Arbitrary a => Arbitrary (Product a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Product a) #

shrink :: Product a -> [Product a] #

CoArbitrary a => CoArbitrary (Product a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Product a -> Gen b -> Gen b #

Binary a => Binary (Product a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Product a -> Put #

get :: Get (Product a) #

putList :: [Product a] -> Put #

NFData a => NFData (Product a)

Since: deepseq-1.4.0.0

Instance details

Defined in Control.DeepSeq

Methods

rnf :: Product a -> () #

Wrapped (Product a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Product a) :: Type #

Methods

_Wrapped' :: Iso' (Product a) (Unwrapped (Product a)) #

(Eq a, Num a) => AsEmpty (Product a) 
Instance details

Defined in Control.Lens.Empty

Methods

_Empty :: Prism' (Product a) () #

Generic1 Product 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 Product :: k -> Type #

Methods

from1 :: Product a -> Rep1 Product a #

to1 :: Rep1 Product a -> Product a #

t ~ Product b => Rewrapped (Product a) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep Product 
Instance details

Defined in Data.Functor.Rep

type Rep Product = ()
type Rep (Product a)

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Product a) = D1 (MetaData "Product" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "Product" PrefixI True) (S1 (MetaSel (Just "getProduct") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 a)))
type Unwrapped (Product a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Product a) = a
type Rep1 Product

Since: base-4.7.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 Product = D1 (MetaData "Product" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "Product" PrefixI True) (S1 (MetaSel (Just "getProduct") NoSourceUnpackedness NoSourceStrictness DecidedLazy) Par1))

newtype Alt (f :: k -> Type) (a :: k) :: forall k. (k -> Type) -> k -> Type #

Monoid under <|>.

Since: base-4.8.0.0

Constructors

Alt 

Fields

Instances
Generic1 (Alt f :: k -> Type) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep1 (Alt f) :: k -> Type #

Methods

from1 :: Alt f a -> Rep1 (Alt f) a #

to1 :: Rep1 (Alt f) a -> Alt f a #

Monad f => Monad (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(>>=) :: Alt f a -> (a -> Alt f b) -> Alt f b #

(>>) :: Alt f a -> Alt f b -> Alt f b #

return :: a -> Alt f a #

fail :: String -> Alt f a #

Functor f => Functor (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

fmap :: (a -> b) -> Alt f a -> Alt f b #

(<$) :: a -> Alt f b -> Alt f a #

MonadFix f => MonadFix (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Control.Monad.Fix

Methods

mfix :: (a -> Alt f a) -> Alt f a #

Applicative f => Applicative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

pure :: a -> Alt f a #

(<*>) :: Alt f (a -> b) -> Alt f a -> Alt f b #

liftA2 :: (a -> b -> c) -> Alt f a -> Alt f b -> Alt f c #

(*>) :: Alt f a -> Alt f b -> Alt f b #

(<*) :: Alt f a -> Alt f b -> Alt f a #

Foldable f => Foldable (Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Foldable

Methods

fold :: Monoid m => Alt f m -> m #

foldMap :: Monoid m => (a -> m) -> Alt f a -> m #

foldr :: (a -> b -> b) -> b -> Alt f a -> b #

foldr' :: (a -> b -> b) -> b -> Alt f a -> b #

foldl :: (b -> a -> b) -> b -> Alt f a -> b #

foldl' :: (b -> a -> b) -> b -> Alt f a -> b #

foldr1 :: (a -> a -> a) -> Alt f a -> a #

foldl1 :: (a -> a -> a) -> Alt f a -> a #

toList :: Alt f a -> [a] #

null :: Alt f a -> Bool #

length :: Alt f a -> Int #

elem :: Eq a => a -> Alt f a -> Bool #

maximum :: Ord a => Alt f a -> a #

minimum :: Ord a => Alt f a -> a #

sum :: Num a => Alt f a -> a #

product :: Num a => Alt f a -> a #

Traversable f => Traversable (Alt f)

Since: base-4.12.0.0

Instance details

Defined in Data.Traversable

Methods

traverse :: Applicative f0 => (a -> f0 b) -> Alt f a -> f0 (Alt f b) #

sequenceA :: Applicative f0 => Alt f (f0 a) -> f0 (Alt f a) #

mapM :: Monad m => (a -> m b) -> Alt f a -> m (Alt f b) #

sequence :: Monad m => Alt f (m a) -> m (Alt f a) #

Contravariant f => Contravariant (Alt f) 
Instance details

Defined in Data.Functor.Contravariant

Methods

contramap :: (a -> b) -> Alt f b -> Alt f a #

(>$) :: b -> Alt f b -> Alt f a #

Alternative f => Alternative (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

empty :: Alt f a #

(<|>) :: Alt f a -> Alt f a -> Alt f a #

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

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

MonadPlus f => MonadPlus (Alt f)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mzero :: Alt f a #

mplus :: Alt f a -> Alt f a -> Alt f a #

Traversable1 f => Traversable1 (Alt f) 
Instance details

Defined in Data.Semigroup.Traversable.Class

Methods

traverse1 :: Apply f0 => (a -> f0 b) -> Alt f a -> f0 (Alt f b) #

sequence1 :: Apply f0 => Alt f (f0 b) -> f0 (Alt f b) #

Enum (f a) => Enum (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

succ :: Alt f a -> Alt f a #

pred :: Alt f a -> Alt f a #

toEnum :: Int -> Alt f a #

fromEnum :: Alt f a -> Int #

enumFrom :: Alt f a -> [Alt f a] #

enumFromThen :: Alt f a -> Alt f a -> [Alt f a] #

enumFromTo :: Alt f a -> Alt f a -> [Alt f a] #

enumFromThenTo :: Alt f a -> Alt f a -> Alt f a -> [Alt f a] #

Eq (f a) => Eq (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(==) :: Alt f a -> Alt f a -> Bool #

(/=) :: Alt f a -> Alt f a -> Bool #

(Data (f a), Data a, Typeable f) => Data (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Data

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> Alt f a -> c (Alt f a) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (Alt f a) #

toConstr :: Alt f a -> Constr #

dataTypeOf :: Alt f a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (Alt f a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c (t d e)) -> Maybe (c (Alt f a)) #

gmapT :: (forall b. Data b => b -> b) -> Alt f a -> Alt f a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> Alt f a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> Alt f a -> r #

gmapQ :: (forall d. Data d => d -> u) -> Alt f a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> Alt f a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> Alt f a -> m (Alt f a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> Alt f a -> m (Alt f a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> Alt f a -> m (Alt f a) #

Num (f a) => Num (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

(+) :: Alt f a -> Alt f a -> Alt f a #

(-) :: Alt f a -> Alt f a -> Alt f a #

(*) :: Alt f a -> Alt f a -> Alt f a #

negate :: Alt f a -> Alt f a #

abs :: Alt f a -> Alt f a #

signum :: Alt f a -> Alt f a #

fromInteger :: Integer -> Alt f a #

Ord (f a) => Ord (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

compare :: Alt f a -> Alt f a -> Ordering #

(<) :: Alt f a -> Alt f a -> Bool #

(<=) :: Alt f a -> Alt f a -> Bool #

(>) :: Alt f a -> Alt f a -> Bool #

(>=) :: Alt f a -> Alt f a -> Bool #

max :: Alt f a -> Alt f a -> Alt f a #

min :: Alt f a -> Alt f a -> Alt f a #

Read (f a) => Read (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

readsPrec :: Int -> ReadS (Alt f a) #

readList :: ReadS [Alt f a] #

readPrec :: ReadPrec (Alt f a) #

readListPrec :: ReadPrec [Alt f a] #

Show (f a) => Show (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

showsPrec :: Int -> Alt f a -> ShowS #

show :: Alt f a -> String #

showList :: [Alt f a] -> ShowS #

Generic (Alt f a) 
Instance details

Defined in Data.Semigroup.Internal

Associated Types

type Rep (Alt f a) :: Type -> Type #

Methods

from :: Alt f a -> Rep (Alt f a) x #

to :: Rep (Alt f a) x -> Alt f a #

Alternative f => Semigroup (Alt f a)

Since: base-4.9.0.0

Instance details

Defined 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 #

Alternative f => Monoid (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

Methods

mempty :: Alt f a #

mappend :: Alt f a -> Alt f a -> Alt f a #

mconcat :: [Alt f a] -> Alt f a #

Function (f a) => Function (Alt f a) 
Instance details

Defined in Test.QuickCheck.Function

Methods

function :: (Alt f a -> b) -> Alt f a :-> b #

Arbitrary (f a) => Arbitrary (Alt f a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

arbitrary :: Gen (Alt f a) #

shrink :: Alt f a -> [Alt f a] #

CoArbitrary (f a) => CoArbitrary (Alt f a) 
Instance details

Defined in Test.QuickCheck.Arbitrary

Methods

coarbitrary :: Alt f a -> Gen b -> Gen b #

Binary (f a) => Binary (Alt f a)

Since: 0.8.4.0

Instance details

Defined in Data.Binary.Class

Methods

put :: Alt f a -> Put #

get :: Get (Alt f a) #

putList :: [Alt f a] -> Put #

Wrapped (Alt f a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (Alt f a) :: Type #

Methods

_Wrapped' :: Iso' (Alt f a) (Unwrapped (Alt f a)) #

t ~ Alt g b => Rewrapped (Alt f a) t 
Instance details

Defined in Control.Lens.Wrapped

type Rep1 (Alt f :: k -> Type)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep1 (Alt f :: k -> Type) = D1 (MetaData "Alt" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "Alt" PrefixI True) (S1 (MetaSel (Just "getAlt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec1 f)))
type Rep (Alt f a)

Since: base-4.8.0.0

Instance details

Defined in Data.Semigroup.Internal

type Rep (Alt f a) = D1 (MetaData "Alt" "Data.Semigroup.Internal" "base" True) (C1 (MetaCons "Alt" PrefixI True) (S1 (MetaSel (Just "getAlt") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (f a))))
type Unwrapped (Alt f a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (Alt f a) = f a

unwords :: [String] -> String #

unwords is an inverse operation to words. It joins words with separating spaces.

>>> unwords ["Lorem", "ipsum", "dolor"]
"Lorem ipsum dolor"

words :: String -> [String] #

words breaks a string up into a list of words, which were delimited by white space.

>>> words "Lorem ipsum\ndolor"
["Lorem","ipsum","dolor"]

unfoldr :: (b -> Maybe (a, b)) -> b -> [a] #

The unfoldr function is a `dual' to foldr: while foldr reduces a list to a summary value, unfoldr builds a list from a seed value. The function takes the element and returns Nothing if it is done producing the list or returns Just (a,b), in which case, a is a prepended to the list and b is used as the next element in a recursive call. For example,

iterate f == unfoldr (\x -> Just (x, f x))

In some cases, unfoldr can undo a foldr operation:

unfoldr f' (foldr f z xs) == xs

if the following holds:

f' (f x y) = Just (x,y)
f' z       = Nothing

A simple use of unfoldr:

>>> unfoldr (\b -> if b == 0 then Nothing else Just (b, b-1)) 10
[10,9,8,7,6,5,4,3,2,1]

sortOn :: Ord b => (a -> b) -> [a] -> [a] #

Sort a list by comparing the results of a key function applied to each element. sortOn f is equivalent to sortBy (comparing f), but has the performance advantage of only evaluating f once for each element in the input list. This is called the decorate-sort-undecorate paradigm, or Schwartzian transform.

Elements are arranged from from lowest to highest, keeping duplicates in the order they appeared in the input.

>>> sortOn fst [(2, "world"), (4, "!"), (1, "Hello")]
[(1,"Hello"),(2,"world"),(4,"!")]

Since: base-4.8.0.0

sortBy :: (a -> a -> Ordering) -> [a] -> [a] #

The sortBy function is the non-overloaded version of sort.

>>> sortBy (\(a,_) (b,_) -> compare a b) [(2, "world"), (4, "!"), (1, "Hello")]
[(1,"Hello"),(2,"world"),(4,"!")]

sort :: Ord a => [a] -> [a] #

The sort function implements a stable sorting algorithm. It is a special case of sortBy, which allows the programmer to supply their own comparison function.

Elements are arranged from from lowest to highest, keeping duplicates in the order they appeared in the input.

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

permutations :: [a] -> [[a]] #

The permutations function returns the list of all permutations of the argument.

>>> permutations "abc"
["abc","bac","cba","bca","cab","acb"]

subsequences :: [a] -> [[a]] #

The subsequences function returns the list of all subsequences of the argument.

>>> subsequences "abc"
["","a","b","ab","c","ac","bc","abc"]

tails :: [a] -> [[a]] #

The tails function returns all final segments of the argument, longest first. For example,

>>> tails "abc"
["abc","bc","c",""]

Note that tails has the following strictness property: tails _|_ = _|_ : _|_

inits :: [a] -> [[a]] #

The inits function returns all initial segments of the argument, shortest first. For example,

>>> inits "abc"
["","a","ab","abc"]

Note that inits has the following strictness property: inits (xs ++ _|_) = inits xs ++ _|_

In particular, inits _|_ = [] : _|_

groupBy :: (a -> a -> Bool) -> [a] -> [[a]] #

The groupBy function is the non-overloaded version of group.

group :: Eq a => [a] -> [[a]] #

The group function takes a list and returns a list of lists such that the concatenation of the result is equal to the argument. Moreover, each sublist in the result contains only equal elements. For example,

>>> group "Mississippi"
["M","i","ss","i","ss","i","pp","i"]

It is a special case of groupBy, which allows the programmer to supply their own equality test.

deleteFirstsBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #

The deleteFirstsBy function takes a predicate and two lists and returns the first list with the first occurrence of each element of the second list removed.

unzip7 :: [(a, b, c, d, e, f, g)] -> ([a], [b], [c], [d], [e], [f], [g]) #

The unzip7 function takes a list of seven-tuples and returns seven lists, analogous to unzip.

unzip6 :: [(a, b, c, d, e, f)] -> ([a], [b], [c], [d], [e], [f]) #

The unzip6 function takes a list of six-tuples and returns six lists, analogous to unzip.

unzip5 :: [(a, b, c, d, e)] -> ([a], [b], [c], [d], [e]) #

The unzip5 function takes a list of five-tuples and returns five lists, analogous to unzip.

unzip4 :: [(a, b, c, d)] -> ([a], [b], [c], [d]) #

The unzip4 function takes a list of quadruples and returns four lists, analogous to unzip.

zipWith7 :: (a -> b -> c -> d -> e -> f -> g -> h) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [h] #

The zipWith7 function takes a function which combines seven elements, as well as seven lists and returns a list of their point-wise combination, analogous to zipWith.

zipWith6 :: (a -> b -> c -> d -> e -> f -> g) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] #

The zipWith6 function takes a function which combines six elements, as well as six lists and returns a list of their point-wise combination, analogous to zipWith.

zipWith5 :: (a -> b -> c -> d -> e -> f) -> [a] -> [b] -> [c] -> [d] -> [e] -> [f] #

The zipWith5 function takes a function which combines five elements, as well as five lists and returns a list of their point-wise combination, analogous to zipWith.

zipWith4 :: (a -> b -> c -> d -> e) -> [a] -> [b] -> [c] -> [d] -> [e] #

The zipWith4 function takes a function which combines four elements, as well as four lists and returns a list of their point-wise combination, analogous to zipWith.

zip7 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [g] -> [(a, b, c, d, e, f, g)] #

The zip7 function takes seven lists and returns a list of seven-tuples, analogous to zip.

zip6 :: [a] -> [b] -> [c] -> [d] -> [e] -> [f] -> [(a, b, c, d, e, f)] #

The zip6 function takes six lists and returns a list of six-tuples, analogous to zip.

zip5 :: [a] -> [b] -> [c] -> [d] -> [e] -> [(a, b, c, d, e)] #

The zip5 function takes five lists and returns a list of five-tuples, analogous to zip.

zip4 :: [a] -> [b] -> [c] -> [d] -> [(a, b, c, d)] #

The zip4 function takes four lists and returns a list of quadruples, analogous to zip.

genericReplicate :: Integral i => i -> a -> [a] #

The genericReplicate function is an overloaded version of replicate, which accepts any Integral value as the number of repetitions to make.

genericIndex :: Integral i => [a] -> i -> a #

The genericIndex function is an overloaded version of !!, which accepts any Integral value as the index.

genericSplitAt :: Integral i => i -> [a] -> ([a], [a]) #

The genericSplitAt function is an overloaded version of splitAt, which accepts any Integral value as the position at which to split.

genericDrop :: Integral i => i -> [a] -> [a] #

The genericDrop function is an overloaded version of drop, which accepts any Integral value as the number of elements to drop.

genericTake :: Integral i => i -> [a] -> [a] #

The genericTake function is an overloaded version of take, which accepts any Integral value as the number of elements to take.

genericLength :: Num i => [a] -> i #

The genericLength function is an overloaded version of length. In particular, instead of returning an Int, it returns any type which is an instance of Num. It is, however, less efficient than length.

insertBy :: (a -> a -> Ordering) -> a -> [a] -> [a] #

The non-overloaded version of insert.

insert :: Ord a => a -> [a] -> [a] #

The insert function takes an element and a list and inserts the element into the list at the first position where it is less than or equal to the next element. In particular, if the list is sorted before the call, the result will also be sorted. It is a special case of insertBy, which allows the programmer to supply their own comparison function.

>>> insert 4 [1,2,3,5,6,7]
[1,2,3,4,5,6,7]

partition :: (a -> Bool) -> [a] -> ([a], [a]) #

The partition function takes a predicate a list and returns the pair of lists of elements which do and do not satisfy the predicate, respectively; i.e.,

partition p xs == (filter p xs, filter (not . p) xs)
>>> partition (`elem` "aeiou") "Hello World!"
("eoo","Hll Wrld!")

transpose :: [[a]] -> [[a]] #

The transpose function transposes the rows and columns of its argument. For example,

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

If some of the rows are shorter than the following rows, their elements are skipped:

>>> transpose [[10,11],[20],[],[30,31,32]]
[[10,20,30],[11,31],[32]]

intercalate :: [a] -> [[a]] -> [a] #

intercalate xs xss is equivalent to (concat (intersperse xs xss)). It inserts the list xs in between the lists in xss and concatenates the result.

>>> intercalate ", " ["Lorem", "ipsum", "dolor"]
"Lorem, ipsum, dolor"

intersperse :: a -> [a] -> [a] #

The intersperse function takes an element and a list and `intersperses' that element between the elements of the list. For example,

>>> intersperse ',' "abcde"
"a,b,c,d,e"

intersectBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #

The intersectBy function is the non-overloaded version of intersect.

intersect :: Eq a => [a] -> [a] -> [a] #

The intersect function takes the list intersection of two lists. For example,

>>> [1,2,3,4] `intersect` [2,4,6,8]
[2,4]

If the first list contains duplicates, so will the result.

>>> [1,2,2,3,4] `intersect` [6,4,4,2]
[2,2,4]

It is a special case of intersectBy, which allows the programmer to supply their own equality test. If the element is found in both the first and the second list, the element from the first list will be used.

unionBy :: (a -> a -> Bool) -> [a] -> [a] -> [a] #

The unionBy function is the non-overloaded version of union.

union :: Eq a => [a] -> [a] -> [a] #

The union function returns the list union of the two lists. For example,

>>> "dog" `union` "cow"
"dogcw"

Duplicates, and elements of the first list, are removed from the the second list, but if the first list contains duplicates, so will the result. It is a special case of unionBy, which allows the programmer to supply their own equality test.

(\\) :: Eq a => [a] -> [a] -> [a] infix 5 #

The \\ function is list difference (non-associative). In the result of xs \\ ys, the first occurrence of each element of ys in turn (if any) has been removed from xs. Thus

(xs ++ ys) \\ xs == ys.
>>> "Hello World!" \\ "ell W"
"Hoorld!"

It is a special case of deleteFirstsBy, which allows the programmer to supply their own equality test.

deleteBy :: (a -> a -> Bool) -> a -> [a] -> [a] #

The deleteBy function behaves like delete, but takes a user-supplied equality predicate.

>>> deleteBy (<=) 4 [1..10]
[1,2,3,5,6,7,8,9,10]

nubBy :: (a -> a -> Bool) -> [a] -> [a] #

The nubBy function behaves just like nub, except it uses a user-supplied equality predicate instead of the overloaded == function.

>>> nubBy (\x y -> mod x 3 == mod y 3) [1,2,4,5,6]
[1,2,6]

nub :: Eq a => [a] -> [a] #

O(n^2). The nub function removes duplicate elements from a list. In particular, it keeps only the first occurrence of each element. (The name nub means `essence'.) It is a special case of nubBy, which allows the programmer to supply their own equality test.

>>> nub [1,2,3,4,3,2,1,2,4,3,5]
[1,2,3,4,5]

isSuffixOf :: Eq a => [a] -> [a] -> Bool #

The isSuffixOf function takes two lists and returns True iff the first list is a suffix of the second. The second list must be finite.

>>> "ld!" `isSuffixOf` "Hello World!"
True
>>> "World" `isSuffixOf` "Hello World!"
False

isPrefixOf :: Eq a => [a] -> [a] -> Bool #

The isPrefixOf function takes two lists and returns True iff the first list is a prefix of the second.

>>> "Hello" `isPrefixOf` "Hello World!"
True
>>> "Hello" `isPrefixOf` "Wello Horld!"
False

findIndices :: (a -> Bool) -> [a] -> [Int] #

The findIndices function extends findIndex, by returning the indices of all elements satisfying the predicate, in ascending order.

>>> findIndices (`elem` "aeiou") "Hello World!"
[1,4,7]

findIndex :: (a -> Bool) -> [a] -> Maybe Int #

The findIndex function takes a predicate and a list and returns the index of the first element in the list satisfying the predicate, or Nothing if there is no such element.

>>> findIndex isSpace "Hello World!"
Just 5

elemIndices :: Eq a => a -> [a] -> [Int] #

The elemIndices function extends elemIndex, by returning the indices of all elements equal to the query element, in ascending order.

>>> elemIndices 'o' "Hello World"
[4,7]

elemIndex :: Eq a => a -> [a] -> Maybe Int #

The elemIndex function returns the index of the first element in the given list which is equal (by ==) to the query element, or Nothing if there is no such element.

>>> elemIndex 4 [0..]
Just 4

stripPrefix :: Eq a => [a] -> [a] -> Maybe [a] #

The stripPrefix function drops the given prefix from a list. It returns Nothing if the list did not start with the prefix given, or Just the list after the prefix, if it does.

>>> stripPrefix "foo" "foobar"
Just "bar"
>>> stripPrefix "foo" "foo"
Just ""
>>> stripPrefix "foo" "barfoo"
Nothing
>>> stripPrefix "foo" "barfoobaz"
Nothing

dropWhileEnd :: (a -> Bool) -> [a] -> [a] #

The dropWhileEnd function drops the largest suffix of a list in which the given predicate holds for all elements. For example:

>>> dropWhileEnd isSpace "foo\n"
"foo"
>>> dropWhileEnd isSpace "foo bar"
"foo bar"
dropWhileEnd isSpace ("foo\n" ++ undefined) == "foo" ++ undefined

Since: base-4.5.0.0

(&) :: a -> (a -> b) -> b infixl 1 #

& is a reverse application operator. This provides notational convenience. Its precedence is one higher than that of the forward application operator $, which allows & to be nested in $.

>>> 5 & (+1) & show
"6"

Since: base-4.8.0.0

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

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

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

unzip3 :: [(a, b, c)] -> ([a], [b], [c]) #

The unzip3 function takes a list of triples and returns three lists, analogous to unzip.

unzip :: [(a, b)] -> ([a], [b]) #

unzip transforms a list of pairs into a list of first components and a list of second components.

zipWith3 :: (a -> b -> c -> d) -> [a] -> [b] -> [c] -> [d] #

The zipWith3 function takes a function which combines three elements, as well as three lists and returns a list of their point-wise combination, analogous to zipWith.

zipWith :: (a -> b -> c) -> [a] -> [b] -> [c] #

zipWith generalises zip by zipping with the function given as the first argument, instead of a tupling function. For example, zipWith (+) is applied to two lists to produce the list of corresponding sums.

zipWith is right-lazy:

zipWith f [] _|_ = []

zip3 :: [a] -> [b] -> [c] -> [(a, b, c)] #

zip3 takes three lists and returns a list of triples, analogous to zip.

(!!) :: [a] -> Int -> a infixl 9 #

List index (subscript) operator, starting from 0. It is an instance of the more general genericIndex, which takes an index of any integral type.

lookup :: Eq a => a -> [(a, b)] -> Maybe b #

lookup key assocs looks up a key in an association list.

reverse :: [a] -> [a] #

reverse xs returns the elements of xs in reverse order. xs must be finite.

break :: (a -> Bool) -> [a] -> ([a], [a]) #

break, applied to a predicate p and a list xs, returns a tuple where first element is longest prefix (possibly empty) of xs of elements that do not satisfy p and second element is the remainder of the list:

break (> 3) [1,2,3,4,1,2,3,4] == ([1,2,3],[4,1,2,3,4])
break (< 9) [1,2,3] == ([],[1,2,3])
break (> 9) [1,2,3] == ([1,2,3],[])

break p is equivalent to span (not . p).

span :: (a -> Bool) -> [a] -> ([a], [a]) #

span, applied to a predicate p and a list xs, returns a tuple where first element is longest prefix (possibly empty) of xs of elements that satisfy p and second element is the remainder of the list:

span (< 3) [1,2,3,4,1,2,3,4] == ([1,2],[3,4,1,2,3,4])
span (< 9) [1,2,3] == ([1,2,3],[])
span (< 0) [1,2,3] == ([],[1,2,3])

span p xs is equivalent to (takeWhile p xs, dropWhile p xs)

splitAt :: Int -> [a] -> ([a], [a]) #

splitAt n xs returns a tuple where first element is xs prefix of length n and second element is the remainder of the list:

splitAt 6 "Hello World!" == ("Hello ","World!")
splitAt 3 [1,2,3,4,5] == ([1,2,3],[4,5])
splitAt 1 [1,2,3] == ([1],[2,3])
splitAt 3 [1,2,3] == ([1,2,3],[])
splitAt 4 [1,2,3] == ([1,2,3],[])
splitAt 0 [1,2,3] == ([],[1,2,3])
splitAt (-1) [1,2,3] == ([],[1,2,3])

It is equivalent to (take n xs, drop n xs) when n is not _|_ (splitAt _|_ xs = _|_). splitAt is an instance of the more general genericSplitAt, in which n may be of any integral type.

drop :: Int -> [a] -> [a] #

drop n xs returns the suffix of xs after the first n elements, or [] if n > length xs:

drop 6 "Hello World!" == "World!"
drop 3 [1,2,3,4,5] == [4,5]
drop 3 [1,2] == []
drop 3 [] == []
drop (-1) [1,2] == [1,2]
drop 0 [1,2] == [1,2]

It is an instance of the more general genericDrop, in which n may be of any integral type.

take :: Int -> [a] -> [a] #

take n, applied to a list xs, returns the prefix of xs of length n, or xs itself if n > length xs:

take 5 "Hello World!" == "Hello"
take 3 [1,2,3,4,5] == [1,2,3]
take 3 [1,2] == [1,2]
take 3 [] == []
take (-1) [1,2] == []
take 0 [1,2] == []

It is an instance of the more general genericTake, in which n may be of any integral type.

dropWhile :: (a -> Bool) -> [a] -> [a] #

dropWhile p xs returns the suffix remaining after takeWhile p xs:

dropWhile (< 3) [1,2,3,4,5,1,2,3] == [3,4,5,1,2,3]
dropWhile (< 9) [1,2,3] == []
dropWhile (< 0) [1,2,3] == [1,2,3]

takeWhile :: (a -> Bool) -> [a] -> [a] #

takeWhile, applied to a predicate p and a list xs, returns the longest prefix (possibly empty) of xs of elements that satisfy p:

takeWhile (< 3) [1,2,3,4,1,2,3,4] == [1,2]
takeWhile (< 9) [1,2,3] == [1,2,3]
takeWhile (< 0) [1,2,3] == []

cycle :: [a] -> [a] #

cycle ties a finite list into a circular one, or equivalently, the infinite repetition of the original list. It is the identity on infinite lists.

replicate :: Int -> a -> [a] #

replicate n x is a list of length n with x the value of every element. It is an instance of the more general genericReplicate, in which n may be of any integral type.

repeat :: a -> [a] #

repeat x is an infinite list, with x the value of every element.

iterate' :: (a -> a) -> a -> [a] #

'iterate\'' is the strict version of iterate.

It ensures that the result of each application of force to weak head normal form before proceeding.

iterate :: (a -> a) -> a -> [a] #

iterate f x returns an infinite list of repeated applications of f to x:

iterate f x == [x, f x, f (f x), ...]

Note that iterate is lazy, potentially leading to thunk build-up if the consumer doesn't force each iterate. See 'iterate\'' for a strict variant of this function.

scanr1 :: (a -> a -> a) -> [a] -> [a] #

scanr1 is a variant of scanr that has no starting value argument.

scanr :: (a -> b -> b) -> b -> [a] -> [b] #

scanr is the right-to-left dual of scanl. Note that

head (scanr f z xs) == foldr f z xs.

scanl' :: (b -> a -> b) -> b -> [a] -> [b] #

A strictly accumulating version of scanl

scanl1 :: (a -> a -> a) -> [a] -> [a] #

scanl1 is a variant of scanl that has no starting value argument:

scanl1 f [x1, x2, ...] == [x1, x1 `f` x2, ...]

scanl :: (b -> a -> b) -> b -> [a] -> [b] #

scanl is similar to foldl, but returns a list of successive reduced values from the left:

scanl f z [x1, x2, ...] == [z, z `f` x1, (z `f` x1) `f` x2, ...]

Note that

last (scanl f z xs) == foldl f z xs.

foldl1' :: (a -> a -> a) -> [a] -> a #

A strict version of foldl1

init :: [a] -> [a] #

Return all the elements of a list except the last one. The list must be non-empty.

last :: [a] -> a #

Extract the last element of a list, which must be finite and non-empty.

tail :: [a] -> [a] #

Extract the elements after the head of a list, which must be non-empty.

uncons :: [a] -> Maybe (a, [a]) #

Decompose a list into its head and tail. If the list is empty, returns Nothing. If the list is non-empty, returns Just (x, xs), where x is the head of the list and xs its tail.

Since: base-4.8.0.0

head :: [a] -> a #

Extract the first element of a list, which must be non-empty.

mapMaybe :: (a -> Maybe b) -> [a] -> [b] #

The mapMaybe function is a version of map which can throw out elements. In particular, the functional argument returns something of type Maybe b. If this is Nothing, no element is added on to the result list. If it is Just b, then b is included in the result list.

Examples

Expand

Using mapMaybe f x is a shortcut for catMaybes $ map f x in most cases:

>>> import Text.Read ( readMaybe )
>>> let readMaybeInt = readMaybe :: String -> Maybe Int
>>> mapMaybe readMaybeInt ["1", "Foo", "3"]
[1,3]
>>> catMaybes $ map readMaybeInt ["1", "Foo", "3"]
[1,3]

If we map the Just constructor, the entire list should be returned:

>>> mapMaybe Just [1,2,3]
[1,2,3]

catMaybes :: [Maybe a] -> [a] #

The catMaybes function takes a list of Maybes and returns a list of all the Just values.

Examples

Expand

Basic usage:

>>> catMaybes [Just 1, Nothing, Just 3]
[1,3]

When constructing a list of Maybe values, catMaybes can be used to return all of the "success" results (if the list is the result of a map, then mapMaybe would be more appropriate):

>>> import Text.Read ( readMaybe )
>>> [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
[Just 1,Nothing,Just 3]
>>> catMaybes $ [readMaybe x :: Maybe Int | x <- ["1", "Foo", "3"] ]
[1,3]

listToMaybe :: [a] -> Maybe a #

The listToMaybe function returns Nothing on an empty list or Just a where a is the first element of the list.

Examples

Expand

Basic usage:

>>> listToMaybe []
Nothing
>>> listToMaybe [9]
Just 9
>>> listToMaybe [1,2,3]
Just 1

Composing maybeToList with listToMaybe should be the identity on singleton/empty lists:

>>> maybeToList $ listToMaybe [5]
[5]
>>> maybeToList $ listToMaybe []
[]

But not on lists with more than one element:

>>> maybeToList $ listToMaybe [1,2,3]
[1]

maybeToList :: Maybe a -> [a] #

The maybeToList function returns an empty list when given Nothing or a singleton list when not given Nothing.

Examples

Expand

Basic usage:

>>> maybeToList (Just 7)
[7]
>>> maybeToList Nothing
[]

One can use maybeToList to avoid pattern matching when combined with a function that (safely) works on lists:

>>> import Text.Read ( readMaybe )
>>> sum $ maybeToList (readMaybe "3")
3
>>> sum $ maybeToList (readMaybe "")
0

fromMaybe :: a -> Maybe a -> a #

The fromMaybe function takes a default value and and Maybe value. If the Maybe is Nothing, it returns the default values; otherwise, it returns the value contained in the Maybe.

Examples

Expand

Basic usage:

>>> fromMaybe "" (Just "Hello, World!")
"Hello, World!"
>>> fromMaybe "" Nothing
""

Read an integer from a string using readMaybe. If we fail to parse an integer, we want to return 0 by default:

>>> import Text.Read ( readMaybe )
>>> fromMaybe 0 (readMaybe "5")
5
>>> fromMaybe 0 (readMaybe "")
0

fromJust :: Maybe a -> a #

The fromJust function extracts the element out of a Just and throws an error if its argument is Nothing.

Examples

Expand

Basic usage:

>>> fromJust (Just 1)
1
>>> 2 * (fromJust (Just 10))
20
>>> 2 * (fromJust Nothing)
*** Exception: Maybe.fromJust: Nothing

isNothing :: Maybe a -> Bool #

The isNothing function returns True iff its argument is Nothing.

Examples

Expand

Basic usage:

>>> isNothing (Just 3)
False
>>> isNothing (Just ())
False
>>> isNothing Nothing
True

Only the outer constructor is taken into consideration:

>>> isNothing (Just Nothing)
False

isJust :: Maybe a -> Bool #

The isJust function returns True iff its argument is of the form Just _.

Examples

Expand

Basic usage:

>>> isJust (Just 3)
True
>>> isJust (Just ())
True
>>> isJust Nothing
False

Only the outer constructor is taken into consideration:

>>> isJust (Just Nothing)
True

maybe :: b -> (a -> b) -> Maybe a -> b #

The maybe function takes a default value, a function, and a Maybe value. If the Maybe value is Nothing, the function returns the default value. Otherwise, it applies the function to the value inside the Just and returns the result.

Examples

Expand

Basic usage:

>>> maybe False odd (Just 3)
True
>>> maybe False odd Nothing
False

Read an integer from a string using readMaybe. If we succeed, return twice the integer; that is, apply (*2) to it. If instead we fail to parse an integer, return 0 by default:

>>> import Text.Read ( readMaybe )
>>> maybe 0 (*2) (readMaybe "5")
10
>>> maybe 0 (*2) (readMaybe "")
0

Apply show to a Maybe Int. If we have Just n, we want to show the underlying Int n. But if we have Nothing, we return the empty string instead of (for example) "Nothing":

>>> maybe "" show (Just 5)
"5"
>>> maybe "" show Nothing
""

ap :: Monad m => m (a -> b) -> m a -> m b #

In many situations, the liftM operations can be replaced by uses of ap, which promotes function application.

return f `ap` x1 `ap` ... `ap` xn

is equivalent to

liftMn f x1 x2 ... xn

liftM5 :: Monad m => (a1 -> a2 -> a3 -> a4 -> a5 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m a5 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).

liftM4 :: Monad m => (a1 -> a2 -> a3 -> a4 -> r) -> m a1 -> m a2 -> m a3 -> m a4 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).

liftM3 :: Monad m => (a1 -> a2 -> a3 -> r) -> m a1 -> m a2 -> m a3 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right (cf. liftM2).

liftM2 :: Monad m => (a1 -> a2 -> r) -> m a1 -> m a2 -> m r #

Promote a function to a monad, scanning the monadic arguments from left to right. For example,

liftM2 (+) [0,1] [0,2] = [0,2,1,3]
liftM2 (+) (Just 1) Nothing = Nothing

when :: Applicative f => Bool -> f () -> f () #

Conditional execution of Applicative expressions. For example,

when debug (putStrLn "Debugging")

will output the string Debugging if the Boolean value debug is True, and otherwise do nothing.

(=<<) :: Monad m => (a -> m b) -> m a -> m b infixr 1 #

Same as >>=, but with the arguments interchanged.

liftA3 :: Applicative f => (a -> b -> c -> d) -> f a -> f b -> f c -> f d #

Lift a ternary function to actions.

liftA :: Applicative f => (a -> b) -> f a -> f b #

Lift a function to actions. This function may be used as a value for fmap in a Functor instance.

(<**>) :: Applicative f => f a -> f (a -> b) -> f b infixl 4 #

A variant of <*> with the arguments reversed.

data ReaderT r (m :: k -> Type) (a :: k) :: forall k. Type -> (k -> Type) -> k -> Type #

The reader monad transformer, which adds a read-only environment to the given monad.

The return function ignores the environment, while >>= passes the inherited environment to both subcomputations.

Instances
Monad m => MonadReader r (ReaderT r m) 
Instance details

Defined in Control.Monad.Reader.Class

Methods

ask :: ReaderT r m r #

local :: (r -> r) -> ReaderT r m a -> ReaderT r m a #

reader :: (r -> a) -> ReaderT r m a #

MonadBaseControl b m => MonadBaseControl b (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StM (ReaderT r m) a :: Type #

Methods

liftBaseWith :: (RunInBase (ReaderT r m) b -> b a) -> ReaderT r m a #

restoreM :: StM (ReaderT r m) a -> ReaderT r m a #

MonadError e m => MonadError e (ReaderT r m) 
Instance details

Defined in Control.Monad.Error.Class

Methods

throwError :: e -> ReaderT r m a #

catchError :: ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a #

MonadBase b m => MonadBase b (ReaderT r m) 
Instance details

Defined in Control.Monad.Base

Methods

liftBase :: b α -> ReaderT r m α #

MonadTrans (ReaderT r :: (Type -> Type) -> Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

lift :: Monad m => m a -> ReaderT r m a #

MonadTransControl (ReaderT r :: (Type -> Type) -> Type -> Type) 
Instance details

Defined in Control.Monad.Trans.Control

Associated Types

type StT (ReaderT r) a :: Type #

Methods

liftWith :: Monad m => (Run (ReaderT r) -> m a) -> ReaderT r m a #

restoreT :: Monad m => m (StT (ReaderT r) a) -> ReaderT r m a #

FunctorWithIndex i m => FunctorWithIndex (e, i) (ReaderT e m) 
Instance details

Defined in Control.Lens.Indexed

Methods

imap :: ((e, i) -> a -> b) -> ReaderT e m a -> ReaderT e m b #

imapped :: IndexedSetter (e, i) (ReaderT e m a) (ReaderT e m b) a b #

Monad m => Monad (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

(>>=) :: ReaderT r m a -> (a -> ReaderT r m b) -> ReaderT r m b #

(>>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

return :: a -> ReaderT r m a #

fail :: String -> ReaderT r m a #

Functor m => Functor (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fmap :: (a -> b) -> ReaderT r m a -> ReaderT r m b #

(<$) :: a -> ReaderT r m b -> ReaderT r m a #

MonadFix m => MonadFix (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mfix :: (a -> ReaderT r m a) -> ReaderT r m a #

MonadFail m => MonadFail (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

fail :: String -> ReaderT r m a #

Applicative m => Applicative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

pure :: a -> ReaderT r m a #

(<*>) :: ReaderT r m (a -> b) -> ReaderT r m a -> ReaderT r m b #

liftA2 :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

(*>) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m b #

(<*) :: ReaderT r m a -> ReaderT r m b -> ReaderT r m a #

Contravariant m => Contravariant (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

contramap :: (a -> b) -> ReaderT r m b -> ReaderT r m a #

(>$) :: b -> ReaderT r m b -> ReaderT r m a #

Representable m => Representable (ReaderT e m) 
Instance details

Defined in Data.Functor.Rep

Associated Types

type Rep (ReaderT e m) :: Type #

Methods

tabulate :: (Rep (ReaderT e m) -> a) -> ReaderT e m a #

index :: ReaderT e m a -> Rep (ReaderT e m) -> a #

Alternative m => Alternative (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

empty :: ReaderT r m a #

(<|>) :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

some :: ReaderT r m a -> ReaderT r m [a] #

many :: ReaderT r m a -> ReaderT r m [a] #

MonadPlus m => MonadPlus (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzero :: ReaderT r m a #

mplus :: ReaderT r m a -> ReaderT r m a -> ReaderT r m a #

MonadZip m => MonadZip (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

mzip :: ReaderT r m a -> ReaderT r m b -> ReaderT r m (a, b) #

mzipWith :: (a -> b -> c) -> ReaderT r m a -> ReaderT r m b -> ReaderT r m c #

munzip :: ReaderT r m (a, b) -> (ReaderT r m a, ReaderT r m b) #

MonadIO m => MonadIO (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Reader

Methods

liftIO :: IO a -> ReaderT r m a #

MonadResource m => MonadResource (ReaderT r m) 
Instance details

Defined in Control.Monad.Trans.Resource.Internal

Methods

liftResourceT :: ResourceT IO a -> ReaderT r m a #

PrimMonad m => PrimMonad (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

Associated Types

type PrimState (ReaderT r m) :: Type #

Methods

primitive :: (State# (PrimState (ReaderT r m)) -> (#State# (PrimState (ReaderT r m)), a#)) -> ReaderT r m a #

MonadThrow m => MonadThrow (ReaderT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

throwM :: Exception e => e -> ReaderT r m a #

MonadCatch m => MonadCatch (ReaderT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

catch :: Exception e => ReaderT r m a -> (e -> ReaderT r m a) -> ReaderT r m a #

MonadMask m => MonadMask (ReaderT r m) 
Instance details

Defined in Control.Monad.Catch

Methods

mask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

uninterruptibleMask :: ((forall a. ReaderT r m a -> ReaderT r m a) -> ReaderT r m b) -> ReaderT r m b #

generalBracket :: ReaderT r m a -> (a -> ExitCase b -> ReaderT r m c) -> (a -> ReaderT r m b) -> ReaderT r m (b, c) #

Zoom m n s t => Zoom (ReaderT e m) (ReaderT e n) s t 
Instance details

Defined in Control.Lens.Zoom

Methods

zoom :: LensLike' (Zoomed (ReaderT e m) c) t s -> ReaderT e m c -> ReaderT e n c #

Monad m => Magnify (ReaderT b m) (ReaderT a m) b a 
Instance details

Defined in Control.Lens.Zoom

Methods

magnify :: LensLike' (Magnified (ReaderT b m) c) a b -> ReaderT b m c -> ReaderT a m c #

Wrapped (ReaderT r m a) 
Instance details

Defined in Control.Lens.Wrapped

Associated Types

type Unwrapped (ReaderT r m a) :: Type #

Methods

_Wrapped' :: Iso' (ReaderT r m a) (Unwrapped (ReaderT r m a)) #

Functor m => MonoFunctor (ReaderT r m a) 
Instance details

Defined in Data.MonoTraversable

Methods

omap :: (Element (ReaderT r m a) -> Element (ReaderT r m a)) -> ReaderT r m a -> ReaderT r m a #

Applicative m => MonoPointed (ReaderT r m a) 
Instance details

Defined in Data.MonoTraversable

Methods

opoint :: Element (ReaderT r m a) -> ReaderT r m a #

t ~ ReaderT s n b => Rewrapped (ReaderT r m a) t 
Instance details

Defined in Control.Lens.Wrapped

type StT (ReaderT r :: (Type -> Type) -> Type -> Type) a 
Instance details

Defined in Control.Monad.Trans.Control

type StT (ReaderT r :: (Type -> Type) -> Type -> Type) a = a
type Rep (ReaderT e m) 
Instance details

Defined in Data.Functor.Rep

type Rep (ReaderT e m) = (e, Rep m)
type PrimState (ReaderT r m) 
Instance details

Defined in Control.Monad.Primitive

type PrimState (ReaderT r m) = PrimState m
type Zoomed (ReaderT e m) 
Instance details

Defined in Control.Lens.Zoom

type Zoomed (ReaderT e m) = Zoomed m
type Magnified (ReaderT b m) 
Instance details

Defined in Control.Lens.Zoom

type Magnified (ReaderT b m) = Effect m
type StM (ReaderT r m) a 
Instance details

Defined in Control.Monad.Trans.Control

type StM (ReaderT r m) a = ComposeSt (ReaderT r :: (Type -> Type) -> Type -> Type) m a
type Unwrapped (ReaderT r m a) 
Instance details

Defined in Control.Lens.Wrapped

type Unwrapped (ReaderT r m a) = r -> m a
type Element (ReaderT r m a) 
Instance details

Defined in Data.MonoTraversable

type Element (ReaderT r m a) = a

(</>) :: FilePath -> FilePath -> FilePath infixr 5 #

Combine two paths with a path separator. If the second path starts with a path separator or a drive letter, then it returns the second. The intention is that readFile (dir </> file) will access the same file as setCurrentDirectory dir; readFile file.

Posix:   "/directory" </> "file.ext" == "/directory/file.ext"
Windows: "/directory" </> "file.ext" == "/directory\\file.ext"
         "directory" </> "/file.ext" == "/file.ext"
Valid x => (takeDirectory x </> takeFileName x) `equalFilePath` x

Combined:

Posix:   "/" </> "test" == "/test"
Posix:   "home" </> "bob" == "home/bob"
Posix:   "x:" </> "foo" == "x:/foo"
Windows: "C:\\foo" </> "bar" == "C:\\foo\\bar"
Windows: "home" </> "bob" == "home\\bob"

Not combined:

Posix:   "home" </> "/bob" == "/bob"
Windows: "home" </> "C:\\bob" == "C:\\bob"

Not combined (tricky):

On Windows, if a filepath starts with a single slash, it is relative to the root of the current drive. In [1], this is (confusingly) referred to as an absolute path. The current behavior of </> is to never combine these forms.

Windows: "home" </> "/bob" == "/bob"
Windows: "home" </> "\\bob" == "\\bob"
Windows: "C:\\home" </> "\\bob" == "\\bob"

On Windows, from [1]: "If a file name begins with only a disk designator but not the backslash after the colon, it is interpreted as a relative path to the current directory on the drive with the specified letter." The current behavior of </> is to never combine these forms.

Windows: "D:\\foo" </> "C:bar" == "C:bar"
Windows: "C:\\foo" </> "C:bar" == "C:bar"

takeDirectory :: FilePath -> FilePath #

Get the directory name, move up one level.

          takeDirectory "/directory/other.ext" == "/directory"
          takeDirectory x `isPrefixOf` x || takeDirectory x == "."
          takeDirectory "foo" == "."
          takeDirectory "/" == "/"
          takeDirectory "/foo" == "/"
          takeDirectory "/foo/bar/baz" == "/foo/bar"
          takeDirectory "/foo/bar/baz/" == "/foo/bar/baz"
          takeDirectory "foo/bar/baz" == "foo/bar"
Windows:  takeDirectory "foo\\bar" == "foo"
Windows:  takeDirectory "foo\\bar\\\\" == "foo\\bar"
Windows:  takeDirectory "C:\\" == "C:\\"

takeFileName :: FilePath -> FilePath #

Get the file name.

takeFileName "/directory/file.ext" == "file.ext"
takeFileName "test/" == ""
takeFileName x `isSuffixOf` x
takeFileName x == snd (splitFileName x)
Valid x => takeFileName (replaceFileName x "fred") == "fred"
Valid x => takeFileName (x </> "fred") == "fred"
Valid x => isRelative (takeFileName x)

(<.>) :: FilePath -> String -> FilePath infixr 7 #

Add an extension, even if there is already one there, equivalent to addExtension.

"/directory/path" <.> "ext" == "/directory/path.ext"
"/directory/path" <.> ".ext" == "/directory/path.ext"

replaceExtension :: FilePath -> String -> FilePath #

Set the extension of a file, overwriting one if already present, equivalent to -<.>.

replaceExtension "/directory/path.txt" "ext" == "/directory/path.ext"
replaceExtension "/directory/path.txt" ".ext" == "/directory/path.ext"
replaceExtension "file.txt" ".bob" == "file.bob"
replaceExtension "file.txt" "bob" == "file.bob"
replaceExtension "file" ".bob" == "file.bob"
replaceExtension "file.txt" "" == "file"
replaceExtension "file.fred.bob" "txt" == "file.fred.txt"
replaceExtension x y == addExtension (dropExtension x) y

(^.) :: s -> Getting a s a -> a infixl 8 #

View the value pointed to by a Getter or Lens or the result of folding over all the results of a Fold or Traversal that points at a monoidal values.

This is the same operation as view with the arguments flipped.

The fixity and semantics are such that subsequent field accesses can be performed with (.).

>>> (a,b)^._2
b
>>> ("hello","world")^._2
"world"
>>> import Data.Complex
>>> ((0, 1 :+ 2), 3)^._1._2.to magnitude
2.23606797749979
(^.) ::             s -> Getter s a     -> a
(^.) :: Monoid m => s -> Fold s m       -> m
(^.) ::             s -> Iso' s a       -> a
(^.) ::             s -> Lens' s a      -> a
(^.) :: Monoid m => s -> Traversal' s m -> m

(.~) :: ASetter s t a b -> b -> s -> t infixr 4 #

Replace the target of a Lens or all of the targets of a Setter or Traversal with a constant value.

This is an infix version of set, provided for consistency with (.=).

f <$ a ≡ mapped .~ f $ a
>>> (a,b,c,d) & _4 .~ e
(a,b,c,e)
>>> (42,"world") & _1 .~ "hello"
("hello","world")
>>> (a,b) & both .~ c
(c,c)
(.~) :: Setter s t a b    -> b -> s -> t
(.~) :: Iso s t a b       -> b -> s -> t
(.~) :: Lens s t a b      -> b -> s -> t
(.~) :: Traversal s t a b -> b -> s -> t

(%~) :: ASetter s t a b -> (a -> b) -> s -> t infixr 4 #

Modifies the target of a Lens or all of the targets of a Setter or Traversal with a user supplied function.

This is an infix version of over.

fmap f ≡ mapped %~ f
fmapDefault f ≡ traverse %~ f
>>> (a,b,c) & _3 %~ f
(a,b,f c)
>>> (a,b) & both %~ f
(f a,f b)
>>> _2 %~ length $ (1,"hello")
(1,5)
>>> traverse %~ f $ [a,b,c]
[f a,f b,f c]
>>> traverse %~ even $ [1,2,3]
[False,True,False]
>>> traverse.traverse %~ length $ [["hello","world"],["!!!"]]
[[5,5],[3]]
(%~) :: Setter s t a b    -> (a -> b) -> s -> t
(%~) :: Iso s t a b       -> (a -> b) -> s -> t
(%~) :: Lens s t a b      -> (a -> b) -> s -> t
(%~) :: Traversal s t a b -> (a -> b) -> s -> t

type Lens s t a b = forall (f :: Type -> Type). Functor f => (a -> f b) -> s -> f t #

A Lens is actually a lens family as described in http://comonad.com/reader/2012/mirrored-lenses/.

With great power comes great responsibility and a Lens is subject to the three common sense Lens laws:

1) You get back what you put in:

view l (set l v s)  ≡ v

2) Putting back what you got doesn't change anything:

set l (view l s) s  ≡ s

3) Setting twice is the same as setting once:

set l v' (set l v s) ≡ set l v' s

These laws are strong enough that the 4 type parameters of a Lens cannot vary fully independently. For more on how they interact, read the "Why is it a Lens Family?" section of http://comonad.com/reader/2012/mirrored-lenses/.

There are some emergent properties of these laws:

1) set l s must be injective for every s This is a consequence of law #1

2) set l must be surjective, because of law #2, which indicates that it is possible to obtain any v from some s such that set s v = s

3) Given just the first two laws you can prove a weaker form of law #3 where the values v that you are setting match:

set l v (set l v s) ≡ set l v s

Every Lens can be used directly as a Setter or Traversal.

You can also use a Lens for Getting as if it were a Fold or Getter.

Since every Lens is a valid Traversal, the Traversal laws are required of any Lens you create:

l purepure
fmap (l f) . l g ≡ getCompose . l (Compose . fmap f . g)
type Lens s t a b = forall f. Functor f => LensLike f s t a b

ppShow :: Show a => a -> String #

Convert a generic value into a pretty Value, if possible.

newtype B9Error Source #

This is a simple runtime exception to indicate that B9 code encountered some exceptional event.

Since: 0.5.64

Constructors

MkB9Error 

Fields

Instances
Show B9Error Source # 
Instance details

Defined in B9.B9Error

IsString B9Error Source # 
Instance details

Defined in B9.B9Error

Methods

fromString :: String -> B9Error #

Exception B9Error Source # 
Instance details

Defined in B9.B9Error

type ExcB9 = Exc SomeException Source #

The exception effect used in most places in B9. This is Exc specialized with SomeException.

Since: 0.5.64

runExcB9 :: Eff (ExcB9 ': e) a -> Eff e (Either SomeException a) Source #

Run an ExcB9.

Since: 0.5.64

errorOnException :: Eff (ExcB9 ': e) a -> Eff e a Source #

Run an ExcB9 and rethrow the exception with error.

Since: 0.5.64

throwSomeException :: (Member ExcB9 e, Exception x) => x -> Eff e a Source #

SomeException wrapped into Excecption Effects

Since: 0.5.64

throwSomeException_ :: (Member ExcB9 e, Exception x) => x -> Eff e () Source #

SomeException wrapped into Excecption Effects

Since: 0.5.64

throwB9Error :: Member ExcB9 e => String -> Eff e a Source #

SomeException wrapped into Excecption Effects

Since: 0.5.64

throwB9Error_ :: Member ExcB9 e => String -> Eff e () Source #

SomeException wrapped into Excecption Effects

Since: 0.5.64

catchB9Error :: Member ExcB9 e => Eff e a -> (SomeException -> Eff e a) -> Eff e a Source #

Catch exceptions.

Since: 0.5.64

catchB9ErrorAsEither :: Member ExcB9 e => Eff e a -> Eff e (Either SomeException a) Source #

Catch exceptions and return them via Either.

Since: 0.5.64

halfSize :: Gen a -> Gen a Source #

smaller :: Gen a -> Gen a Source #

newtype SharedImageBuildId Source #

Every B9 build running in a B9Monad contains a random unique id that is generated once per build (no matter how many artifacts are created in that build) This field contains the build id of the build that created the shared image instance. This is A wrapper around a string contains the build id of a SharedImage; this is purely additional convenience and typesafety

Instances
Eq SharedImageBuildId Source # 
Instance details

Defined in B9.DiskImages

Data SharedImageBuildId Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: SharedImageBuildId -> Constr #

dataTypeOf :: SharedImageBuildId -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SharedImageBuildId Source # 
Instance details

Defined in B9.DiskImages

Read SharedImageBuildId Source # 
Instance details

Defined in B9.DiskImages

Show SharedImageBuildId Source # 
Instance details

Defined in B9.DiskImages

Hashable SharedImageBuildId Source # 
Instance details

Defined in B9.DiskImages

Binary SharedImageBuildId Source # 
Instance details

Defined in B9.DiskImages

NFData SharedImageBuildId Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: SharedImageBuildId -> () #

newtype SharedImageDate Source #

The exact time that build job started. This is a wrapper around a string contains the build date of a SharedImage; this is purely additional convenience and typesafety

Constructors

SharedImageDate String 
Instances
Eq SharedImageDate Source # 
Instance details

Defined in B9.DiskImages

Data SharedImageDate Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: SharedImageDate -> Constr #

dataTypeOf :: SharedImageDate -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SharedImageDate Source # 
Instance details

Defined in B9.DiskImages

Read SharedImageDate Source # 
Instance details

Defined in B9.DiskImages

Show SharedImageDate Source # 
Instance details

Defined in B9.DiskImages

Hashable SharedImageDate Source # 
Instance details

Defined in B9.DiskImages

Binary SharedImageDate Source # 
Instance details

Defined in B9.DiskImages

NFData SharedImageDate Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: SharedImageDate -> () #

newtype SharedImageName Source #

The name of the image is the de-facto identifier for push, pull, From and Share. B9 always selects the newest version the shared image identified by that name when using a shared image as an ImageSource. This is a wrapper around a string that identifies a SharedImage

Constructors

SharedImageName String 
Instances
Eq SharedImageName Source # 
Instance details

Defined in B9.DiskImages

Data SharedImageName Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: SharedImageName -> Constr #

dataTypeOf :: SharedImageName -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SharedImageName Source # 
Instance details

Defined in B9.DiskImages

Read SharedImageName Source # 
Instance details

Defined in B9.DiskImages

Show SharedImageName Source # 
Instance details

Defined in B9.DiskImages

Arbitrary SharedImageName Source # 
Instance details

Defined in B9.DiskImages

Hashable SharedImageName Source # 
Instance details

Defined in B9.DiskImages

Binary SharedImageName Source # 
Instance details

Defined in B9.DiskImages

NFData SharedImageName Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: SharedImageName -> () #

type RuleResult SharedImageName Source # 
Instance details

Defined in B9.Shake.SharedImageRules

data SharedImage Source #

SharedImage holds all data necessary to describe an instance of a shared image identified by a SharedImageName. Shared images are stored in Repositorys.

Instances
Eq SharedImage Source # 
Instance details

Defined in B9.DiskImages

Data SharedImage Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: SharedImage -> Constr #

dataTypeOf :: SharedImage -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SharedImage Source #

Shared images are orderd by name, build date and build id

Instance details

Defined in B9.DiskImages

Read SharedImage Source # 
Instance details

Defined in B9.DiskImages

Show SharedImage Source # 
Instance details

Defined in B9.DiskImages

Generic SharedImage Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep SharedImage :: Type -> Type #

Hashable SharedImage Source # 
Instance details

Defined in B9.DiskImages

Binary SharedImage Source # 
Instance details

Defined in B9.DiskImages

NFData SharedImage Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: SharedImage -> () #

type Rep SharedImage Source # 
Instance details

Defined in B9.DiskImages

type Mounted a = (a, MountPoint) Source #

A type alias that indicates that something of type a is mount at a MountPoint

data ImageResize Source #

How to resize an image file.

Constructors

ResizeImage ImageSize

Resize the image but not the file system. Note that a file system contained in the image file might be corrupted by this operation. To not only resize the image file but also the fil system contained in it, use Resize.

Resize ImageSize

Resize an image and the contained file system.

ShrinkToMinimum

Resize an image and the contained file system to the smallest size to fit the contents of the file system.

KeepSize

Do not change the image size.

Instances
Eq ImageResize Source # 
Instance details

Defined in B9.DiskImages

Data ImageResize Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: ImageResize -> Constr #

dataTypeOf :: ImageResize -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ImageResize Source # 
Instance details

Defined in B9.DiskImages

Show ImageResize Source # 
Instance details

Defined in B9.DiskImages

Generic ImageResize Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep ImageResize :: Type -> Type #

Arbitrary ImageResize Source # 
Instance details

Defined in B9.DiskImages

Hashable ImageResize Source # 
Instance details

Defined in B9.DiskImages

Binary ImageResize Source # 
Instance details

Defined in B9.DiskImages

NFData ImageResize Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: ImageResize -> () #

type Rep ImageResize Source # 
Instance details

Defined in B9.DiskImages

type Rep ImageResize = D1 (MetaData "ImageResize" "B9.DiskImages" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) ((C1 (MetaCons "ResizeImage" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ImageSize)) :+: C1 (MetaCons "Resize" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ImageSize))) :+: (C1 (MetaCons "ShrinkToMinimum" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "KeepSize" PrefixI False) (U1 :: Type -> Type)))

data SizeUnit Source #

Enumeration of size multipliers. The exact semantics may vary depending on what external tools look at these. E.g. the size unit is convert to a size parameter of the qemu-img command line tool.

Constructors

B 
KB 
MB 
GB 
Instances
Eq SizeUnit Source # 
Instance details

Defined in B9.DiskImages

Data SizeUnit Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: SizeUnit -> Constr #

dataTypeOf :: SizeUnit -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SizeUnit Source # 
Instance details

Defined in B9.DiskImages

Read SizeUnit Source # 
Instance details

Defined in B9.DiskImages

Show SizeUnit Source # 
Instance details

Defined in B9.DiskImages

Generic SizeUnit Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep SizeUnit :: Type -> Type #

Methods

from :: SizeUnit -> Rep SizeUnit x #

to :: Rep SizeUnit x -> SizeUnit #

Arbitrary SizeUnit Source # 
Instance details

Defined in B9.DiskImages

Hashable SizeUnit Source # 
Instance details

Defined in B9.DiskImages

Methods

hashWithSalt :: Int -> SizeUnit -> Int #

hash :: SizeUnit -> Int #

Binary SizeUnit Source # 
Instance details

Defined in B9.DiskImages

Methods

put :: SizeUnit -> Put #

get :: Get SizeUnit #

putList :: [SizeUnit] -> Put #

NFData SizeUnit Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: SizeUnit -> () #

type Rep SizeUnit Source # 
Instance details

Defined in B9.DiskImages

type Rep SizeUnit = D1 (MetaData "SizeUnit" "B9.DiskImages" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) ((C1 (MetaCons "B" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "KB" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "MB" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "GB" PrefixI False) (U1 :: Type -> Type)))

data ImageSize Source #

A data type for image file or file system size; instead of passing Ints around this also captures a size unit so that the Int can be kept small

Constructors

ImageSize Int SizeUnit 
Instances
Eq ImageSize Source # 
Instance details

Defined in B9.DiskImages

Data ImageSize Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: ImageSize -> Constr #

dataTypeOf :: ImageSize -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ImageSize Source # 
Instance details

Defined in B9.DiskImages

Show ImageSize Source # 
Instance details

Defined in B9.DiskImages

Generic ImageSize Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep ImageSize :: Type -> Type #

Arbitrary ImageSize Source # 
Instance details

Defined in B9.DiskImages

Hashable ImageSize Source # 
Instance details

Defined in B9.DiskImages

Binary ImageSize Source # 
Instance details

Defined in B9.DiskImages

NFData ImageSize Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: ImageSize -> () #

type Rep ImageSize Source # 
Instance details

Defined in B9.DiskImages

data FileSystem Source #

The file systems that b9 can use and convert.

Instances
Eq FileSystem Source # 
Instance details

Defined in B9.DiskImages

Data FileSystem Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: FileSystem -> Constr #

dataTypeOf :: FileSystem -> DataType #

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

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

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

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

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

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

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

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

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

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

Read FileSystem Source # 
Instance details

Defined in B9.DiskImages

Show FileSystem Source # 
Instance details

Defined in B9.DiskImages

Generic FileSystem Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep FileSystem :: Type -> Type #

Arbitrary FileSystem Source # 
Instance details

Defined in B9.DiskImages

Hashable FileSystem Source # 
Instance details

Defined in B9.DiskImages

Binary FileSystem Source # 
Instance details

Defined in B9.DiskImages

NFData FileSystem Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: FileSystem -> () #

type Rep FileSystem Source # 
Instance details

Defined in B9.DiskImages

type Rep FileSystem = D1 (MetaData "FileSystem" "B9.DiskImages" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) ((C1 (MetaCons "NoFileSystem" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Ext4" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "Ext4_64" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "ISO9660" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "VFAT" PrefixI False) (U1 :: Type -> Type))))

data ImageType Source #

An image type defines the actual file format of a file containing file systems. These are like virtual harddrives

Constructors

Raw 
QCow2 
Vmdk 
Instances
Eq ImageType Source # 
Instance details

Defined in B9.DiskImages

Data ImageType Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: ImageType -> Constr #

dataTypeOf :: ImageType -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ImageType Source # 
Instance details

Defined in B9.DiskImages

Show ImageType Source # 
Instance details

Defined in B9.DiskImages

Generic ImageType Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep ImageType :: Type -> Type #

Arbitrary ImageType Source # 
Instance details

Defined in B9.DiskImages

Hashable ImageType Source # 
Instance details

Defined in B9.DiskImages

Binary ImageType Source # 
Instance details

Defined in B9.DiskImages

NFData ImageType Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: ImageType -> () #

type Rep ImageType Source # 
Instance details

Defined in B9.DiskImages

type Rep ImageType = D1 (MetaData "ImageType" "B9.DiskImages" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "Raw" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "QCow2" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Vmdk" PrefixI False) (U1 :: Type -> Type)))

data Image Source #

A vm disk image file consisting of a path to the image file, and the type and file system.

Instances
Eq Image Source # 
Instance details

Defined in B9.DiskImages

Methods

(==) :: Image -> Image -> Bool #

(/=) :: Image -> Image -> Bool #

Data Image Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: Image -> Constr #

dataTypeOf :: Image -> DataType #

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

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

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

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

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

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

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

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

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

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

Read Image Source # 
Instance details

Defined in B9.DiskImages

Show Image Source # 
Instance details

Defined in B9.DiskImages

Methods

showsPrec :: Int -> Image -> ShowS #

show :: Image -> String #

showList :: [Image] -> ShowS #

Generic Image Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep Image :: Type -> Type #

Methods

from :: Image -> Rep Image x #

to :: Rep Image x -> Image #

Arbitrary Image Source # 
Instance details

Defined in B9.DiskImages

Methods

arbitrary :: Gen Image #

shrink :: Image -> [Image] #

Hashable Image Source # 
Instance details

Defined in B9.DiskImages

Methods

hashWithSalt :: Int -> Image -> Int #

hash :: Image -> Int #

Binary Image Source # 
Instance details

Defined in B9.DiskImages

Methods

put :: Image -> Put #

get :: Get Image #

putList :: [Image] -> Put #

NFData Image Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: Image -> () #

type Rep Image Source # 
Instance details

Defined in B9.DiskImages

data Partition Source #

The partition to extract.

Constructors

NoPT

There is no partition table on the image

Partition Int

Extract partition n n must be in 0..3

Instances
Eq Partition Source # 
Instance details

Defined in B9.DiskImages

Data Partition Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: Partition -> Constr #

dataTypeOf :: Partition -> DataType #

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

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

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

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

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

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

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

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

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

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

Read Partition Source # 
Instance details

Defined in B9.DiskImages

Show Partition Source # 
Instance details

Defined in B9.DiskImages

Generic Partition Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep Partition :: Type -> Type #

Arbitrary Partition Source # 
Instance details

Defined in B9.DiskImages

Hashable Partition Source # 
Instance details

Defined in B9.DiskImages

Binary Partition Source # 
Instance details

Defined in B9.DiskImages

NFData Partition Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: Partition -> () #

type Rep Partition Source # 
Instance details

Defined in B9.DiskImages

type Rep Partition = D1 (MetaData "Partition" "B9.DiskImages" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "NoPT" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Partition" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)))

data ImageSource Source #

Specification of how the image to build is obtained.

Constructors

EmptyImage String FileSystem ImageType ImageSize

Create an empty image file having a file system label (first parameter), a file system type (e.g. Ext4) and an ImageSize

CopyOnWrite Image

DEPRECATED

SourceImage Image Partition ImageResize

Clone an existing image file; if the image file contains partitions, select the partition to use, b9 will extract that partition by reading the offset of the partition from the partition table and extract it using dd.

From String ImageResize

Use an image previously shared by via Share.

Instances
Eq ImageSource Source # 
Instance details

Defined in B9.DiskImages

Data ImageSource Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: ImageSource -> Constr #

dataTypeOf :: ImageSource -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ImageSource Source # 
Instance details

Defined in B9.DiskImages

Show ImageSource Source # 
Instance details

Defined in B9.DiskImages

Generic ImageSource Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep ImageSource :: Type -> Type #

Arbitrary ImageSource Source # 
Instance details

Defined in B9.DiskImages

Hashable ImageSource Source # 
Instance details

Defined in B9.DiskImages

Binary ImageSource Source # 
Instance details

Defined in B9.DiskImages

NFData ImageSource Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: ImageSource -> () #

type Rep ImageSource Source # 
Instance details

Defined in B9.DiskImages

data ImageDestination Source #

The destination of an image.

Constructors

Share String ImageType ImageResize

Create the image and some meta data so that other builds can use them as ImageSources via From.

LiveInstallerImage String FilePath ImageResize

DEPRECATED Export a raw image that can directly be booted.

LocalFile Image ImageResize

Write an image file to the path in the first argument., possible resizing it,

Transient

Do not export the image. Usefule if the main objective of the b9 build is not an image file, but rather some artifact produced by executing by a containerize build.

Instances
Eq ImageDestination Source # 
Instance details

Defined in B9.DiskImages

Data ImageDestination Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: ImageDestination -> Constr #

dataTypeOf :: ImageDestination -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ImageDestination Source # 
Instance details

Defined in B9.DiskImages

Show ImageDestination Source # 
Instance details

Defined in B9.DiskImages

Generic ImageDestination Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep ImageDestination :: Type -> Type #

Arbitrary ImageDestination Source # 
Instance details

Defined in B9.DiskImages

Hashable ImageDestination Source # 
Instance details

Defined in B9.DiskImages

Binary ImageDestination Source # 
Instance details

Defined in B9.DiskImages

NFData ImageDestination Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: ImageDestination -> () #

type Rep ImageDestination Source # 
Instance details

Defined in B9.DiskImages

data MountPoint Source #

A mount point or NotMounted

Instances
Eq MountPoint Source # 
Instance details

Defined in B9.DiskImages

Data MountPoint Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: MountPoint -> Constr #

dataTypeOf :: MountPoint -> DataType #

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

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

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

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

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

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

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

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

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

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

Read MountPoint Source # 
Instance details

Defined in B9.DiskImages

Show MountPoint Source # 
Instance details

Defined in B9.DiskImages

Generic MountPoint Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep MountPoint :: Type -> Type #

Arbitrary MountPoint Source # 
Instance details

Defined in B9.DiskImages

Hashable MountPoint Source # 
Instance details

Defined in B9.DiskImages

Binary MountPoint Source # 
Instance details

Defined in B9.DiskImages

NFData MountPoint Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: MountPoint -> () #

type Rep MountPoint Source # 
Instance details

Defined in B9.DiskImages

type Rep MountPoint = D1 (MetaData "MountPoint" "B9.DiskImages" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "MountPoint" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)) :+: C1 (MetaCons "NotMounted" PrefixI False) (U1 :: Type -> Type))

data ImageTarget Source #

Build target for disk images; the destination, format and size of the image to generate, as well as how to create or obtain the image before a VmScript is executed with the image mounted at a MountPoint.

Instances
Eq ImageTarget Source # 
Instance details

Defined in B9.DiskImages

Data ImageTarget Source # 
Instance details

Defined in B9.DiskImages

Methods

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

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

toConstr :: ImageTarget -> Constr #

dataTypeOf :: ImageTarget -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ImageTarget Source # 
Instance details

Defined in B9.DiskImages

Show ImageTarget Source # 
Instance details

Defined in B9.DiskImages

Generic ImageTarget Source # 
Instance details

Defined in B9.DiskImages

Associated Types

type Rep ImageTarget :: Type -> Type #

Arbitrary ImageTarget Source # 
Instance details

Defined in B9.DiskImages

Hashable ImageTarget Source # 
Instance details

Defined in B9.DiskImages

Binary ImageTarget Source # 
Instance details

Defined in B9.DiskImages

NFData ImageTarget Source # 
Instance details

Defined in B9.DiskImages

Methods

rnf :: ImageTarget -> () #

type Rep ImageTarget Source # 
Instance details

Defined in B9.DiskImages

fromSharedImageName :: SharedImageName -> String Source #

Get the String representation of a SharedImageName.

imageFileName :: Image -> FilePath Source #

Return the name of the file corresponding to an Image

getImageDestinationOutputFiles :: ImageTarget -> [FilePath] Source #

Return the files generated for a LocalFile or a LiveInstallerImage; SharedImage and Transient are treated like they have no ouput files because the output files are manged by B9.

imageDestinationSharedImageName :: ImageDestination -> Maybe SharedImageName Source #

Return the name of a shared image, if the ImageDestination is a Share destination

imageSourceSharedImageName :: ImageSource -> Maybe SharedImageName Source #

Return the name of a shared source image, if the ImageSource is a From source

isPartitioned :: Partition -> Bool Source #

Return true if a Partition parameter is actually refering to a partition, false if it is NoPT

getPartition :: Partition -> Int Source #

Return the Partition index or throw a runtime error if aplied to NoPT

imageFileExtension :: ImageType -> String Source #

Return the file name extension of an image file with a specific image format.

changeImageFormat :: ImageType -> Image -> Image Source #

Change the image file format and also rename the image file name to have the appropriate file name extension. See imageFileExtension and replaceExtension

sharedImageName :: SharedImage -> SharedImageName Source #

Return the name of a shared image.

sharedImageDate :: SharedImage -> SharedImageDate Source #

Return the build date of a shared image.

sharedImageBuildId :: SharedImage -> SharedImageBuildId Source #

Return the build id of a shared image.

prettyPrintSharedImages :: [SharedImage] -> String Source #

Print the contents of the shared image in one line

sharedImageImage :: SharedImage -> Image Source #

Return the disk image of an sharedImage

sharedImageFileName :: SharedImage -> FilePath Source #

Calculate the path to the text file holding the serialized SharedImage relative to the directory of shared images in a repository.

sharedImageDefaultImageType :: ImageType Source #

The internal image type to use as best guess when dealing with a From value.

transientCOWImage :: FilePath -> FilePath -> ImageTarget Source #

Use a QCow2 image with an Ext4 file system

shareSharedImage :: SharedImageName -> SharedImageName -> FilePath -> ImageTarget Source #

Share an image based on a shared image

cowToLocalImage :: FilePath -> FilePath -> FilePath -> ImageTarget Source #

Export a QCow2 image file with Ext4 fs as a local file

localToLocalImage :: FilePath -> FilePath -> FilePath -> ImageTarget Source #

Export a QCow2 image file with Ext4 fs as a local file

partition1ToLocalImage :: FilePath -> FilePath -> FilePath -> ImageTarget Source #

Create a local image file from the contents of the first partition of a local QCow2 image.

splitToIntermediateSharedImage :: ImageTarget -> SharedImageName -> (ImageTarget, ImageTarget) Source #

Split any image target into two image targets, one for creating an intermediate shared image and one from the intermediate shared image to the output image.

data RamSize Source #

Instances
Eq RamSize Source # 
Instance details

Defined in B9.ExecEnv

Methods

(==) :: RamSize -> RamSize -> Bool #

(/=) :: RamSize -> RamSize -> Bool #

Data RamSize Source # 
Instance details

Defined in B9.ExecEnv

Methods

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

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

toConstr :: RamSize -> Constr #

dataTypeOf :: RamSize -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord RamSize Source # 
Instance details

Defined in B9.ExecEnv

Read RamSize Source # 
Instance details

Defined in B9.ExecEnv

Show RamSize Source # 
Instance details

Defined in B9.ExecEnv

Generic RamSize Source # 
Instance details

Defined in B9.ExecEnv

Associated Types

type Rep RamSize :: Type -> Type #

Methods

from :: RamSize -> Rep RamSize x #

to :: Rep RamSize x -> RamSize #

Semigroup RamSize Source # 
Instance details

Defined in B9.ExecEnv

Monoid RamSize Source # 
Instance details

Defined in B9.ExecEnv

Hashable RamSize Source # 
Instance details

Defined in B9.ExecEnv

Methods

hashWithSalt :: Int -> RamSize -> Int #

hash :: RamSize -> Int #

Binary RamSize Source # 
Instance details

Defined in B9.ExecEnv

Methods

put :: RamSize -> Put #

get :: Get RamSize #

putList :: [RamSize] -> Put #

NFData RamSize Source # 
Instance details

Defined in B9.ExecEnv

Methods

rnf :: RamSize -> () #

type Rep RamSize Source # 
Instance details

Defined in B9.ExecEnv

data CPUArch Source #

Constructors

X86_64 
I386 
Instances
Eq CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Methods

(==) :: CPUArch -> CPUArch -> Bool #

(/=) :: CPUArch -> CPUArch -> Bool #

Data CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Methods

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

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

toConstr :: CPUArch -> Constr #

dataTypeOf :: CPUArch -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Show CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Generic CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Associated Types

type Rep CPUArch :: Type -> Type #

Methods

from :: CPUArch -> Rep CPUArch x #

to :: Rep CPUArch x -> CPUArch #

Semigroup CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Monoid CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Hashable CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Methods

hashWithSalt :: Int -> CPUArch -> Int #

hash :: CPUArch -> Int #

Binary CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Methods

put :: CPUArch -> Put #

get :: Get CPUArch #

putList :: [CPUArch] -> Put #

NFData CPUArch Source # 
Instance details

Defined in B9.ExecEnv

Methods

rnf :: CPUArch -> () #

type Rep CPUArch Source # 
Instance details

Defined in B9.ExecEnv

type Rep CPUArch = D1 (MetaData "CPUArch" "B9.ExecEnv" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "X86_64" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "I386" PrefixI False) (U1 :: Type -> Type))

data Resources Source #

Constructors

Resources 
Instances
Eq Resources Source # 
Instance details

Defined in B9.ExecEnv

Data Resources Source # 
Instance details

Defined in B9.ExecEnv

Methods

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

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

toConstr :: Resources -> Constr #

dataTypeOf :: Resources -> DataType #

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

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

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

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

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

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

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

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

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

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

Read Resources Source # 
Instance details

Defined in B9.ExecEnv

Show Resources Source # 
Instance details

Defined in B9.ExecEnv

Generic Resources Source # 
Instance details

Defined in B9.ExecEnv

Associated Types

type Rep Resources :: Type -> Type #

Semigroup Resources Source # 
Instance details

Defined in B9.ExecEnv

Monoid Resources Source # 
Instance details

Defined in B9.ExecEnv

Hashable Resources Source # 
Instance details

Defined in B9.ExecEnv

Binary Resources Source # 
Instance details

Defined in B9.ExecEnv

NFData Resources Source # 
Instance details

Defined in B9.ExecEnv

Methods

rnf :: Resources -> () #

type Rep Resources Source # 
Instance details

Defined in B9.ExecEnv

data SharedDirectory Source #

Instances
Eq SharedDirectory Source # 
Instance details

Defined in B9.ExecEnv

Data SharedDirectory Source # 
Instance details

Defined in B9.ExecEnv

Methods

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

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

toConstr :: SharedDirectory -> Constr #

dataTypeOf :: SharedDirectory -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SharedDirectory Source # 
Instance details

Defined in B9.ExecEnv

Show SharedDirectory Source # 
Instance details

Defined in B9.ExecEnv

Generic SharedDirectory Source # 
Instance details

Defined in B9.ExecEnv

Associated Types

type Rep SharedDirectory :: Type -> Type #

Hashable SharedDirectory Source # 
Instance details

Defined in B9.ExecEnv

Binary SharedDirectory Source # 
Instance details

Defined in B9.ExecEnv

NFData SharedDirectory Source # 
Instance details

Defined in B9.ExecEnv

Methods

rnf :: SharedDirectory -> () #

type Rep SharedDirectory Source # 
Instance details

Defined in B9.ExecEnv

data ExecEnv Source #

Instances
Eq ExecEnv Source # 
Instance details

Defined in B9.ExecEnv

Methods

(==) :: ExecEnv -> ExecEnv -> Bool #

(/=) :: ExecEnv -> ExecEnv -> Bool #

Data ExecEnv Source # 
Instance details

Defined in B9.ExecEnv

Methods

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

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

toConstr :: ExecEnv -> Constr #

dataTypeOf :: ExecEnv -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ExecEnv Source # 
Instance details

Defined in B9.ExecEnv

Show ExecEnv Source # 
Instance details

Defined in B9.ExecEnv

Generic ExecEnv Source # 
Instance details

Defined in B9.ExecEnv

Associated Types

type Rep ExecEnv :: Type -> Type #

Methods

from :: ExecEnv -> Rep ExecEnv x #

to :: Rep ExecEnv x -> ExecEnv #

Hashable ExecEnv Source # 
Instance details

Defined in B9.ExecEnv

Methods

hashWithSalt :: Int -> ExecEnv -> Int #

hash :: ExecEnv -> Int #

Binary ExecEnv Source # 
Instance details

Defined in B9.ExecEnv

Methods

put :: ExecEnv -> Put #

get :: Get ExecEnv #

putList :: [ExecEnv] -> Put #

NFData ExecEnv Source # 
Instance details

Defined in B9.ExecEnv

Methods

rnf :: ExecEnv -> () #

type Rep ExecEnv Source # 
Instance details

Defined in B9.ExecEnv

data User Source #

Constructors

User String 
NoUser 
Instances
Eq User Source # 
Instance details

Defined in B9.ShellScript

Methods

(==) :: User -> User -> Bool #

(/=) :: User -> User -> Bool #

Data User Source # 
Instance details

Defined in B9.ShellScript

Methods

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

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

toConstr :: User -> Constr #

dataTypeOf :: User -> DataType #

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

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

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

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

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

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

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

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

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

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

Read User Source # 
Instance details

Defined in B9.ShellScript

Show User Source # 
Instance details

Defined in B9.ShellScript

Methods

showsPrec :: Int -> User -> ShowS #

show :: User -> String #

showList :: [User] -> ShowS #

Generic User Source # 
Instance details

Defined in B9.ShellScript

Associated Types

type Rep User :: Type -> Type #

Methods

from :: User -> Rep User x #

to :: Rep User x -> User #

Hashable User Source # 
Instance details

Defined in B9.ShellScript

Methods

hashWithSalt :: Int -> User -> Int #

hash :: User -> Int #

Binary User Source # 
Instance details

Defined in B9.ShellScript

Methods

put :: User -> Put #

get :: Get User #

putList :: [User] -> Put #

NFData User Source # 
Instance details

Defined in B9.ShellScript

Methods

rnf :: User -> () #

type Rep User Source # 
Instance details

Defined in B9.ShellScript

type Rep User = D1 (MetaData "User" "B9.ShellScript" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "User" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "NoUser" PrefixI False) (U1 :: Type -> Type))

data Cwd Source #

Constructors

Cwd FilePath 
NoCwd 
Instances
Eq Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

(==) :: Cwd -> Cwd -> Bool #

(/=) :: Cwd -> Cwd -> Bool #

Data Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

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

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

toConstr :: Cwd -> Constr #

dataTypeOf :: Cwd -> DataType #

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

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

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

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

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

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

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

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

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

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

Read Cwd Source # 
Instance details

Defined in B9.ShellScript

Show Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

showsPrec :: Int -> Cwd -> ShowS #

show :: Cwd -> String #

showList :: [Cwd] -> ShowS #

Generic Cwd Source # 
Instance details

Defined in B9.ShellScript

Associated Types

type Rep Cwd :: Type -> Type #

Methods

from :: Cwd -> Rep Cwd x #

to :: Rep Cwd x -> Cwd #

Hashable Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

hashWithSalt :: Int -> Cwd -> Int #

hash :: Cwd -> Int #

Binary Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

put :: Cwd -> Put #

get :: Get Cwd #

putList :: [Cwd] -> Put #

NFData Cwd Source # 
Instance details

Defined in B9.ShellScript

Methods

rnf :: Cwd -> () #

type Rep Cwd Source # 
Instance details

Defined in B9.ShellScript

type Rep Cwd = D1 (MetaData "Cwd" "B9.ShellScript" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "Cwd" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)) :+: C1 (MetaCons "NoCwd" PrefixI False) (U1 :: Type -> Type))

data CmdVerbosity Source #

Constructors

Debug 
Verbose 
OnlyStdErr 
Quiet 
Instances
Eq CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Data CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Methods

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

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

toConstr :: CmdVerbosity -> Constr #

dataTypeOf :: CmdVerbosity -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Show CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Generic CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Associated Types

type Rep CmdVerbosity :: Type -> Type #

Hashable CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Binary CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

NFData CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

Methods

rnf :: CmdVerbosity -> () #

type Rep CmdVerbosity Source # 
Instance details

Defined in B9.ShellScript

type Rep CmdVerbosity = D1 (MetaData "CmdVerbosity" "B9.ShellScript" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) ((C1 (MetaCons "Debug" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Verbose" PrefixI False) (U1 :: Type -> Type)) :+: (C1 (MetaCons "OnlyStdErr" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "Quiet" PrefixI False) (U1 :: Type -> Type)))

data Script Source #

Instances
Eq Script Source # 
Instance details

Defined in B9.ShellScript

Methods

(==) :: Script -> Script -> Bool #

(/=) :: Script -> Script -> Bool #

Data Script Source # 
Instance details

Defined in B9.ShellScript

Methods

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

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

toConstr :: Script -> Constr #

dataTypeOf :: Script -> DataType #

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

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

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

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

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

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

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

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

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

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

Read Script Source # 
Instance details

Defined in B9.ShellScript

Show Script Source # 
Instance details

Defined in B9.ShellScript

Generic Script Source # 
Instance details

Defined in B9.ShellScript

Associated Types

type Rep Script :: Type -> Type #

Methods

from :: Script -> Rep Script x #

to :: Rep Script x -> Script #

Semigroup Script Source # 
Instance details

Defined in B9.ShellScript

Monoid Script Source # 
Instance details

Defined in B9.ShellScript

Hashable Script Source # 
Instance details

Defined in B9.ShellScript

Methods

hashWithSalt :: Int -> Script -> Int #

hash :: Script -> Int #

Binary Script Source # 
Instance details

Defined in B9.ShellScript

Methods

put :: Script -> Put #

get :: Get Script #

putList :: [Script] -> Put #

NFData Script Source # 
Instance details

Defined in B9.ShellScript

Methods

rnf :: Script -> () #

type Rep Script Source # 
Instance details

Defined in B9.ShellScript

type Rep Script = D1 (MetaData "Script" "B9.ShellScript" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) ((C1 (MetaCons "In" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Script])) :+: (C1 (MetaCons "As" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Script])) :+: C1 (MetaCons "IgnoreErrors" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Bool) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Script])))) :+: ((C1 (MetaCons "Verbosity" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CmdVerbosity) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Script])) :+: C1 (MetaCons "Begin" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [Script]))) :+: (C1 (MetaCons "Run" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String])) :+: C1 (MetaCons "NoOP" PrefixI False) (U1 :: Type -> Type))))

writeSh :: FilePath -> Script -> IO () Source #

Convert script to bash-shell-script written to file and make file executable.

emptyScript :: Script -> Bool Source #

Check if a script has the same effect as NoOP

class Textual a where Source #

A class for values that can be converted to/from Text.

Since: 0.5.67

Methods

renderToText :: HasCallStack => a -> Either String Text Source #

Convert a String to Text If an error occured, return Left with the error message.

Since: 0.5.67

parseFromText :: HasCallStack => Text -> Either String a Source #

Convert a Text to String

Since: 0.5.67

Instances
Textual String Source # 
Instance details

Defined in B9.Text

Textual ByteString Source #

Convert a ByteString with UTF-8 encoded string to Text

Since: 0.5.67

Instance details

Defined in B9.Text

Textual Text Source # 
Instance details

Defined in B9.Text

Textual LazyByteString Source #

Convert a LazyByteString with UTF-8 encoded string to Text

Since: 0.5.67

Instance details

Defined in B9.Text

Textual YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

Textual ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

Textual CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

type LazyText = Text Source #

Lazy texts.

A type alias to Text that can be used everywhere such that references don't need to be qualified with the complete module name everywere.

Since: 0.5.67

type LazyByteString = ByteString Source #

Lazy byte strings.

A type alias to ByteString that can be used everywhere such that references don't need to be qualified with the complete module name everywere.

Since: 0.5.67

writeTextFile :: (HasCallStack, MonadIO m) => FilePath -> Text -> m () Source #

Render a Text to a file.

Since: 0.5.67

unsafeRenderToText :: (Textual a, HasCallStack) => a -> Text Source #

Render a Text via renderToText and throw a runtime exception when rendering fails.

Since: 0.5.67

unsafeParseFromText :: (Textual a, HasCallStack) => Text -> a Source #

Parse a Text via parseFromText and throw a runtime exception when parsing fails.

Since: 0.5.67

encodeAsUtf8LazyByteString :: HasCallStack => String -> LazyByteString Source #

Encode a String as UTF-8 encoded into a LazyByteString.

Since: 0.5.67

parseFromTextWithErrorMessage Source #

Arguments

:: (HasCallStack, Textual a) 
=> String

An arbitrary string for error messages

-> Text 
-> Either String a 

Parse the given Text. -- Return Left errorMessage or Right a.

data KeyNotFound Source #

An Exception thrown by lookupOrThrow indicating that a key does not exist.

@Since 0.5.62

data DuplicateKey Source #

An Exception thrown by addBinding indicating that a key already exists.

@Since 0.5.62

type EnvironmentReader = Reader Environment Source #

A monad transformer providing a MonadReader instance for Environment

Since: 0.5.62

data Environment Source #

A map of textual keys to textual values.

Since: 0.5.62

Instances
Eq Environment Source # 
Instance details

Defined in B9.Environment

Data Environment Source # 
Instance details

Defined in B9.Environment

Methods

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

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

toConstr :: Environment -> Constr #

dataTypeOf :: Environment -> DataType #

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

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

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

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

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

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

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

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

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

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

Show Environment Source # 
Instance details

Defined in B9.Environment

Generic Environment Source # 
Instance details

Defined in B9.Environment

Associated Types

type Rep Environment :: Type -> Type #

Semigroup Environment Source # 
Instance details

Defined in B9.Environment

Monoid Environment Source # 
Instance details

Defined in B9.Environment

NFData Environment Source # 
Instance details

Defined in B9.Environment

Methods

rnf :: Environment -> () #

type Rep Environment Source # 
Instance details

Defined in B9.Environment

type Rep Environment = D1 (MetaData "Environment" "B9.Environment" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "MkEnvironment" PrefixI True) (S1 (MetaSel (Just "nextPosition") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Just "fromEnvironment") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (HashMap Text Text))))

addPositionalArguments :: [Text] -> Environment -> Environment Source #

If environment variables arg_1 .. arg_n are bound and a list of k additional values are passed to this function, store them with keys arg_(n+1) .. arg_(n+k).

Note that the Environment contains an index of the next position.

Since: 0.5.62

addLocalPositionalArguments :: Member EnvironmentReader e => [String] -> Eff e a -> Eff e a Source #

Convenient wrapper around addPositionalArguments and localEnvironment.

Since: 0.5.65

fromStringPairs :: [(String, String)] -> Environment Source #

Create an Environment from a list of pairs (Strings). Duplicated entries are ignored.

Since: 0.5.62

addBinding :: Member ExcB9 e => (Text, Text) -> Environment -> Eff e Environment Source #

Insert a key value binding to the Environment.

Throw DuplicateKey if the key already exists, but the value is not equal to the given value.

Since: 0.5.67

addStringBinding :: Member ExcB9 e => (String, String) -> Environment -> Eff e Environment Source #

Insert Strings into the Environment, see addBinding.

Since: 0.5.62

addLocalStringBinding :: (Member EnvironmentReader e, Member ExcB9 e) => (String, String) -> Eff e a -> Eff e a Source #

Insert a value into an Environment like addStringBinding, but add it to the environment of the given effect, as in localEnvironment.

Since: 0.5.65

runEnvironmentReader :: Environment -> Eff (EnvironmentReader ': e) a -> Eff e a Source #

Run a ReaderT of Environment.

Since: 0.5.62

localEnvironment :: Member EnvironmentReader e => (Environment -> Environment) -> Eff e a -> Eff e a Source #

Run a computation with a modified Environment

Since: 0.5.62

lookupOrThrow :: '[ExcB9, EnvironmentReader] <:: e => Text -> Eff e Text Source #

Lookup a key for a value.

throwM a KeyNotFound Exception if no value with the given key exists in the Environment.

@Since 0.5.62

lookupEither :: Member EnvironmentReader e => Text -> Eff e (Either KeyNotFound Text) Source #

Lookup a key for a value.

Return Either Left KeyNotFound, if no value with the given key exists in the Environment, or Right the value.

@Since 0.5.62

hasKey :: Member EnvironmentReader e => Text -> Eff e Bool Source #

A predicate that is satisfied when a key exists in the environment.

Since: 0.5.64

data SimpleErlangTerm Source #

Simplified Erlang term representation.

Instances
Eq SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

Data SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

Methods

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

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

toConstr :: SimpleErlangTerm -> Constr #

dataTypeOf :: SimpleErlangTerm -> DataType #

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

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

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

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

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

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

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

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

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

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

Ord SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

Read SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

Show SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

Generic SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

Associated Types

type Rep SimpleErlangTerm :: Type -> Type #

Arbitrary SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

Hashable SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

Binary SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

NFData SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

Methods

rnf :: SimpleErlangTerm -> () #

type Rep SimpleErlangTerm Source # 
Instance details

Defined in B9.Artifact.Content.ErlTerms

parseErlTerm :: String -> Text -> Either String SimpleErlangTerm Source #

Parse a subset of valid Erlang terms. It parses no maps and binaries are restricted to either empty binaries or binaries with a string. The input encoding must be restricted to ascii compatible 8-bit characters (e.g. latin-1 or UTF8).

renderErlTerm :: SimpleErlangTerm -> Text Source #

Convert an abstract Erlang term to a pretty byte string preserving the encoding.

data UUID Source #

A bunch of numbers, enough to make globally unique IDs. Create one of these using randomUUID.

Instances
Eq UUID Source # 
Instance details

Defined in System.IO.B9Extras

Methods

(==) :: UUID -> UUID -> Bool #

(/=) :: UUID -> UUID -> Bool #

Ord UUID Source # 
Instance details

Defined in System.IO.B9Extras

Methods

compare :: UUID -> UUID -> Ordering #

(<) :: UUID -> UUID -> Bool #

(<=) :: UUID -> UUID -> Bool #

(>) :: UUID -> UUID -> Bool #

(>=) :: UUID -> UUID -> Bool #

max :: UUID -> UUID -> UUID #

min :: UUID -> UUID -> UUID #

Read UUID Source # 
Instance details

Defined in System.IO.B9Extras

Show UUID Source # 
Instance details

Defined in System.IO.B9Extras

Methods

showsPrec :: Int -> UUID -> ShowS #

show :: UUID -> String #

showList :: [UUID] -> ShowS #

PrintfArg UUID Source # 
Instance details

Defined in System.IO.B9Extras

data SystemPath Source #

A data type encapsulating different kinds of relative or absolute paths.

Constructors

Path FilePath

A path that will just be passed through

InHomeDir FilePath

A OS specific path relative to the home directory of a user.

InB9UserDir FilePath

A path relative to the b9 sub of the users application configuration directory getAppUserDataDirectory

InTempDir FilePath

A path relative to the systems temporary directory.

Instances
Eq SystemPath Source # 
Instance details

Defined in System.IO.B9Extras

Data SystemPath Source # 
Instance details

Defined in System.IO.B9Extras

Methods

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

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

toConstr :: SystemPath -> Constr #

dataTypeOf :: SystemPath -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SystemPath Source # 
Instance details

Defined in System.IO.B9Extras

Show SystemPath Source # 
Instance details

Defined in System.IO.B9Extras

getDirectoryFiles :: MonadIO m => FilePath -> m [FilePath] Source #

Get all files from dir that is get ONLY files not directories

ensureDir :: MonadIO m => FilePath -> m () Source #

Create all missing parent directories of a file path. Note that the file path is assumed to be of a regular file, and takeDirectory is applied before creating the directory.

prettyPrintToFile :: (MonadIO m, Show a) => FilePath -> a -> m () Source #

Write a value of a type that is an instance of Show to file. This function uses ppShow instead of the given Show instance.

consult :: (MonadIO m, Read a) => FilePath -> m a Source #

Read a value of a type that is an instance of Read from a file. This function throws a ConsultException when the read the file failed.

randomUUID :: MonadIO m => m UUID Source #

Generate a random UUID.

newtype SshRemoteUser Source #

Constructors

SshRemoteUser String 
Instances
Eq SshRemoteUser Source # 
Instance details

Defined in B9.B9Config.Repository

Data SshRemoteUser Source # 
Instance details

Defined in B9.B9Config.Repository

Methods

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

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

toConstr :: SshRemoteUser -> Constr #

dataTypeOf :: SshRemoteUser -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SshRemoteUser Source # 
Instance details

Defined in B9.B9Config.Repository

Show SshRemoteUser Source # 
Instance details

Defined in B9.B9Config.Repository

newtype SshRemoteHost Source #

Constructors

SshRemoteHost (String, Int) 
Instances
Eq SshRemoteHost Source # 
Instance details

Defined in B9.B9Config.Repository

Data SshRemoteHost Source # 
Instance details

Defined in B9.B9Config.Repository

Methods

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

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

toConstr :: SshRemoteHost -> Constr #

dataTypeOf :: SshRemoteHost -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SshRemoteHost Source # 
Instance details

Defined in B9.B9Config.Repository

Show SshRemoteHost Source # 
Instance details

Defined in B9.B9Config.Repository

newtype SshPrivKey Source #

Constructors

SshPrivKey FilePath 
Instances
Eq SshPrivKey Source # 
Instance details

Defined in B9.B9Config.Repository

Data SshPrivKey Source # 
Instance details

Defined in B9.B9Config.Repository

Methods

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

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

toConstr :: SshPrivKey -> Constr #

dataTypeOf :: SshPrivKey -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SshPrivKey Source # 
Instance details

Defined in B9.B9Config.Repository

Show SshPrivKey Source # 
Instance details

Defined in B9.B9Config.Repository

data RemoteRepo Source #

Instances
Eq RemoteRepo Source # 
Instance details

Defined in B9.B9Config.Repository

Data RemoteRepo Source # 
Instance details

Defined in B9.B9Config.Repository

Methods

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

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

toConstr :: RemoteRepo -> Constr #

dataTypeOf :: RemoteRepo -> DataType #

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

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

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

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

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

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

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

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

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

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

Read RemoteRepo Source # 
Instance details

Defined in B9.B9Config.Repository

Show RemoteRepo Source # 
Instance details

Defined in B9.B9Config.Repository

newtype RepoCache Source #

Constructors

RepoCache FilePath 
Instances
Data RepoCache Source # 
Instance details

Defined in B9.B9Config.Repository

Methods

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

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

toConstr :: RepoCache -> Constr #

dataTypeOf :: RepoCache -> DataType #

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

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

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

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

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

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

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

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

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

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

Read RepoCache Source # 
Instance details

Defined in B9.B9Config.Repository

Show RepoCache Source # 
Instance details

Defined in B9.B9Config.Repository

remoteRepoToCPDocument :: RemoteRepo -> CPDocument -> Either CPError CPDocument Source #

Persist a repo to a configuration file.

parseRemoteRepos :: CPDocument -> Either CPError [RemoteRepo] Source #

Load a repository from a configuration file that has been written by writeRepositoryToB9Config.

getEmulatorPath :: MonadIO m => LibVirtLXCConfig -> m FilePath Source #

Return the path to usrliblibvirtlibexec/libvirt_lxc the emulatorK field from the config file, or set the path in the environment variable named like the value in emulatorEnvVar dictates.

Since: 0.5.66

data B9ConfigOverride Source #

Override b9 configuration items and/or the path of the b9 configuration file. This is useful, i.e. when dealing with command line parameters.

type B9ConfigReader = Reader B9Config Source #

Reader for B9Config. See getB9Config and localB9Config.

Since: 0.5.65

runB9ConfigReader :: HasCallStack => B9Config -> Eff (B9ConfigReader ': e) a -> Eff e a Source #

Run a B9ConfigReader.

Since: 0.5.65

getB9Config :: Member B9ConfigReader e => Eff e B9Config Source #

Return the runtime configuration, that should be the configuration merged from all configuration sources. This is the configuration to be used during a VM image build.

Since: 0.5.65

localB9Config :: Member B9ConfigReader e => (B9Config -> B9Config) -> Eff e a -> Eff e a Source #

Run an action with an updated runtime configuration.

Since: 0.5.65

getConfig :: Member B9ConfigReader e => Eff e B9Config Source #

An alias for getB9Config.

@deprecated

Since: 0.5.65

isInteractive :: Member B9ConfigReader e => Eff e Bool Source #

Ask whether stdin of the B9 process should be redirected to the external commands executed during the build.

Since: 0.5.65

getRemoteRepos :: Member B9ConfigReader e => Eff e [RemoteRepo] Source #

Ask for the RemoteRepos.

Since: 0.5.65

getLogVerbosity :: Member B9ConfigReader e => Eff e (Maybe LogLevel) Source #

Ask for the LogLevel.

Since: 0.5.65

getProjectRoot :: Member B9ConfigReader e => Eff e FilePath Source #

Ask for the project root directory.

Since: 0.5.65

noB9ConfigOverride :: B9ConfigOverride Source #

An empty default B9ConfigOverride value, that will neither apply any additional B9Config nor change the path of the configuration file.

type B9ConfigWriter = Writer (Endo B9Config) Source #

Accumulate B9Config changes that go back to the config file. See B9ConfigAction and modifyPermanentConfig.

Since: 0.5.65

type B9ConfigAction a = Eff '[B9ConfigWriter, B9ConfigReader, EnvironmentReader, Lift IO] a Source #

A monad that gives access to the (transient) B9Config to be used at _runtime_ with getB9Config or localB9Config, and that allows to write permanent B9Config changes back to the configuration file using modifyPermanentConfig. This is the amalgamation of B9ConfigWriter B9ConfigReader and IO.

Since: 0.5.65

overrideB9ConfigPath :: SystemPath -> B9ConfigOverride -> B9ConfigOverride Source #

Convenience utility to override the B9 configuration file path.

overrideB9Config :: (B9Config -> B9Config) -> B9ConfigOverride -> B9ConfigOverride Source #

Modify the runtime configuration.

overrideWorkingDirectory :: FilePath -> B9ConfigOverride -> B9ConfigOverride Source #

Define the current working directory to be used when building.

overrideVerbosity :: LogLevel -> B9ConfigOverride -> B9ConfigOverride Source #

Overwrite the verbosity settings in the configuration with those given.

overrideKeepBuildDirs :: Bool -> B9ConfigOverride -> B9ConfigOverride Source #

Overwrite the keepTempDirs flag in the configuration with those given.

modifyPermanentConfig :: (HasCallStack, Member B9ConfigWriter e) => Endo B9Config -> Eff e () Source #

Add a modification to the permanent configuration file.

runB9ConfigActionWithOverrides :: HasCallStack => B9ConfigAction a -> B9ConfigOverride -> IO a Source #

Execute a B9ConfigAction. It will take a B9ConfigOverride as input. The B9Config in that value is treated as the _runtime_ configuration, and the _customConfigPath is used as the alternative location of the configuration file. The configuration file is read from either the path in _customB9ConfigPath or from defaultB9ConfigFile. Every modification done via modifyPermanentConfig is applied to the **contents** of the configuration file and written back to that file, note that these changes are ONLY reflected in the configuration file and **not** in the _runtime configuration_.

See also runB9ConfigAction, which does not need the B9ConfigOverride parameter.

Since: 0.5.65

openOrCreateB9Config :: (HasCallStack, MonadIO m) => FilePath -> m CPDocument Source #

Open the configuration file that contains the B9Config. If the configuration does not exist, write a default configuration file, and create a all missing directories.

writeB9CPDocument :: (HasCallStack, MonadIO m) => Maybe SystemPath -> CPDocument -> m () Source #

Write the configuration in the CPDocument to either the user supplied configuration file path or to defaultB9ConfigFile. Create all missing (parent) directories.

modifyCPDocument :: CPDocument -> Endo B9Config -> Either CPError CPDocument Source #

Parse a B9Config, modify it, and merge it back to the given CPDocument.

b9ConfigToCPDocument :: HasCallStack => B9Config -> Either CPError CPDocument Source #

Append a config file section for the B9Config to an empty CPDocument.

type SelectedRemoteRepoReader = Reader SelectedRemoteRepo Source #

Alias for a Reader Effect that reads the RemoteRepo selected by the B9Config value _repository. See withSelectedRemoteRepo.

Since: 0.5.65

newtype SelectedRemoteRepo Source #

Contains the Just the RemoteRepo selected by the B9Config value _repository, or Nothing of no RemoteRepo was selected in the B9Config.

Since: 0.5.65

type RepoCacheReader = Reader RepoCache Source #

Alias for a Reader Effect that reads a list of RemoteRepos.

Since: 0.5.65

withRemoteRepos :: (Member B9ConfigReader e, Lifted IO e) => Eff (RepoCacheReader ': e) a -> Eff e a Source #

Initialize the local repository cache directory and the RemoteRepos. Run the given action with a B9Config that contains the initialized repositories in _remoteRepos.

Since: 0.5.65

getRepoCache :: Member RepoCacheReader e => Eff e RepoCache Source #

Ask for the RepoCache initialized by withRemoteRepos.

Since: 0.5.65

withSelectedRemoteRepo :: (Member B9ConfigReader e, Member ExcB9 e) => Eff (SelectedRemoteRepoReader ': e) a -> Eff e a Source #

Run a SelectedRemoteRepoReader with the SelectedRemoteRepo selected in the B9Config.

If the selected repo does not exist, and exception is thrown.

Since: 0.5.65

initRepoCache :: MonadIO m => SystemPath -> m RepoCache Source #

Initialize the local repository cache directory.

remoteRepoCheckSshPrivKey :: MonadIO m => RemoteRepo -> m RemoteRepo Source #

Check for existance of priv-key and make it an absolute path.

initRemoteRepo :: MonadIO m => RepoCache -> RemoteRepo -> m RemoteRepo Source #

Initialize the repository; load the corresponding settings from the config file, check that the priv key exists and create the correspondig cache directory.

cleanRemoteRepo :: MonadIO m => RepoCache -> RemoteRepo -> m () Source #

Empty the repository; load the corresponding settings from the config file, check that the priv key exists and create the correspondig cache directory.

remoteRepoCacheDir Source #

Arguments

:: RepoCache

The repository cache directory

-> String

Id of the repository

-> FilePath

The existing, absolute path to the cache directory

Return the cache directory for a remote repository relative to the root cache dir.

localRepoDir Source #

Arguments

:: RepoCache

The repository cache directory

-> FilePath

The existing, absolute path to the directory

Return the local repository directory.

lookupRemoteRepo :: [RemoteRepo] -> String -> Maybe RemoteRepo Source #

Select the first RemoteRepo with a given repoId.

type CommandIO e = (MonadBaseControl IO (Eff e), MonadIO (Eff e), Member LoggerReader e, Member B9ConfigReader e) Source #

Convenience type alias for Effects that have a B9Config, a Logger, MonadIO and MonadBaseControl.

Since: 0.5.65

type LoggerReader = Reader Logger Source #

Effect that reads a Logger.

Since: 0.5.65

newtype Logger Source #

The logger to write log messages to.

Since: 0.5.65

Constructors

MkLogger 

withLogger :: (MonadBaseControl IO (Eff e), MonadIO (Eff e), Member B9ConfigReader e) => Eff (LoggerReader ': e) a -> Eff e a Source #

Lookup the selected getLogVerbosity and _logFile from the B9Config and open it.

Then run the given action; if the action crashes, the log file will be closed.

Since: 0.5.65

traceL :: CommandIO e => String -> Eff e () Source #

dbgL :: CommandIO e => String -> Eff e () Source #

infoL :: CommandIO e => String -> Eff e () Source #

errorL :: CommandIO e => String -> Eff e () Source #

type BuildInfoReader = Reader BuildInfo Source #

Type alias for a BuildInfo Reader

Since: 0.5.65

withBuildInfo :: (Lifted IO e, MonadBaseControl IO (Eff e), Member B9ConfigReader e, Member ExcB9 e, Member EnvironmentReader e, Member LoggerReader e, HasCallStack) => Eff (BuildInfoReader ': e) a -> Eff e a Source #

Create the build directories, generate (hash) the build-id and execute the given action.

Bindings added to the text template parameter environment:

  • projectRoot the directory that contains the sources of the project to build
  • buildDir the temporary directory used store the build artifacts passed into- or outof the build

Unless _keepTempDirs is True clean up the build directories after the actions returns - even if the action throws a runtime exception.

Since: 0.5.65

type IsB9 e = (HasCallStack, Lifted IO e, CommandIO e, B9Eff <:: e) Source #

A constraint that contains all effects of B9Eff

Since: 0.5.65

type B9Eff = '[SelectedRemoteRepoReader, RepoCacheReader, BuildInfoReader, LoggerReader, B9ConfigReader, EnvironmentReader, ExcB9, Lift IO] Source #

Definition of the B9 effect list. It encapsulates logging, a reader for the B9.B9Config and access to the current build id, the current build directory and the artifact to build.

This monad is used by the _effectful_ functions in this library.

Since: 0.5.65

type B9 a = Eff B9Eff a Source #

Definition of the B9 monad. See B9Eff.

This module is used by the _effectful_ functions in this library.

Since: 0.5.65

runB9 :: HasCallStack => B9 a -> B9ConfigAction a Source #

Execute a B9 effect and return an action that needs the B9Config.

Since: 0.5.65

class ToContentGenerator c where Source #

Types whose values can be turned into an Effect that produces Text, e.g. ContentGenerator

Since: 0.5.62

type ContentGenerator = B9 Text Source #

A B9 action that procuces a Text.

Since: 0.5.62

cmd :: CommandIO e => String -> Eff e () Source #

Execute the given shell command.

If isInteractive is true, the standard-in will be passed to the external command, and all output of the program will be directed to standard-out.

The command and the output is either logged to the logfile with traceL or errorL or written to stdout.

If the command exists with non-zero exit code, the current process exists with the same exit code.

Since: 0.5.65

newtype FilePathGlob Source #

Express a pattern for file paths, used when searching repositories.

Constructors

FileExtension String 

repoSearch :: forall e. (CommandIO e, Member RepoCacheReader e) => FilePath -> FilePathGlob -> Eff e [(Repository, [FilePath])] Source #

Find files which are in subDir and match glob in the repository cache. NOTE: This operates on the repository cache, but does not enforce a repository cache update.

pushToRepo :: CommandIO e => RemoteRepo -> FilePath -> FilePath -> Eff e () Source #

Push a file from the cache to a remote repository

pullFromRepo :: CommandIO e => RemoteRepo -> FilePath -> FilePath -> Eff e () Source #

Pull a file from a remote repository to cache

pullGlob :: (CommandIO e, Member RepoCacheReader e) => FilePath -> FilePathGlob -> RemoteRepo -> Eff e () Source #

Push a file from the cache to a remote repository

data SourceFileConversion Source #

Instances
Eq SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Data SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Methods

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

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

toConstr :: SourceFileConversion -> Constr #

dataTypeOf :: SourceFileConversion -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Show SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Generic SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Associated Types

type Rep SourceFileConversion :: Type -> Type #

Hashable SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Binary SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

NFData SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Methods

rnf :: SourceFileConversion -> () #

type Rep SourceFileConversion Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

type Rep SourceFileConversion = D1 (MetaData "SourceFileConversion" "B9.Artifact.Content.StringTemplate" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "NoConversion" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "ExpandVariables" PrefixI False) (U1 :: Type -> Type))

data SourceFile Source #

A wrapper around a file path and a flag indicating if template variable expansion should be performed when reading the file contents.

Instances
Eq SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Data SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Methods

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

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

toConstr :: SourceFile -> Constr #

dataTypeOf :: SourceFile -> DataType #

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

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

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

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

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

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

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

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

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

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

Read SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Show SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Generic SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Associated Types

type Rep SourceFile :: Type -> Type #

Arbitrary SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Hashable SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Binary SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

NFData SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

Methods

rnf :: SourceFile -> () #

type Rep SourceFile Source # 
Instance details

Defined in B9.Artifact.Content.StringTemplate

subst :: (Member ExcB9 e, Member EnvironmentReader e) => Text -> Eff e Text Source #

Text template substitution.

substStr :: (Member ExcB9 e, Member EnvironmentReader e) => String -> Eff e String Source #

String template substitution

withSubstitutedStringBindings :: (Member EnvironmentReader e, Member ExcB9 e) => [(String, String)] -> Eff e s -> Eff e s Source #

Extend an Environment with new bindings, where each value may contain string templates with like "Hello $name, how is life on $planet these days?".

Since: 0.5.64

data VmScript Source #

Describe a virtual machine, i.e. a set up disk images to create and a shell script to put things together.

Instances
Eq VmScript Source # 
Instance details

Defined in B9.Vm

Data VmScript Source # 
Instance details

Defined in B9.Vm

Methods

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

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

toConstr :: VmScript -> Constr #

dataTypeOf :: VmScript -> DataType #

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

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

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

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

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

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

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

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

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

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

Read VmScript Source # 
Instance details

Defined in B9.Vm

Show VmScript Source # 
Instance details

Defined in B9.Vm

Generic VmScript Source # 
Instance details

Defined in B9.Vm

Associated Types

type Rep VmScript :: Type -> Type #

Methods

from :: VmScript -> Rep VmScript x #

to :: Rep VmScript x -> VmScript #

Hashable VmScript Source # 
Instance details

Defined in B9.Vm

Methods

hashWithSalt :: Int -> VmScript -> Int #

hash :: VmScript -> Int #

Binary VmScript Source # 
Instance details

Defined in B9.Vm

Methods

put :: VmScript -> Put #

get :: Get VmScript #

putList :: [VmScript] -> Put #

NFData VmScript Source # 
Instance details

Defined in B9.Vm

Methods

rnf :: VmScript -> () #

type Rep VmScript Source # 
Instance details

Defined in B9.Vm

substImageTarget :: forall e. (HasCallStack, Member EnvironmentReader e, Member ExcB9 e) => ImageTarget -> Eff e ImageTarget Source #

Replace $... variables inside an ImageTarget

resolveImageSource :: IsB9 e => ImageSource -> Eff e Image Source #

Resolve an ImageSource to an Image. The ImageSource might not exist, as is the case for EmptyImage.

preferredDestImageTypes :: IsB9 e => ImageSource -> Eff e [ImageType] Source #

Return all valid image types sorted by preference.

preferredSourceImageTypes :: HasCallStack => ImageDestination -> [ImageType] Source #

Return all supported source ImageTypes compatible to a ImageDestinaion in the preferred order.

ensureAbsoluteImageDirExists :: IsB9 e => Image -> Eff e Image Source #

Create the parent directories for the file that contains the Image. If the path to the image file is relative, prepend _projectRoot from the B9Config.

materializeImageSource :: IsB9 e => ImageSource -> Image -> Eff e () Source #

Create an image from an image source. The destination image must have a compatible image type and filesystem. The directory of the image MUST be present and the image file itself MUST NOT alredy exist.

createDestinationImage :: IsB9 e => Image -> ImageDestination -> Eff e () Source #

Convert some Image, e.g. a temporary image used during the build phase to the final destination.

resizeImage :: IsB9 e => ImageResize -> Image -> Eff e () Source #

Resize an image, including the file system inside the image.

importImage :: IsB9 e => Image -> Image -> Eff e () Source #

Import a disk image from some external source into the build directory if necessary convert the image.

exportImage :: IsB9 e => Image -> Image -> Eff e () Source #

Export a disk image from the build directory; if necessary convert the image.

exportAndRemoveImage :: IsB9 e => Image -> Image -> Eff e () Source #

Export a disk image from the build directory; if necessary convert the image.

convertImage :: IsB9 e => Image -> Image -> Eff e () Source #

Convert an image in the build directory to another format and return the new image.

shareImage :: IsB9 e => Image -> SharedImageName -> Eff e SharedImage Source #

Publish an sharedImage made from an image and image meta data to the configured repository

pushSharedImageLatestVersion :: IsB9 e => SharedImageName -> Eff e () Source #

Publish the latest version of a shared image identified by name to the selected repository from the cache.

pullRemoteRepos :: IsB9 e => Eff e () Source #

Pull metadata files from all remote repositories.

pullLatestImage :: IsB9 e => SharedImageName -> Eff e (Maybe SharedImageBuildId) Source #

Pull the latest version of an image, either from the selected remote repo or from the repo that has the latest version.

getSharedImages :: IsB9 e => Eff e [(Repository, [SharedImage])] Source #

Return a list of all existing sharedImages from cached repositories.

lookupSharedImages :: IsB9 e => (Repository -> Bool) -> (SharedImage -> Bool) -> Eff e [(Repository, SharedImage)] Source #

Find shared images and the associated repos from two predicates. The result is the concatenated result of the sorted shared images satisfying imgPred.

getSelectedRepos :: IsB9 e => Eff e [RemoteRepo] Source #

Return either all remote repos or just the single selected repo.

getSharedImagesCacheDir :: IsB9 e => Eff e FilePath Source #

Return the path to the sub directory in the cache that contains files of shared images.

class FromAST a where Source #

Types of values that describe content, that can be created from an AST.

Methods

fromAST :: (IsB9 e, ToContentGenerator c) => AST c a -> Eff e a Source #

data AST c a Source #

Describe how to create structured content that has a tree-like syntactic structure, e.g. yaml, JSON and erlang-proplists. The first parameter defines a context into which the AST is embedded, e.g. B9.Artifact.Content'. The second parameter defines a specifix syntax, e.g ErlangPropList that the AST value generates.

Constructors

ASTObj [(String, AST c a)]

Create an object similar to a Json object.

ASTArr [AST c a]

An array.

ASTMerge [AST c a]

Merge the nested elements, this is a very powerful tool that allows to combine

ASTEmbed c 
ASTString String 
ASTInt Int 
ASTParse SourceFile 
AST a 
Instances
Functor (AST c) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Methods

fmap :: (a -> b) -> AST c a -> AST c b #

(<$) :: a -> AST c b -> AST c a #

(Eq c, Eq a) => Eq (AST c a) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Methods

(==) :: AST c a -> AST c a -> Bool #

(/=) :: AST c a -> AST c a -> Bool #

(Data c, Data a) => Data (AST c a) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Methods

gfoldl :: (forall d b. Data d => c0 (d -> b) -> d -> c0 b) -> (forall g. g -> c0 g) -> AST c a -> c0 (AST c a) #

gunfold :: (forall b r. Data b => c0 (b -> r) -> c0 r) -> (forall r. r -> c0 r) -> Constr -> c0 (AST c a) #

toConstr :: AST c a -> Constr #

dataTypeOf :: AST c a -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c0 (t d)) -> Maybe (c0 (AST c a)) #

dataCast2 :: Typeable t => (forall d e. (Data d, Data e) => c0 (t d e)) -> Maybe (c0 (AST c a)) #

gmapT :: (forall b. Data b => b -> b) -> AST c a -> AST c a #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> AST c a -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> AST c a -> r #

gmapQ :: (forall d. Data d => d -> u) -> AST c a -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> AST c a -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> AST c a -> m (AST c a) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> AST c a -> m (AST c a) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> AST c a -> m (AST c a) #

(Read c, Read a) => Read (AST c a) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Methods

readsPrec :: Int -> ReadS (AST c a) #

readList :: ReadS [AST c a] #

readPrec :: ReadPrec (AST c a) #

readListPrec :: ReadPrec [AST c a] #

(Show c, Show a) => Show (AST c a) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Methods

showsPrec :: Int -> AST c a -> ShowS #

show :: AST c a -> String #

showList :: [AST c a] -> ShowS #

Generic (AST c a) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Associated Types

type Rep (AST c a) :: Type -> Type #

Methods

from :: AST c a -> Rep (AST c a) x #

to :: Rep (AST c a) x -> AST c a #

(Arbitrary c, Arbitrary a) => Arbitrary (AST c a) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Methods

arbitrary :: Gen (AST c a) #

shrink :: AST c a -> [AST c a] #

(Hashable c, Hashable a) => Hashable (AST c a) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Methods

hashWithSalt :: Int -> AST c a -> Int #

hash :: AST c a -> Int #

(Binary c, Binary a) => Binary (AST c a) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Methods

put :: AST c a -> Put #

get :: Get (AST c a) #

putList :: [AST c a] -> Put #

(NFData c, NFData a) => NFData (AST c a) Source # 
Instance details

Defined in B9.Artifact.Content.AST

Methods

rnf :: AST c a -> () #

type Rep (AST c a) Source # 
Instance details

Defined in B9.Artifact.Content.AST

newtype YamlObject Source #

A wrapper type around yaml values with a Semigroup instance useful for combining yaml documents describing system configuration like e.g. user-data.

Constructors

YamlObject 
Instances
Eq YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

Data YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

Methods

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

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

toConstr :: YamlObject -> Constr #

dataTypeOf :: YamlObject -> DataType #

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

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

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

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

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

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

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

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

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

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

Read YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

Show YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

Generic YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

Associated Types

type Rep YamlObject :: Type -> Type #

Semigroup YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

Arbitrary YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

Hashable YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

NFData YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

Methods

rnf :: YamlObject -> () #

Textual YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

FromAST YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

type Rep YamlObject Source # 
Instance details

Defined in B9.Artifact.Content.YamlObject

type Rep YamlObject = D1 (MetaData "YamlObject" "B9.Artifact.Content.YamlObject" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" True) (C1 (MetaCons "YamlObject" PrefixI True) (S1 (MetaSel (Just "_fromYamlObject") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Value)))

newtype ErlangPropList Source #

A wrapper type around erlang terms with a Semigroup instance useful for combining sys.config files with OTP-application configurations in a list of the form of a proplist.

Instances
Eq ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

Data ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

Methods

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

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

toConstr :: ErlangPropList -> Constr #

dataTypeOf :: ErlangPropList -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

Show ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

Generic ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

Associated Types

type Rep ErlangPropList :: Type -> Type #

Semigroup ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

Arbitrary ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

Hashable ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

NFData ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

Methods

rnf :: ErlangPropList -> () #

Textual ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

FromAST ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

type Rep ErlangPropList Source # 
Instance details

Defined in B9.Artifact.Content.ErlangPropList

type Rep ErlangPropList = D1 (MetaData "ErlangPropList" "B9.Artifact.Content.ErlangPropList" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" True) (C1 (MetaCons "ErlangPropList" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SimpleErlangTerm)))

textToErlangAst :: Text -> AST c ErlangPropList Source #

Parse a text containing an Erlang expression ending with a . and Return an AST.

Since: 0.5.67

stringToErlangAst :: String -> AST c ErlangPropList Source #

Parse a string containing an Erlang expression ending with a . and Return an AST.

Since: 0.5.67

newtype CloudConfigYaml Source #

Cloud-init meta-data configuration Yaml.

cloud-config yaml documents contain: #cloud-config as first line.

@Since 0.5.62

Instances
Eq CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

Data CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

Methods

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

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

toConstr :: CloudConfigYaml -> Constr #

dataTypeOf :: CloudConfigYaml -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

Show CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

Generic CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

Associated Types

type Rep CloudConfigYaml :: Type -> Type #

Semigroup CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

Arbitrary CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

Hashable CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

NFData CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

Methods

rnf :: CloudConfigYaml -> () #

Textual CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

FromAST CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

type Rep CloudConfigYaml Source # 
Instance details

Defined in B9.Artifact.Content.CloudConfigYaml

type Rep CloudConfigYaml = D1 (MetaData "CloudConfigYaml" "B9.Artifact.Content.CloudConfigYaml" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" True) (C1 (MetaCons "MkCloudConfigYaml" PrefixI True) (S1 (MetaSel (Just "fromCloudConfigYaml") NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 YamlObject)))

cloudConfigFileHeader :: Text Source #

The header line, which must be the first line in the text file containing the cloud-config Yaml document.

@Since 0.5.62

data Content Source #

This is content that can be read via the generated Read instance.

Constructors

RenderErlang (AST Content ErlangPropList) 
RenderYamlObject (AST Content YamlObject) 
RenderCloudConfig (AST Content CloudConfigYaml) 
FromByteString ByteString

This data will be passed through unaltered. This is used during the transition phase from having B9 stuff read from files via Read instances towards programatic use or the use of HOCON.

Since: 0.5.62

FromString String

Embed a literal string

FromTextFile SourceFile

Embed the contents of the SourceFile with template parameter substitution.

RenderBase64BinaryFile FilePath

The data in the given file will be base64 encoded.

RenderBase64Binary ByteString

This data will be base64 encoded.

FromURL String

Download the contents of the URL

Instances
Eq Content Source # 
Instance details

Defined in B9.Artifact.Content.Readable

Methods

(==) :: Content -> Content -> Bool #

(/=) :: Content -> Content -> Bool #

Data Content Source # 
Instance details

Defined in B9.Artifact.Content.Readable

Methods

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

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

toConstr :: Content -> Constr #

dataTypeOf :: Content -> DataType #

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

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

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

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

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

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

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

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

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

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

Read Content Source # 
Instance details

Defined in B9.Artifact.Content.Readable

Show Content Source # 
Instance details

Defined in B9.Artifact.Content.Readable

Generic Content Source # 
Instance details

Defined in B9.Artifact.Content.Readable

Associated Types

type Rep Content :: Type -> Type #

Methods

from :: Content -> Rep Content x #

to :: Rep Content x -> Content #

Arbitrary Content Source # 
Instance details

Defined in B9.Artifact.Content.Readable

NFData Content Source # 
Instance details

Defined in B9.Artifact.Content.Readable

Methods

rnf :: Content -> () #

ToContentGenerator Content Source # 
Instance details

Defined in B9.Artifact.Content.Readable

type Rep Content Source # 
Instance details

Defined in B9.Artifact.Content.Readable

type Rep Content = D1 (MetaData "Content" "B9.Artifact.Content.Readable" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (((C1 (MetaCons "RenderErlang" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AST Content ErlangPropList))) :+: C1 (MetaCons "RenderYamlObject" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AST Content YamlObject)))) :+: (C1 (MetaCons "RenderCloudConfig" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 (AST Content CloudConfigYaml))) :+: C1 (MetaCons "FromByteString" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ByteString)))) :+: ((C1 (MetaCons "FromString" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String)) :+: C1 (MetaCons "FromTextFile" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceFile))) :+: (C1 (MetaCons "RenderBase64BinaryFile" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)) :+: (C1 (MetaCons "RenderBase64Binary" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ByteString)) :+: C1 (MetaCons "FromURL" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 String))))))

data ArtifactSource Source #

Describe how input files for artifacts to build are obtained. The general structure of each constructor is FromXXX destination source

Constructors

FromFile FilePath SourceFile

Copy a SourceFile potentially replacing variable defined in Let-like parent elements.

FromContent FilePath Content

Create a file from some Content

SetPermissions Int Int Int [ArtifactSource]

Set the unix file permissions to all files generated by the nested list of ArtifactSources.

FromDirectory FilePath [ArtifactSource]

Assume a local directory as starting point for all relative source files in the nested ArtifactSources.

IntoDirectory FilePath [ArtifactSource]

Specify an output directory for all the files generated by the nested ArtifactSources

Instances
Eq ArtifactSource Source # 
Instance details

Defined in B9.Artifact.Readable.Source

Data ArtifactSource Source # 
Instance details

Defined in B9.Artifact.Readable.Source

Methods

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

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

toConstr :: ArtifactSource -> Constr #

dataTypeOf :: ArtifactSource -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ArtifactSource Source # 
Instance details

Defined in B9.Artifact.Readable.Source

Show ArtifactSource Source # 
Instance details

Defined in B9.Artifact.Readable.Source

Generic ArtifactSource Source # 
Instance details

Defined in B9.Artifact.Readable.Source

Associated Types

type Rep ArtifactSource :: Type -> Type #

Arbitrary ArtifactSource Source # 
Instance details

Defined in B9.Artifact.Readable.Source

NFData ArtifactSource Source # 
Instance details

Defined in B9.Artifact.Readable.Source

Methods

rnf :: ArtifactSource -> () #

type Rep ArtifactSource Source # 
Instance details

Defined in B9.Artifact.Readable.Source

type Rep ArtifactSource = D1 (MetaData "ArtifactSource" "B9.Artifact.Readable.Source" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) ((C1 (MetaCons "FromFile" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 SourceFile)) :+: C1 (MetaCons "FromContent" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Content))) :+: (C1 (MetaCons "SetPermissions" PrefixI False) ((S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int)) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 Int) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ArtifactSource]))) :+: (C1 (MetaCons "FromDirectory" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ArtifactSource])) :+: C1 (MetaCons "IntoDirectory" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ArtifactSource])))))

getArtifactSourceFiles :: ArtifactSource -> [FilePath] Source #

Return all source files generated by an ArtifactSource.

data AssemblyOutput Source #

The output of an ArtifactAssembly is either a set of generated files, or it might be a directory that contains the artifacts sources.

Instances
Eq AssemblyOutput Source # 
Instance details

Defined in B9.Artifact.Readable

Data AssemblyOutput Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

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

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

toConstr :: AssemblyOutput -> Constr #

dataTypeOf :: AssemblyOutput -> DataType #

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

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

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

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

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

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

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

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

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

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

Read AssemblyOutput Source # 
Instance details

Defined in B9.Artifact.Readable

Show AssemblyOutput Source # 
Instance details

Defined in B9.Artifact.Readable

Generic AssemblyOutput Source # 
Instance details

Defined in B9.Artifact.Readable

Associated Types

type Rep AssemblyOutput :: Type -> Type #

type Rep AssemblyOutput Source # 
Instance details

Defined in B9.Artifact.Readable

type Rep AssemblyOutput = D1 (MetaData "AssemblyOutput" "B9.Artifact.Readable" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "AssemblyGeneratesOutputFiles" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [FilePath])) :+: C1 (MetaCons "AssemblyCopiesSourcesToDirectory" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)))

data CloudInitType Source #

Constructors

CI_ISO 
CI_VFAT 
CI_DIR 
Instances
Eq CloudInitType Source # 
Instance details

Defined in B9.Artifact.Readable

Data CloudInitType Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

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

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

toConstr :: CloudInitType -> Constr #

dataTypeOf :: CloudInitType -> DataType #

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

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

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

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

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

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

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

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

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

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

Read CloudInitType Source # 
Instance details

Defined in B9.Artifact.Readable

Show CloudInitType Source # 
Instance details

Defined in B9.Artifact.Readable

Generic CloudInitType Source # 
Instance details

Defined in B9.Artifact.Readable

Associated Types

type Rep CloudInitType :: Type -> Type #

Arbitrary CloudInitType Source # 
Instance details

Defined in B9.Artifact.Readable

Hashable CloudInitType Source # 
Instance details

Defined in B9.Artifact.Readable

Binary CloudInitType Source # 
Instance details

Defined in B9.Artifact.Readable

NFData CloudInitType Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

rnf :: CloudInitType -> () #

type Rep CloudInitType Source # 
Instance details

Defined in B9.Artifact.Readable

type Rep CloudInitType = D1 (MetaData "CloudInitType" "B9.Artifact.Readable" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "CI_ISO" PrefixI False) (U1 :: Type -> Type) :+: (C1 (MetaCons "CI_VFAT" PrefixI False) (U1 :: Type -> Type) :+: C1 (MetaCons "CI_DIR" PrefixI False) (U1 :: Type -> Type)))

data ArtifactTarget Source #

Instances
Eq ArtifactTarget Source # 
Instance details

Defined in B9.Artifact.Readable

Data ArtifactTarget Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

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

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

toConstr :: ArtifactTarget -> Constr #

dataTypeOf :: ArtifactTarget -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ArtifactTarget Source # 
Instance details

Defined in B9.Artifact.Readable

Show ArtifactTarget Source # 
Instance details

Defined in B9.Artifact.Readable

Generic ArtifactTarget Source # 
Instance details

Defined in B9.Artifact.Readable

Associated Types

type Rep ArtifactTarget :: Type -> Type #

Hashable ArtifactTarget Source # 
Instance details

Defined in B9.Artifact.Readable

Binary ArtifactTarget Source # 
Instance details

Defined in B9.Artifact.Readable

NFData ArtifactTarget Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

rnf :: ArtifactTarget -> () #

type Rep ArtifactTarget Source # 
Instance details

Defined in B9.Artifact.Readable

type Rep ArtifactTarget = D1 (MetaData "ArtifactTarget" "B9.Artifact.Readable" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "CloudInitTarget" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 CloudInitType) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 FilePath)) :+: C1 (MetaCons "VmImagesTarget" PrefixI False) (U1 :: Type -> Type))

data AssembledArtifact Source #

A symbolic representation of the targets assembled by assemble from an ArtifactAssembly. There is a list of ArtifactTargets because e.g. a single CloudInit can produce up to three output files, a directory, an ISO image and a VFAT image.

Instances
Eq AssembledArtifact Source # 
Instance details

Defined in B9.Artifact.Readable

Data AssembledArtifact Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

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

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

toConstr :: AssembledArtifact -> Constr #

dataTypeOf :: AssembledArtifact -> DataType #

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

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

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

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

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

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

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

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

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

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

Read AssembledArtifact Source # 
Instance details

Defined in B9.Artifact.Readable

Show AssembledArtifact Source # 
Instance details

Defined in B9.Artifact.Readable

Generic AssembledArtifact Source # 
Instance details

Defined in B9.Artifact.Readable

Associated Types

type Rep AssembledArtifact :: Type -> Type #

Hashable AssembledArtifact Source # 
Instance details

Defined in B9.Artifact.Readable

Binary AssembledArtifact Source # 
Instance details

Defined in B9.Artifact.Readable

NFData AssembledArtifact Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

rnf :: AssembledArtifact -> () #

type Rep AssembledArtifact Source # 
Instance details

Defined in B9.Artifact.Readable

type Rep AssembledArtifact = D1 (MetaData "AssembledArtifact" "B9.Artifact.Readable" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) (C1 (MetaCons "AssembledArtifact" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 InstanceId) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ArtifactTarget])))

data ArtifactAssembly Source #

Define an output of a build. Assemblies are nested into ArtifactGenerators. They contain all the files defined by the Sources they are nested into.

Constructors

CloudInit [CloudInitType] FilePath

Generate a cloud-init compatible directory, ISO- or VFAT image, as specified by the list of CloudInitTypes. Every item will use the second argument to create an appropriate file name, e.g. for the CI_ISO type the output is second_param.iso.

VmImages [ImageTarget] VmScript

a set of VM-images that were created by executing a build script on them.

Instances
Eq ArtifactAssembly Source # 
Instance details

Defined in B9.Artifact.Readable

Data ArtifactAssembly Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

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

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

toConstr :: ArtifactAssembly -> Constr #

dataTypeOf :: ArtifactAssembly -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ArtifactAssembly Source # 
Instance details

Defined in B9.Artifact.Readable

Show ArtifactAssembly Source # 
Instance details

Defined in B9.Artifact.Readable

Generic ArtifactAssembly Source # 
Instance details

Defined in B9.Artifact.Readable

Associated Types

type Rep ArtifactAssembly :: Type -> Type #

Arbitrary ArtifactAssembly Source # 
Instance details

Defined in B9.Artifact.Readable

Hashable ArtifactAssembly Source # 
Instance details

Defined in B9.Artifact.Readable

Binary ArtifactAssembly Source # 
Instance details

Defined in B9.Artifact.Readable

NFData ArtifactAssembly Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

rnf :: ArtifactAssembly -> () #

type Rep ArtifactAssembly Source # 
Instance details

Defined in B9.Artifact.Readable

newtype InstanceId Source #

Identify an artifact. Deprecated TODO: B9 does not check if all instances IDs are unique.

Constructors

IID String 
Instances
Eq InstanceId Source # 
Instance details

Defined in B9.Artifact.Readable

Data InstanceId Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

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

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

toConstr :: InstanceId -> Constr #

dataTypeOf :: InstanceId -> DataType #

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

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

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

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

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

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

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

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

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

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

Read InstanceId Source # 
Instance details

Defined in B9.Artifact.Readable

Show InstanceId Source # 
Instance details

Defined in B9.Artifact.Readable

Arbitrary InstanceId Source # 
Instance details

Defined in B9.Artifact.Readable

Hashable InstanceId Source # 
Instance details

Defined in B9.Artifact.Readable

Binary InstanceId Source # 
Instance details

Defined in B9.Artifact.Readable

NFData InstanceId Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

rnf :: InstanceId -> () #

data ArtifactGenerator Source #

Artifacts represent the things B9 can build. A generator specifies howto generate parameterized, multiple artifacts. The general structure is:

   Let [ ... bindings ... ]
       [ Sources
           [ ... list all input files ... ]
           [ Artifact ...
           , Artifact ...
           , Let [ ... ] [ ... ]
           ]
       ]

The reasons why Sources takes a list of ArtifactGenerators is that

  1. this makes the value easier to read/write for humans
  2. the sources are static files used in all children (e.g. company logo image)
  3. the sources are parameterized by variables that bound to different values for each artifact, e.g. a template network config file which contains the host IP address.

To bind such variables use Let, Each, LetX or EachT.

String substitution of these variables is done by B9.Artifact.Content.StringTemplate. These variables can be used as value in nested Lets, in most file names/paths and in source files added with SourceFile

  • - @deprecated TODO remove this when switching to Dhall

Constructors

Sources [ArtifactSource] [ArtifactGenerator]

Add sources available to ArtifactAssemblys in nested artifact generators.

Let [(String, String)] [ArtifactGenerator]

Bind variables, variables are available in nested generators. @deprecated TODO remove this when switching to Dhall

LetX [(String, [String])] [ArtifactGenerator]

A Let where each variable is assigned to each value; the nested generator is executed for each permutation.

    LetX [("x", ["1","2","3"]), ("y", ["a","b"])] [..]

Is equal to:

    Let [] [
      Let [("x", "1"), ("y", "a")] [..]
      Let [("x", "1"), ("y", "b")] [..]
      Let [("x", "2"), ("y", "a")] [..]
      Let [("x", "2"), ("y", "b")] [..]
      Let [("x", "3"), ("y", "a")] [..]
      Let [("x", "3"), ("y", "b")] [..]
    ]

@deprecated TODO remove this when switching to Dhall

Each [(String, [String])] [ArtifactGenerator]

Bind each variable to their first value, then each variable to the second value, etc ... and execute the nested generator in every step. LetX represents a product of all variables, whereas Each represents a sum of variable bindings - Each is more like a zip whereas LetX is more like a list comprehension. @deprecated TODO remove this when switching to Dhall

EachT [String] [[String]] [ArtifactGenerator]

The transposed version of Each: Bind the variables in the first list to each a set of values from the second argument; execute the nested generators for each binding @deprecated TODO remove this when switching to Dhall

Artifact InstanceId ArtifactAssembly

Generate an artifact defined by an ArtifactAssembly; the assembly can access the files created from the Sources and variables bound by Letish elements. An artifact has an instance id, that is a unique, human readable string describing the artifact to assemble.

EmptyArtifact 
Instances
Eq ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

Data ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

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

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

toConstr :: ArtifactGenerator -> Constr #

dataTypeOf :: ArtifactGenerator -> DataType #

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

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

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

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

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

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

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

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

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

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

Read ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

Show ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

Generic ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

Associated Types

type Rep ArtifactGenerator :: Type -> Type #

Semigroup ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

Monoid ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

Arbitrary ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

NFData ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

Methods

rnf :: ArtifactGenerator -> () #

type Rep ArtifactGenerator Source # 
Instance details

Defined in B9.Artifact.Readable

type Rep ArtifactGenerator = D1 (MetaData "ArtifactGenerator" "B9.Artifact.Readable" "b9-0.5.68.2-H3TJySYVfAUHKSkQXiebpT" False) ((C1 (MetaCons "Sources" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ArtifactSource]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ArtifactGenerator])) :+: (C1 (MetaCons "Let" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(String, String)]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ArtifactGenerator])) :+: C1 (MetaCons "LetX" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(String, [String])]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ArtifactGenerator])))) :+: ((C1 (MetaCons "Each" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [(String, [String])]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ArtifactGenerator])) :+: C1 (MetaCons "EachT" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [String]) :*: (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [[String]]) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 [ArtifactGenerator])))) :+: (C1 (MetaCons "Artifact" PrefixI False) (S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 InstanceId) :*: S1 (MetaSel (Nothing :: Maybe Symbol) NoSourceUnpackedness NoSourceStrictness DecidedLazy) (Rec0 ArtifactAssembly)) :+: C1 (MetaCons "EmptyArtifact" PrefixI False) (U1 :: Type -> Type))))

instanceIdKey :: String Source #

The variable containing the instance id. Deprecated

buildIdKey :: String Source #

The variable containing the buildId that identifies each execution of B9. For more info about variable substitution in source files see StringTemplate

buildDateKey :: String Source #

The variable containing the date and time a build was started. For more info about variable substitution in source files see StringTemplate

getAssemblyOutput :: ArtifactAssembly -> [AssemblyOutput] Source #

Return the files that the artifact assembly consist of.

data InstanceGenerator e Source #

Instances
Eq e => Eq (InstanceGenerator e) Source # 
Instance details

Defined in B9.Artifact.Readable.Interpreter

Data e => Data (InstanceGenerator e) Source # 
Instance details

Defined in B9.Artifact.Readable.Interpreter

Methods

gfoldl :: (forall d b. Data d => c (d -> b) -> d -> c b) -> (forall g. g -> c g) -> InstanceGenerator e -> c (InstanceGenerator e) #

gunfold :: (forall b r. Data b => c (b -> r) -> c r) -> (forall r. r -> c r) -> Constr -> c (InstanceGenerator e) #

toConstr :: InstanceGenerator e -> Constr #

dataTypeOf :: InstanceGenerator e -> DataType #

dataCast1 :: Typeable t => (forall d. Data d => c (t d)) -> Maybe (c (InstanceGenerator e)) #

dataCast2 :: Typeable t => (forall d e0. (Data d, Data e0) => c (t d e0)) -> Maybe (c (InstanceGenerator e)) #

gmapT :: (forall b. Data b => b -> b) -> InstanceGenerator e -> InstanceGenerator e #

gmapQl :: (r -> r' -> r) -> r -> (forall d. Data d => d -> r') -> InstanceGenerator e -> r #

gmapQr :: (r' -> r -> r) -> r -> (forall d. Data d => d -> r') -> InstanceGenerator e -> r #

gmapQ :: (forall d. Data d => d -> u) -> InstanceGenerator e -> [u] #

gmapQi :: Int -> (forall d. Data d => d -> u) -> InstanceGenerator e -> u #

gmapM :: Monad m => (forall d. Data d => d -> m d) -> InstanceGenerator e -> m (InstanceGenerator e) #

gmapMp :: MonadPlus m => (forall d. Data d => d -> m d) -> InstanceGenerator e -> m (InstanceGenerator e) #

gmapMo :: MonadPlus m => (forall d. Data d => d -> m d) -> InstanceGenerator e -> m (InstanceGenerator e) #

Read e => Read (InstanceGenerator e) Source # 
Instance details

Defined in B9.Artifact.Readable.Interpreter

Show e => Show (InstanceGenerator e) Source # 
Instance details

Defined in B9.Artifact.Readable.Interpreter

data InstanceSources Source #

Internal data structure. Only exposed for unit testing.

buildArtifacts :: ArtifactGenerator -> B9 String Source #

Execute an ArtifactGenerator and return a B9Invocation that returns the build id obtained by getBuildId.

getArtifactOutputFiles :: ArtifactGenerator -> Either SomeException [FilePath] Source #

Return a list of relative paths for the local files to be generated by the ArtifactGenerator. This excludes Shared and Transient image targets.

assemble :: ArtifactGenerator -> B9 [AssembledArtifact] Source #

Run an artifact generator to produce the artifacts.

runArtifactGenerator :: Environment -> String -> String -> ArtifactGenerator -> Either SomeException [InstanceGenerator [TextFileWriter]] Source #

Interpret an ArtifactGenerator into a list of simple commands, i.e. InstanceGenerators

Since: 0.5.65

runArtifactAssembly :: IsB9 e => InstanceId -> FilePath -> ArtifactAssembly -> Eff e [ArtifactTarget] Source #

Create the ArtifactTarget from an ArtifactAssembly in the directory instanceDir

Since: 0.5.65