| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Development.IDE.Graph
Synopsis
- shakeOptions :: ShakeOptions
- data Rules a
- data Action a
- action :: Action a -> Rules ()
- actionFinally :: Action a -> IO b -> Action a
- actionBracket :: IO a -> (a -> IO b) -> (a -> Action c) -> Action c
- actionCatch :: Exception e => Action a -> (e -> Action a) -> Action a
- data ShakeException = ShakeException {}
- data ShakeOptions
- getShakeExtra :: Typeable a => Action (Maybe a)
- getShakeExtraRules :: Typeable a => Rules (Maybe a)
- newShakeExtra :: Typeable a => a -> Maybe Dynamic
- parallel :: [Action a] -> Action [a]
- type ShakeValue a = (Show a, Typeable a, Eq a, Hashable a, Binary a, NFData a)
- type family RuleResult key
- alwaysRerun :: Action ()
- reschedule :: Double -> Action ()
Documentation
Instances
data ShakeException #
Error representing all expected exceptions thrown by Shake. Problems when executing rules will be raising using this exception type.
Constructors
| ShakeException | |
Fields
| |
Instances
| Show ShakeException | |
Defined in Development.Shake.Internal.Errors Methods showsPrec :: Int -> ShakeException -> ShowS # show :: ShakeException -> String # showList :: [ShakeException] -> ShowS # | |
| Exception ShakeException | |
Defined in Development.Shake.Internal.Errors Methods toException :: ShakeException -> SomeException # | |
Configuration
data ShakeOptions Source #
Explicit parallelism
Oracle rules
type ShakeValue a = (Show a, Typeable a, Eq a, Hashable a, Binary a, NFData a) #
Define an alias for the six type classes required for things involved in Shake rules.
Using this alias requires the ConstraintKinds extension.
To define your own values meeting the necessary constraints it is convenient to use the extensions
GeneralizedNewtypeDeriving and DeriveDataTypeable to write:
newtype MyType = MyType (String, Bool) deriving (Show, Typeable, Eq, Hashable, Binary, NFData)
Shake needs these instances on keys and values. They are used for:
Showis used to print out keys in errors, profiling, progress messages and diagnostics.Typeableis used because Shake indexes its database by the type of the key and value involved in the rule (overlap is not allowed for type classes and not allowed in Shake either).EqandHashableare used on keys in order to build hash maps from keys to values.Eqis used on values to test if the value has changed or not (this is used to support unchanging rebuilds, where Shake can avoid rerunning rules if it runs a dependency, but it turns out that no changes occurred.) TheHashableinstances are only use at runtime (never serialised to disk), so they do not have to be stable across runs. Hashable on values is not used, and only required for a consistent interface.Binaryis used to serialize keys and values into Shake's build database; this lets Shake cache values across runs and implement unchanging rebuilds.NFDatais used to avoid space and thunk leaks, especially when Shake is parallelized.
type family RuleResult key #
The type mapping between the key or a rule and the resulting value.
See addBuiltinRule and apply.
Instances
| type RuleResult AlwaysRerunQ | |
Defined in Development.Shake.Internal.Rules.Rerun type RuleResult AlwaysRerunQ = () | |
Special rules
alwaysRerun :: Action () Source #
Batching
reschedule :: Double -> Action () Source #