HORIZON HASKELLDocslts/ghc-9.10.xc74966e2026-09-27Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · c74966e · 2026-09-27

Moduleshake-0.19.8Haskell2010

Development.Shake.Database

Lower-level primitives to drive Shake, which are wrapped into the shake function. Useful if you want to perform multiple Shake runs in a row without reloading from the database. Sometimes used in conjunction with shakeFiles="/dev/null". Using these functions you can approximate the shake experience with:

shake opts rules = do
    (_, after) <- shakeWithDatabase opts rules $ \db -> do
        shakeOneShotDatabase db
        shakeRunDatabase db []
    shakeRunAfter opts after
  • 1 type
  • 8 values
  • Packageshake-0.19.8
  • Exports9
  • LanguageHaskell2010
  • LicenceBSD-3-Clause
  • SourceDatabase.hs

Given some options and rules, return a pair. The first component opens the database, the second cleans it up. The creation does not need to be run masked, because the cleanup is able to run at any point. Most users should prefer shakeWithDatabase which handles exceptions duration creation properly.

Given a ShakeDatabase, what files did the execution reach an error on last time. Some special considerations when using this function:

  • The presence of an error does not mean the build will fail, specifically if a previously required dependency was run and raised an error, then the thing that previously required it will be run. If the build system has changed in an untracked manner, the build may succeed this time round.

  • If the previous run actually failed then shakeRunDatabase will have thrown an exception. You probably want to catch that exception so you can make the call to shakeErrorsDatabase.

  • You may see a single failure reported multiple times, with increasingly large call stacks, showing the ways in which the error lead to further errors throughout.

  • The SomeException values are highly likely to be of type ShakeException.

  • If you want as many errors as possible in one run set shakeStaunch=True.