| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Development.Shake.Plus.Core
Synopsis
- class MonadIO m => MonadAction m where
- liftAction :: Action a -> m a
- class Monad m => MonadRules m where
- newtype UnliftAction m = UnliftAction {
- unliftAction :: forall a. m a -> Action a
- class MonadAction m => MonadUnliftAction m where
- withRunInAction :: ((forall a. m a -> Action a) -> Action b) -> m b
- withUnliftAction :: MonadUnliftAction m => (UnliftAction m -> Action a) -> m a
- askUnliftAction :: MonadUnliftAction m => m (UnliftAction m)
- toAction :: MonadUnliftAction m => m a -> m (Action a)
- data RAction r a
- data ShakePlus r a
- runRAction :: MonadAction m => env -> RAction env a -> m a
- runShakePlus :: MonadRules m => env -> ShakePlus env a -> m a
- data Action a
- data Rules a
- type FilePattern = String
- shake :: ShakeOptions -> Rules () -> IO ()
- shakeOptions :: ShakeOptions
Documentation
class MonadIO m => MonadAction m where Source #
Monads in which Actions may be embedded.
Methods
liftAction :: Action a -> m a Source #
Instances
| MonadAction Action Source # | |
Defined in Development.Shake.Plus.Core Methods liftAction :: Action a -> Action a Source # | |
| MonadAction (RAction r) Source # | |
Defined in Development.Shake.Plus.Core Methods liftAction :: Action a -> RAction r a Source # | |
| MonadAction m => MonadAction (ReaderT r m) Source # | |
Defined in Development.Shake.Plus.Core Methods liftAction :: Action a -> ReaderT r m a Source # | |
class Monad m => MonadRules m where Source #
Instances
| MonadRules Rules Source # | |
| MonadRules (ShakePlus r) Source # | |
| MonadRules m => MonadRules (ReaderT r m) Source # | |
newtype UnliftAction m Source #
Constructors
| UnliftAction | |
Fields
| |
class MonadAction m => MonadUnliftAction m where Source #
Monads which allow their actions to be run in Action.
For the same reasons as MonadUnliftIO this is limited to ReaderT
and IdentityT transformers on top of Action.
Minimal complete definition
Nothing
Methods
withRunInAction :: ((forall a. m a -> Action a) -> Action b) -> m b Source #
Instances
| MonadUnliftAction Action Source # | |
Defined in Development.Shake.Plus.Core | |
| MonadUnliftAction (RAction r) Source # | |
Defined in Development.Shake.Plus.Core | |
| MonadUnliftAction m => MonadUnliftAction (ReaderT r m) Source # | |
Defined in Development.Shake.Plus.Core | |
withUnliftAction :: MonadUnliftAction m => (UnliftAction m -> Action a) -> m a Source #
askUnliftAction :: MonadUnliftAction m => m (UnliftAction m) Source #
toAction :: MonadUnliftAction m => m a -> m (Action a) Source #
Concrete Action runner, hardcoded to `ReaderT r Action a`.
Instances
| MonadReader r (RAction r) Source # | |
| Monad (RAction r) Source # | |
| Functor (RAction r) Source # | |
| MonadFail (RAction r) Source # | |
Defined in Development.Shake.Plus.Core | |
| Applicative (RAction r) Source # | |
Defined in Development.Shake.Plus.Core | |
| MonadIO (RAction r) Source # | |
Defined in Development.Shake.Plus.Core | |
| MonadThrow (RAction r) Source # | |
Defined in Development.Shake.Plus.Core | |
| MonadUnliftAction (RAction r) Source # | |
Defined in Development.Shake.Plus.Core | |
| MonadAction (RAction r) Source # | |
Defined in Development.Shake.Plus.Core Methods liftAction :: Action a -> RAction r a Source # | |
Concrete Rules collector, hardcoded to `ReaderT r Rules a`.
Instances
| MonadReader r (ShakePlus r) Source # | |
| Monad (ShakePlus r) Source # | |
| Functor (ShakePlus r) Source # | |
| Applicative (ShakePlus r) Source # | |
Defined in Development.Shake.Plus.Core | |
| MonadIO (ShakePlus r) Source # | |
Defined in Development.Shake.Plus.Core | |
| MonadThrow (ShakePlus r) Source # | |
Defined in Development.Shake.Plus.Core | |
| MonadRules (ShakePlus r) Source # | |
runRAction :: MonadAction m => env -> RAction env a -> m a Source #
Run an RAction with an environment, consuming it for a result.
runShakePlus :: MonadRules m => env -> ShakePlus env a -> m a Source #
The Action monad, use liftIO to raise IO actions into it, and need to execute files.
Action values are used by addUserRule and action. The Action monad tracks the dependencies of a rule.
To raise an exception call error, MonadFail or .liftIO . throwIO
Instances
| Monad Action | |
| Functor Action | |
| MonadFail Action | |
Defined in Development.Shake.Internal.Core.Types | |
| Applicative Action | |
| MonadIO Action | |
Defined in Development.Shake.Internal.Core.Types | |
| MonadUnliftAction Action Source # | |
Defined in Development.Shake.Plus.Core | |
| MonadAction Action Source # | |
Defined in Development.Shake.Plus.Core Methods liftAction :: Action a -> Action a Source # | |
| MonadTempDir Action | |
Defined in Development.Shake.Command Methods runWithTempDir :: (FilePath -> Action a) -> Action a | |
| Semigroup a => Semigroup (Action a) | |
| Monoid a => Monoid (Action a) | |
| CmdResult r => CmdArguments (Action r) | |
Defined in Development.Shake.Command Methods cmdArguments :: CmdArgument -> Action r # | |
Define a set of rules. Rules can be created with calls to functions such as %> or action.
Rules are combined with either the Monoid instance, or (more commonly) the Monad instance and do notation.
To define your own custom types of rule, see Development.Shake.Rule.
Instances
| Monad Rules | |
| Functor Rules | |
| MonadFix Rules | |
Defined in Development.Shake.Internal.Core.Rules | |
| MonadFail Rules | |
Defined in Development.Shake.Internal.Core.Rules | |
| Applicative Rules | |
| MonadIO Rules | |
Defined in Development.Shake.Internal.Core.Rules | |
| MonadRules Rules Source # | |
| Semigroup a => Semigroup (Rules a) | |
| (Semigroup a, Monoid a) => Monoid (Rules a) | |
type FilePattern = String #
A type synonym for file patterns, containing // and *. For the syntax
and semantics of FilePattern see ?==.
Most normaliseExd FilePath values are suitable as FilePattern values which match
only that specific file. On Windows \ is treated as equivalent to /.
You can write FilePattern values as a literal string, or build them
up using the operators <.>, </>
and <//>. However, beware that:
- On Windows, use
<.>from Development.Shake.FilePath instead of from System.FilePath - otherwise"//*" <.> exeresults in"//*\\.exe". - If the second argument of
</>has a leading path separator (namely/) then the second argument will be returned.
shake :: ShakeOptions -> Rules () -> IO () #
Main entry point for running Shake build systems. For an example see the top of the module Development.Shake.
Use ShakeOptions to specify how the system runs, and Rules to specify what to build. The function will throw
an exception if the build fails.
To use command line flags to modify ShakeOptions see shakeArgs.
shakeOptions :: ShakeOptions #
The default set of ShakeOptions.