Karya, built on 2023-08-29T07:47:28 (patch 7a412d5d6ba4968ca4155ef276a062ccdeb9109a)
Safe HaskellSafe-Inferred

Shake.CcDeps

Synopsis

Documentation

enableDefines :: FilePath -> [String] -> [String] -> IO () Source #

Rewrite a file, switching #defines to #undefs and vice versa.

includesOf Source #

Arguments

:: Generated 
-> [FilePath] 
-> FilePath 
-> Shake.Action ([FilePath], [FilePath])

(foundIncludes, notFoundIncludes)

Unlike HsDeps.importsOf, I return the not-found paths instead of ignoring them. This is because I assume not-found haskell imports are from external packages, while #include with double-quotes is a sign it should be found locally.

transitiveIncludesOf Source #

Arguments

:: Generated 
-> [FilePath] 
-> FilePath 
-> Shake.Action ([FilePath], [FilePath])

([found], [notFound])

Find files this files includes, transitively. Includes the given file.

Can also be used for .hsc files since it looks for ^#include. There isn't an IO version because it Shake.needs the intermediate files.