-- Hoogle documentation, generated by Haddock -- See Hoogle, http://www.haskell.org/hoogle/ -- | Re-export of Shake using well-typed paths and ReaderT. -- -- Re-export of Shake using well-typed paths and ReaderT. This is an -- early release so some things may be missing or broken but so far the -- conveniences have been worth it. @package shake-plus @version 0.0.1.2 module Development.Shake.Plus.Core -- | Monads in which Actions may be embedded. class Monad m => MonadAction m liftAction :: MonadAction m => Action a -> m a class Monad m => MonadRules m liftRules :: MonadRules m => Rules a -> m a newtype UnliftAction m UnliftAction :: (forall a. m a -> Action a) -> UnliftAction m [unliftAction] :: UnliftAction m -> forall a. m a -> Action a -- | 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. class MonadAction m => MonadUnliftAction m withRunInAction :: MonadUnliftAction m => ((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) -- | Concrete Action runner, hardcoded to `ReaderT r Action a`. data RAction r a -- | Concrete Rules collector, hardcoded to `ReaderT r Rules a`. data ShakePlus r a -- | Run an RAction with an environment, consuming it for a result. runRAction :: MonadAction m => env -> RAction env a -> m a -- | Run a ShakePlus with an environment, consuming it for some -- Shake Rules. runShakePlus :: MonadRules m => env -> ShakePlus env a -> m a instance Development.Shake.Plus.Core.MonadRules (Development.Shake.Plus.Core.ShakePlus r) instance Control.Monad.IO.Class.MonadIO (Development.Shake.Plus.Core.ShakePlus r) instance Control.Monad.Reader.Class.MonadReader r (Development.Shake.Plus.Core.ShakePlus r) instance GHC.Base.Monad (Development.Shake.Plus.Core.ShakePlus r) instance GHC.Base.Applicative (Development.Shake.Plus.Core.ShakePlus r) instance GHC.Base.Functor (Development.Shake.Plus.Core.ShakePlus r) instance Development.Shake.Plus.Core.MonadUnliftAction (Development.Shake.Plus.Core.RAction r) instance Development.Shake.Plus.Core.MonadAction (Development.Shake.Plus.Core.RAction r) instance Control.Monad.IO.Class.MonadIO (Development.Shake.Plus.Core.RAction r) instance Control.Monad.Reader.Class.MonadReader r (Development.Shake.Plus.Core.RAction r) instance GHC.Base.Monad (Development.Shake.Plus.Core.RAction r) instance GHC.Base.Applicative (Development.Shake.Plus.Core.RAction r) instance GHC.Base.Functor (Development.Shake.Plus.Core.RAction r) instance Control.Monad.Catch.MonadThrow (Development.Shake.Plus.Core.ShakePlus r) instance Control.Monad.Catch.MonadThrow (Development.Shake.Plus.Core.RAction r) instance Development.Shake.Plus.Core.MonadRules Development.Shake.Internal.Core.Rules.Rules instance Development.Shake.Plus.Core.MonadRules m => Development.Shake.Plus.Core.MonadRules (Control.Monad.Trans.Reader.ReaderT r m) instance Development.Shake.Plus.Core.MonadUnliftAction Development.Shake.Internal.Core.Types.Action instance Development.Shake.Plus.Core.MonadUnliftAction m => Development.Shake.Plus.Core.MonadUnliftAction (Control.Monad.Trans.Reader.ReaderT r m) instance Development.Shake.Plus.Core.MonadAction Development.Shake.Internal.Core.Types.Action instance Development.Shake.Plus.Core.MonadAction m => Development.Shake.Plus.Core.MonadAction (Control.Monad.Trans.Reader.ReaderT r m) module Development.Shake.Plus.Config -- | Lifted readConfigFile with well-typed path. readConfigFile :: MonadIO m => Path a File -> m (HashMap String String) -- | Lifted readConfigFileWithEnv with well-typed path. readConfigFileWithEnv :: MonadIO m => [(String, String)] -> Path a File -> m (HashMap String String) -- | Lifted usingConfigFile with well-typed path. usingConfigFile :: MonadRules m => Path a File -> m () -- | Lifted usingConfig. usingConfig :: MonadRules m => HashMap String String -> m () -- | Lifted getConfig. getConfig :: MonadAction m => String -> m (Maybe String) -- | Lifted getConfigKeys. getConfigKeys :: MonadAction m => m [String] module Development.Shake.Plus.Cache -- | Lifted version of newCache using RAction. newCache :: (MonadRules m, MonadReader r m, Eq k, Hashable k) => (k -> RAction r v) -> m (k -> RAction r v) -- | Lifted version of newCacheIO using RAction. newCacheIO :: (MonadIO m, MonadReader r m, Eq k, Hashable k) => (k -> RAction r v) -> m (k -> RAction r v) module Development.Shake.Plus.Database -- | The type of an open Shake database. Created with -- shakeOpenDatabase or shakeWithDatabase. Used with -- shakeRunDatabase. You may not execute simultaneous calls using -- ShakeDatabase on separate threads (it will raise an error). data ShakeDatabase -- | Lifted shakeOpenDatabase shakeOpenDatabase :: MonadIO m => ShakeOptions -> Rules () -> m (IO ShakeDatabase, IO ()) -- | Unlifted shakeWithDatabase shakeWithDatabase :: MonadUnliftIO m => ShakeOptions -> Rules () -> (ShakeDatabase -> m a) -> m a -- | Lifted shakeOneShotDatabase shakeOneShotDatabase :: MonadIO m => ShakeDatabase -> m () -- | Lifted shakeRunDatabase shakeRunDatabase :: MonadIO m => ShakeDatabase -> [Action a] -> m ([a], [IO ()]) -- | Lifted shakeLiveFilesDatabase shakeLiveFilesDatabase :: MonadIO m => ShakeDatabase -> m [FilePath] -- | Lifted shakeProfileDatabase with well-typed path. shakeProfileDatabase :: MonadIO m => ShakeDatabase -> Path a File -> m () -- | Lifted shakeErrorsDatabase shakeErrorsDatabase :: MonadIO m => ShakeDatabase -> m [(String, SomeException)] -- | Unlifted shakeRunAfter shakeRunAfter :: MonadUnliftIO m => ShakeOptions -> [m ()] -> m () module Development.Shake.Plus.Directory -- | Lifted version of doesFileExist using well-typed Paths. doesFileExist :: MonadAction m => Path b File -> m Bool -- | Lifted version of doesDirectoryExist using well-typed -- Paths. doesDirectoryExist :: MonadAction m => Path b Dir -> m Bool -- | Lifted version of getDirectoryFiles using well-typed -- Paths. getDirectoryFiles :: MonadAction m => Path b Dir -> [FilePattern] -> m [Path Rel File] -- | Lifted version of getDirectoryDirs using well-typed -- Paths. getDirectoryDirs :: MonadAction m => Path b Dir -> m [Path Rel Dir] -- | Lifted version of getDirectoryFilesIO using well-typed -- Paths. getDirectoryFilesIO :: MonadIO m => Path b Dir -> [FilePattern] -> m [Path Rel File] module Development.Shake.Plus.File -- | Lifted version of copyFile with well-typed Paths. copyFile' :: (MonadAction m, Partial) => Path Rel File -> Path Rel File -> m () -- | Lifted version of copyFileChanged' with well-typed -- Paths. copyFileChanged :: (MonadAction m, Partial) => Path Rel File -> Path Rel File -> m () -- | Lifted version of readFile' with well-typed Path. readFile' :: (MonadAction m, Partial) => Path Rel File -> m Text -- | Lifted version of readFileLines with well-typed Path. readFileLines :: (MonadAction m, Partial) => Path Rel File -> m [Text] -- | Lifted version of writeFile with well-typed Path. writeFile' :: (MonadAction m, Partial) => Path Rel File -> Text -> m () -- | Lifted version of writeFileLines with well-typed Path. writeFileLines :: (MonadAction m, Partial) => Path Rel File -> [Text] -> m () -- | Lifted version of writeFileChanged with well-typed Path. writeFileChanged :: (MonadAction m, Partial) => Path b File -> Text -> m () -- | Lifted version of removeFiles with well-typed Path. removeFiles :: MonadAction m => Path b File -> [FilePattern] -> m () -- | Lifted version of removeFilesAfter with well-typed Path. removeFilesAfter :: MonadAction m => Path Rel Dir -> [FilePattern] -> m () module Development.Shake.Plus.FileRules -- | Lifted version of need using well-typed Paths need :: (MonadAction m, Partial) => [Path Rel File] -> m () -- | Lifted version of %> using well-typed Paths (%>) :: (Partial, MonadReader r m, MonadRules m) => FilePattern -> (Path Rel File -> RAction r ()) -> m () -- | Lifted version of |%> using well-typed Paths (|%>) :: (Partial, MonadReader r m, MonadRules m) => [FilePattern] -> (Path Rel File -> RAction r ()) -> m () -- | Lifted version of phony using well-typed Paths phony :: (MonadReader r m, MonadRules m) => String -> RAction r () -> m () module Development.Shake.Plus.Oracle -- | Lifted version of addOracle using RAction runner. addOracle :: (MonadRules m, MonadReader r m, RuleResult q ~ a, ShakeValue q, ShakeValue a, Partial) => (q -> RAction r a) -> m (q -> RAction r a) -- | Lifted version of addOracleCache using RAction runner. addOracleCache :: (MonadRules m, MonadReader r m, RuleResult q ~ a, ShakeValue q, ShakeValue a, Partial) => (q -> RAction r a) -> m (q -> RAction r a) -- | Lifted version of addOracleHash using RAction runner. addOracleHash :: (MonadRules m, MonadReader r m, RuleResult q ~ a, ShakeValue q, ShakeValue a, Partial) => (q -> RAction r a) -> m (q -> RAction r a) -- | Lifted version of askOracle. askOracle :: (MonadAction m, RuleResult q ~ a, ShakeValue q, ShakeValue a) => q -> m a -- | Lifted version of askOracles. askOracles :: (MonadAction m, RuleResult q ~ a, ShakeValue q, ShakeValue a) => [q] -> m [a] module Development.Shake.Plus module Development.Shake.Plus.Env -- | Lifted version of getEnv getEnv :: MonadAction m => String -> m (Maybe String) -- | Lifted version of getEnvWithDefault getEnvWithDefault :: MonadAction m => String -> String -> m String -- | Lifted version of getEnvError getEnvError :: (Partial, MonadAction m) => String -> m String module Development.Shake.Plus.Temp -- | Unlifted version of withTempFile with well-typed Path. withTempFile :: (MonadUnliftAction m, MonadThrow m) => (Path Rel File -> m a) -> m a -- | Unlifted version of withTempFile with well-typed Path. withTempDir :: (MonadUnliftAction m, MonadThrow m) => (Path Rel Dir -> m a) -> m a -- | Unlifted version of withTempFileWithin with well-typed -- Paths. withTempFileWithin :: (MonadUnliftAction m, MonadThrow m) => Path b Dir -> (Path Rel File -> m a) -> m a -- | Unlifted version of withTempDirWithin with well-typed -- Paths. withTempDirWithin :: (MonadUnliftAction m, MonadThrow m) => Path b Dir -> (Path Rel Dir -> m a) -> m a