shake-extras-0.1: Extra utilities for shake build systems

Safe HaskellNone

Development.Shake.Imports

Contents

Synopsis

declaring rules for imports

importsRule :: (FilePath -> Bool) -> (FilePath -> Action [FilePath]) -> Rules ()Source

importsRule p searchImports registers a rule for how to look up imports for files matching p.

importsDefaultHaskell :: [FilePath] -> Rules ()Source

Registers a defaultRule for imports in haskell source files (".hs"). Only returns the imported files that are found on disk in one of the directories specified by the first argument.

importsDefaultCpp :: [FilePath] -> Rules ()Source

Registers a defaultRule for imports in C++ source files (".cpp"). Only returns the imported files that are found on disk in one of the directories specified by the first argument.

querying imports

directImports :: FilePath -> Action [FilePath]Source

Searches for imports in a file. Before compiling, you still have to need the imports.

transitiveImports :: FilePath -> Action [FilePath]Source

Searches for transitive imports in a file. This might be useful for linking.