Karya, built on 2018-05-31T02:46:59 (patch 0a1a35479c514820d77330ae8a978975ba22a47a)

Safe HaskellNone

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.