| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Distribution.Simple.SetupHooks.Rule
Description
Internal module that defines fine-grained rules for setup hooks.
Users should import SetupHooks instead.
Synopsis
- type Rule = RuleData 'User
- data RuleData (scope :: Scope) = Rule {
- ruleCommands :: !(RuleCmds scope)
- staticDependencies :: ![Dependency]
- results :: !(NonEmpty Location)
- data RuleId = RuleId {
- ruleNameSpace :: !RulesNameSpace
- ruleName :: !ShortText
- staticRule :: Typeable arg => Command arg (IO ()) -> [Dependency] -> NonEmpty Location -> Rule
- dynamicRule :: (Typeable depsArg, Typeable depsRes, Typeable arg) => StaticPtr (Dict (Binary depsRes, Show depsRes, Eq depsRes)) -> Command depsArg (IO ([Dependency], depsRes)) -> Command arg (depsRes -> IO ()) -> [Dependency] -> NonEmpty Location -> Rule
- data RuleCommands (scope :: Scope) (deps :: Scope -> Type -> Type -> Type) (ruleCmd :: Scope -> Type -> Type -> Type) where
- StaticRuleCommand :: forall arg (deps :: Scope -> Type -> Type -> Type) (ruleCmd :: Scope -> Type -> Type -> Type) (scope :: Scope). If (scope == 'System) (arg ~ ByteString) () => {..} -> RuleCommands scope deps ruleCmd
- DynamicRuleCommands :: forall depsArg depsRes arg (deps :: Scope -> Type -> Type -> Type) (ruleCmd :: Scope -> Type -> Type -> Type) (scope :: Scope). If (scope == 'System) (depsArg ~ ByteString, depsRes ~ ByteString, arg ~ ByteString) () => {..} -> RuleCommands scope deps ruleCmd
- type Command = CommandData 'User
- data CommandData (scope :: Scope) arg res = Command {}
- runCommand :: Command args res -> res
- mkCommand :: StaticPtr (Dict (Binary arg, Show arg)) -> StaticPtr (arg -> res) -> arg -> Command arg res
- data Dict c where
- type RuleCmds (scope :: Scope) = RuleCommands scope DynDepsCmd CommandData
- type RuleDynDepsCmd (scope :: Scope) = RuleCommands scope DynDepsCmd (NoCmd :: Scope -> Type -> Type -> Type)
- type RuleExecCmd (scope :: Scope) = RuleCommands scope (DepsRes :: Scope -> Type -> Type -> Type) CommandData
- newtype DynDepsCmd (scope :: Scope) depsArg depsRes = DynDepsCmd {
- dynDepsCmd :: CommandData scope depsArg (IO ([Dependency], depsRes))
- newtype DepsRes (scope :: Scope) (depsArg :: k) depsRes = DepsRes {
- depsRes :: ScopedArgument scope depsRes
- ruleDepsCmd :: RuleCmds scope -> RuleDynDepsCmd scope
- runRuleDynDepsCmd :: RuleDynDepsCmd 'User -> Maybe (IO ([Dependency], ByteString))
- ruleExecCmd :: SScope scope -> RuleCmds scope -> Maybe ByteString -> RuleExecCmd scope
- runRuleExecCmd :: RuleExecCmd 'User -> IO ()
- newtype Rules env = Rules {}
- data Dependency
- data RuleOutput = RuleOutput {
- outputOfRule :: !RuleId
- outputIndex :: !Word
- rules :: StaticPtr label -> (env -> RulesM ()) -> Rules env
- noRules :: RulesM ()
- data Location where
- location :: Location -> SymbolicPath Pkg 'File
- data MonitorFilePath
- data MonitorKindFile
- data MonitorKindDir
- type RulesM a = RulesT IO a
- newtype RulesT (m :: Type -> Type) a = RulesT {}
- data RulesEnv = RulesEnv {
- rulesEnvVerbosity :: !Verbosity
- rulesEnvNameSpace :: !RulesNameSpace
- computeRules :: Verbosity -> env -> Rules env -> IO (Map RuleId Rule, [MonitorFilePath])
- data Scope
- data SScope (scope :: Scope) where
- data family Static (scope :: Scope) :: Type -> Type
- type RuleBinary = RuleData 'System
- ruleBinary :: Rule -> RuleBinary
Rules
Rule
data RuleData (scope :: Scope) Source #
A rule consists of:
- an action to run to execute the rule,
- a description of the rule inputs and outputs.
Use staticRule or dynamicRule to construct a rule, overriding specific
fields, rather than directly using the Rule constructor.
Constructors
| Rule | Please use the |
Fields
| |
Instances
A unique identifier for a Rule.
Constructors
| RuleId | |
Fields
| |
Instances
| Structured RuleId Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| Binary RuleId Source # | |
| Eq RuleId Source # | |
| Ord RuleId Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| Generic RuleId Source # | |
| Show RuleId Source # | |
| type Rep RuleId Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
Arguments
| :: Typeable arg | |
| => Command arg (IO ()) | command to execute the rule |
| -> [Dependency] | static dependencies of the rule |
| -> NonEmpty Location | rule results |
| -> Rule |
A rule with static dependencies.
Prefer using this smart constructor instead of Rule whenever possible.
See also dynamicRule which adds support for dynamic dependencies.
Arguments
| :: (Typeable depsArg, Typeable depsRes, Typeable arg) | |
| => StaticPtr (Dict (Binary depsRes, Show depsRes, Eq depsRes)) | evidence that the result of the dynamic dependency command is serialisable |
| -> Command depsArg (IO ([Dependency], depsRes)) | dynamic dependency computation, returning dynamic dependencies and an additional piece of data to be consumed by the main rule command |
| -> Command arg (depsRes -> IO ()) | main rule command; takes in the piece of data returned by the dyn-deps command |
| -> [Dependency] | static dependencies of the rule |
| -> NonEmpty Location | rule results |
| -> Rule |
A rule with dynamic dependencies, which consists of two parts:
- a dynamic dependency computation, that returns additional edges to be added to the build graph, together with an additional piece of data,
- the command to execute the rule itself, which receives the additional piece of data returned by the dependency computation.
Prefer using this smart constructor instead of Rule whenever possible.
Use staticRule if you do not have any dynamic dependencies.
Commands
data RuleCommands (scope :: Scope) (deps :: Scope -> Type -> Type -> Type) (ruleCmd :: Scope -> Type -> Type -> Type) where Source #
Commands to execute a rule:
- for a rule with static dependencies, a single command,
- for a rule with dynamic dependencies, a command for computing dynamic dependencies, and a command for executing the rule.
Prefer using staticRule and dynamicRule instead of the (internal)
constructors of RuleCommands.
Constructors
| StaticRuleCommand | A rule with statically-known dependencies. |
Fields
| |
| DynamicRuleCommands | |
Fields
| |
Instances
| (Typeable scope, Typeable ruleCmd, Typeable deps) => Structured (RuleCommands scope deps ruleCmd) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule Methods structure :: Proxy (RuleCommands scope deps ruleCmd) -> Structure Source # structureHash' :: Tagged (RuleCommands scope deps ruleCmd) MD5 | |
| (forall res. Binary (ruleCmd 'System ByteString res), Binary (deps 'System ByteString ByteString)) => Binary (RuleCommands 'System deps ruleCmd) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| (forall arg res. Binary (ruleCmd 'User arg res), forall depsArg depsRes. Binary depsRes => Binary (deps 'User depsArg depsRes)) => Binary (RuleCommands 'User deps ruleCmd) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| (forall res. Eq (ruleCmd 'System ByteString res), Eq (deps 'System ByteString ByteString)) => Eq (RuleCommands 'System deps ruleCmd) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule Methods (==) :: RuleCommands 'System deps ruleCmd -> RuleCommands 'System deps ruleCmd -> Bool Source # (/=) :: RuleCommands 'System deps ruleCmd -> RuleCommands 'System deps ruleCmd -> Bool Source # | |
| (forall arg res. Eq (ruleCmd 'User arg res), forall depsArg depsRes. Eq depsRes => Eq (deps 'User depsArg depsRes)) => Eq (RuleCommands 'User deps ruleCmd) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule Methods (==) :: RuleCommands 'User deps ruleCmd -> RuleCommands 'User deps ruleCmd -> Bool Source # (/=) :: RuleCommands 'User deps ruleCmd -> RuleCommands 'User deps ruleCmd -> Bool Source # | |
| (forall arg res. Show (ruleCmd 'User arg res), forall depsArg depsRes. Show depsRes => Show (deps 'User depsArg depsRes)) => Show (RuleCommands 'User deps ruleCmd) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
type Command = CommandData 'User Source #
A command consists of a statically-known action together with a (possibly dynamic) argument to that action.
For example, the action can consist of running an executable
(such as happy or c2hs), while the argument consists of the variable
component of the command, e.g. the specific file to run happy on.
data CommandData (scope :: Scope) arg res Source #
Internal datatype used for commands, both for the Hooks API (Command)
and for the build system.
Constructors
| Command | |
Fields
| |
Instances
| arg ~ ByteString => Binary (CommandData 'System arg res) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| Binary (CommandData 'User arg res) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| arg ~ ByteString => Eq (CommandData 'System arg res) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule Methods (==) :: CommandData 'System arg res -> CommandData 'System arg res -> Bool Source # (/=) :: CommandData 'System arg res -> CommandData 'System arg res -> Bool Source # | |
| Eq (CommandData 'User arg res) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule Methods (==) :: CommandData 'User arg res -> CommandData 'User arg res -> Bool Source # (/=) :: CommandData 'User arg res -> CommandData 'User arg res -> Bool Source # | |
| Show (CommandData 'User arg res) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
runCommand :: Command args res -> res Source #
Run a Command.
mkCommand :: StaticPtr (Dict (Binary arg, Show arg)) -> StaticPtr (arg -> res) -> arg -> Command arg res Source #
Construct a command.
Prefer using this smart constructor instead of Command whenever possible.
A wrapper used to pass evidence of a constraint as an explicit value.
Helpers for executing commands
type RuleCmds (scope :: Scope) = RuleCommands scope DynDepsCmd CommandData Source #
Both the rule command and the (optional) dynamic dependency command.
type RuleDynDepsCmd (scope :: Scope) = RuleCommands scope DynDepsCmd (NoCmd :: Scope -> Type -> Type -> Type) Source #
Only the (optional) dynamic dependency command.
type RuleExecCmd (scope :: Scope) = RuleCommands scope (DepsRes :: Scope -> Type -> Type -> Type) CommandData Source #
The rule command together with the result of the (optional) dynamic dependency computation.
newtype DynDepsCmd (scope :: Scope) depsArg depsRes Source #
A dynamic dependency command.
Constructors
| DynDepsCmd | |
Fields
| |
Instances
| (arg ~ ByteString, depsRes ~ ByteString) => Binary (DynDepsCmd 'System arg depsRes) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| Binary (DynDepsCmd 'User depsArg depsRes) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| (arg ~ ByteString, depsRes ~ ByteString) => Eq (DynDepsCmd 'System arg depsRes) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule Methods (==) :: DynDepsCmd 'System arg depsRes -> DynDepsCmd 'System arg depsRes -> Bool Source # (/=) :: DynDepsCmd 'System arg depsRes -> DynDepsCmd 'System arg depsRes -> Bool Source # | |
| Eq (DynDepsCmd 'User depsArg depsRes) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule Methods (==) :: DynDepsCmd 'User depsArg depsRes -> DynDepsCmd 'User depsArg depsRes -> Bool Source # (/=) :: DynDepsCmd 'User depsArg depsRes -> DynDepsCmd 'User depsArg depsRes -> Bool Source # | |
| Show (DynDepsCmd 'User depsArg depsRes) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
newtype DepsRes (scope :: Scope) (depsArg :: k) depsRes Source #
The result of a dynamic dependency computation.
Instances
| Binary (ScopedArgument scope depsRes) => Binary (DepsRes scope depsArg depsRes) Source # | |
| Eq depsRes => Eq (DepsRes scope depsArg depsRes) Source # | |
| Ord depsRes => Ord (DepsRes scope depsArg depsRes) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule Methods compare :: DepsRes scope depsArg depsRes -> DepsRes scope depsArg depsRes -> Ordering Source # (<) :: DepsRes scope depsArg depsRes -> DepsRes scope depsArg depsRes -> Bool Source # (<=) :: DepsRes scope depsArg depsRes -> DepsRes scope depsArg depsRes -> Bool Source # (>) :: DepsRes scope depsArg depsRes -> DepsRes scope depsArg depsRes -> Bool Source # (>=) :: DepsRes scope depsArg depsRes -> DepsRes scope depsArg depsRes -> Bool Source # max :: DepsRes scope depsArg depsRes -> DepsRes scope depsArg depsRes -> DepsRes scope depsArg depsRes Source # min :: DepsRes scope depsArg depsRes -> DepsRes scope depsArg depsRes -> DepsRes scope depsArg depsRes Source # | |
| Show depsRes => Show (DepsRes scope depsArg depsRes) Source # | |
ruleDepsCmd :: RuleCmds scope -> RuleDynDepsCmd scope Source #
Project out the (optional) dependency computation command, so that it can be serialised without serialising anything else.
runRuleDynDepsCmd :: RuleDynDepsCmd 'User -> Maybe (IO ([Dependency], ByteString)) Source #
Obtain the (optional) IO action that computes dynamic dependencies.
ruleExecCmd :: SScope scope -> RuleCmds scope -> Maybe ByteString -> RuleExecCmd scope Source #
Project out the command for running the rule, passing in the result of the dependency computation if there was one.
runRuleExecCmd :: RuleExecCmd 'User -> IO () Source #
Obtain the IO action that executes a rule.
Collections of rules
A collection of Rules.
Use the rules smart constructor instead of directly using the Rules
constructor.
- Rules are registered using
registerRule, - Monitored files or directories are declared using
addRuleMonitors; a change in these will trigger the recomputation of all rules.
The env type parameter represents an extra argument, which usually
consists of information known to Cabal such as LocalBuildInfo and
ComponentLocalBuildInfo.
data Dependency Source #
A dependency of a rule.
Constructors
| RuleDependency !RuleOutput | A dependency on an output of another rule. |
| FileDependency !Location | A direct dependency on a file at a particular location on disk. This should not be used for files that are generated by other rules;
use |
Instances
| Structured Dependency Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule | |||||
| Binary Dependency Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule Methods put :: Dependency -> Put Source # get :: Get Dependency Source # putList :: [Dependency] -> Put Source # | |||||
| Eq Dependency Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule Methods (==) :: Dependency -> Dependency -> Bool Source # (/=) :: Dependency -> Dependency -> Bool Source # | |||||
| Ord Dependency Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule Methods compare :: Dependency -> Dependency -> Ordering Source # (<) :: Dependency -> Dependency -> Bool Source # (<=) :: Dependency -> Dependency -> Bool Source # (>) :: Dependency -> Dependency -> Bool Source # (>=) :: Dependency -> Dependency -> Bool Source # max :: Dependency -> Dependency -> Dependency Source # min :: Dependency -> Dependency -> Dependency Source # | |||||
| Generic Dependency Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule Associated Types
| |||||
| Show Dependency Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule | |||||
| type Rep Dependency Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule type Rep Dependency = D1 ('MetaData "Dependency" "Distribution.Simple.SetupHooks.Rule" "Cabal-3.18.1.0-d405" 'False) (C1 ('MetaCons "RuleDependency" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RuleOutput)) :+: C1 ('MetaCons "FileDependency" 'PrefixI 'False) (S1 ('MetaSel ('Nothing :: Maybe Symbol) 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Location))) | |||||
data RuleOutput Source #
A reference to an output of another rule.
Constructors
| RuleOutput | |
Fields
| |
Instances
| Structured RuleOutput Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule | |||||
| Binary RuleOutput Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule Methods put :: RuleOutput -> Put Source # get :: Get RuleOutput Source # putList :: [RuleOutput] -> Put Source # | |||||
| Eq RuleOutput Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule Methods (==) :: RuleOutput -> RuleOutput -> Bool Source # (/=) :: RuleOutput -> RuleOutput -> Bool Source # | |||||
| Ord RuleOutput Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule Methods compare :: RuleOutput -> RuleOutput -> Ordering Source # (<) :: RuleOutput -> RuleOutput -> Bool Source # (<=) :: RuleOutput -> RuleOutput -> Bool Source # (>) :: RuleOutput -> RuleOutput -> Bool Source # (>=) :: RuleOutput -> RuleOutput -> Bool Source # max :: RuleOutput -> RuleOutput -> RuleOutput Source # min :: RuleOutput -> RuleOutput -> RuleOutput Source # | |||||
| Generic RuleOutput Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule Associated Types
| |||||
| Show RuleOutput Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule | |||||
| type Rep RuleOutput Source # | |||||
Defined in Distribution.Simple.SetupHooks.Rule type Rep RuleOutput = D1 ('MetaData "RuleOutput" "Distribution.Simple.SetupHooks.Rule" "Cabal-3.18.1.0-d405" 'False) (C1 ('MetaCons "RuleOutput" 'PrefixI 'True) (S1 ('MetaSel ('Just "outputOfRule") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RuleId) :*: S1 ('MetaSel ('Just "outputIndex") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 Word))) | |||||
Arguments
| :: StaticPtr label | unique label for this collection of rules |
| -> (env -> RulesM ()) | the computation of rules |
| -> Rules env |
Construct a collection of rules with a given label.
A label for the rules can be constructed using the static keyword,
using the StaticPointers extension.
NB: separate calls to rules should have different labels.
Example usage:
myRules :: Rules env
myRules = rules (static ()) $ \ env -> do { .. } -- use the monadic API hereRule inputs/outputs
A (fully resolved) location of a dependency or result of a rule, consisting of a base directory and of a file path relative to that base directory path.
In practice, this will be something like ,
where:Location dir (moduleNameSymbolicPath mod . "hs")
- for a file dependency,
diris one of the Cabal search directories, - for an output,
diris a directory such asautogenComponentModulesDirorcomponentBuildDir.
Constructors
| Location | |
Fields
| |
Instances
| Structured Location Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| Binary Location Source # | |
| Eq Location Source # | |
| Ord Location Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| Show Location Source # | |
location :: Location -> SymbolicPath Pkg 'File Source #
Get a (relative or absolute) un-interpreted path to a Location.
File/directory monitoring
data MonitorFilePath Source #
A description of a file (or set of files) to monitor for changes.
Where file paths are relative they are relative to a common directory (e.g. project root), not necessarily the process current directory.
Constructors
| MonitorFile | |
Fields | |
| MonitorFileGlob | |
Fields | |
Instances
| Structured MonitorFilePath Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods structure :: Proxy MonitorFilePath -> Structure Source # structureHash' :: Tagged MonitorFilePath MD5 | |||||
| Binary MonitorFilePath Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods put :: MonitorFilePath -> Put Source # get :: Get MonitorFilePath Source # putList :: [MonitorFilePath] -> Put Source # | |||||
| Eq MonitorFilePath Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods (==) :: MonitorFilePath -> MonitorFilePath -> Bool Source # (/=) :: MonitorFilePath -> MonitorFilePath -> Bool Source # | |||||
| Generic MonitorFilePath Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Associated Types
Methods from :: MonitorFilePath -> Rep MonitorFilePath x Source # to :: Rep MonitorFilePath x -> MonitorFilePath Source # | |||||
| Show MonitorFilePath Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types | |||||
| type Rep MonitorFilePath Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types type Rep MonitorFilePath = D1 ('MetaData "MonitorFilePath" "Distribution.Simple.FileMonitor.Types" "Cabal-3.18.1.0-d405" 'False) (C1 ('MetaCons "MonitorFile" 'PrefixI 'True) (S1 ('MetaSel ('Just "monitorKindFile") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindFile) :*: (S1 ('MetaSel ('Just "monitorKindDir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindDir) :*: S1 ('MetaSel ('Just "monitorPath") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 FilePath))) :+: C1 ('MetaCons "MonitorFileGlob" 'PrefixI 'True) (S1 ('MetaSel ('Just "monitorKindFile") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindFile) :*: (S1 ('MetaSel ('Just "monitorKindDir") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 MonitorKindDir) :*: S1 ('MetaSel ('Just "monitorPathGlob") 'NoSourceUnpackedness 'SourceStrict 'DecidedStrict) (Rec0 RootedGlob)))) | |||||
data MonitorKindFile Source #
Constructors
| FileExists | |
| FileModTime | |
| FileHashed | |
| FileNotExists |
Instances
| Structured MonitorKindFile Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods structure :: Proxy MonitorKindFile -> Structure Source # structureHash' :: Tagged MonitorKindFile MD5 | |||||
| Binary MonitorKindFile Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods put :: MonitorKindFile -> Put Source # get :: Get MonitorKindFile Source # putList :: [MonitorKindFile] -> Put Source # | |||||
| Eq MonitorKindFile Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods (==) :: MonitorKindFile -> MonitorKindFile -> Bool Source # (/=) :: MonitorKindFile -> MonitorKindFile -> Bool Source # | |||||
| Generic MonitorKindFile Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Associated Types
Methods from :: MonitorKindFile -> Rep MonitorKindFile x Source # to :: Rep MonitorKindFile x -> MonitorKindFile Source # | |||||
| Show MonitorKindFile Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types | |||||
| type Rep MonitorKindFile Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types type Rep MonitorKindFile = D1 ('MetaData "MonitorKindFile" "Distribution.Simple.FileMonitor.Types" "Cabal-3.18.1.0-d405" 'False) ((C1 ('MetaCons "FileExists" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FileModTime" 'PrefixI 'False) (U1 :: Type -> Type)) :+: (C1 ('MetaCons "FileHashed" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "FileNotExists" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
data MonitorKindDir Source #
Constructors
| DirExists | |
| DirModTime | |
| DirNotExists |
Instances
| Structured MonitorKindDir Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods structure :: Proxy MonitorKindDir -> Structure Source # structureHash' :: Tagged MonitorKindDir MD5 | |||||
| Binary MonitorKindDir Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods put :: MonitorKindDir -> Put Source # get :: Get MonitorKindDir Source # putList :: [MonitorKindDir] -> Put Source # | |||||
| Eq MonitorKindDir Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Methods (==) :: MonitorKindDir -> MonitorKindDir -> Bool Source # (/=) :: MonitorKindDir -> MonitorKindDir -> Bool Source # | |||||
| Generic MonitorKindDir Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types Associated Types
Methods from :: MonitorKindDir -> Rep MonitorKindDir x Source # to :: Rep MonitorKindDir x -> MonitorKindDir Source # | |||||
| Show MonitorKindDir Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types | |||||
| type Rep MonitorKindDir Source # | |||||
Defined in Distribution.Simple.FileMonitor.Types type Rep MonitorKindDir = D1 ('MetaData "MonitorKindDir" "Distribution.Simple.FileMonitor.Types" "Cabal-3.18.1.0-d405" 'False) (C1 ('MetaCons "DirExists" 'PrefixI 'False) (U1 :: Type -> Type) :+: (C1 ('MetaCons "DirModTime" 'PrefixI 'False) (U1 :: Type -> Type) :+: C1 ('MetaCons "DirNotExists" 'PrefixI 'False) (U1 :: Type -> Type))) | |||||
Monadic API for generation of ActionId
newtype RulesT (m :: Type -> Type) a Source #
Monad transformer for defining rules. Usually wraps the IO monad,
allowing IO actions to be performed using liftIO.
Constructors
| RulesT | |
The environment within the monadic API.
Constructors
| RulesEnv | |
Fields
| |
computeRules :: Verbosity -> env -> Rules env -> IO (Map RuleId Rule, [MonitorFilePath]) Source #
Internals
data family Static (scope :: Scope) :: Type -> Type Source #
A static pointer (in user scope) or its key (in system scope).
Instances
| Binary (Static 'System fnTy) Source # | |
| Binary (Static 'User fnTy) Source # | |
| Eq (Static 'System fnTy) Source # | |
| Eq (Static 'User fnTy) Source # | |
| Ord (Static 'System fnTy) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule Methods compare :: Static 'System fnTy -> Static 'System fnTy -> Ordering Source # (<) :: Static 'System fnTy -> Static 'System fnTy -> Bool Source # (<=) :: Static 'System fnTy -> Static 'System fnTy -> Bool Source # (>) :: Static 'System fnTy -> Static 'System fnTy -> Bool Source # (>=) :: Static 'System fnTy -> Static 'System fnTy -> Bool Source # max :: Static 'System fnTy -> Static 'System fnTy -> Static 'System fnTy Source # min :: Static 'System fnTy -> Static 'System fnTy -> Static 'System fnTy Source # | |
| Ord (Static 'User fnTy) Source # | |
Defined in Distribution.Simple.SetupHooks.Rule Methods compare :: Static 'User fnTy -> Static 'User fnTy -> Ordering Source # (<) :: Static 'User fnTy -> Static 'User fnTy -> Bool Source # (<=) :: Static 'User fnTy -> Static 'User fnTy -> Bool Source # (>) :: Static 'User fnTy -> Static 'User fnTy -> Bool Source # (>=) :: Static 'User fnTy -> Static 'User fnTy -> Bool Source # max :: Static 'User fnTy -> Static 'User fnTy -> Static 'User fnTy Source # min :: Static 'User fnTy -> Static 'User fnTy -> Static 'User fnTy Source # | |
| Show (Static 'System fnTy) Source # | |
| Show (Static 'User fnTy) Source # | |
| newtype Static 'System fnTy Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
| newtype Static 'User fnTy Source # | |
Defined in Distribution.Simple.SetupHooks.Rule | |
type RuleBinary = RuleData 'System Source #
ruleBinary :: Rule -> RuleBinary Source #