Safe Haskell | Safe-Inferred |
---|
Synopsis
- enableDefines :: FilePath -> [String] -> [String] -> IO ()
- includesOf :: Generated -> [FilePath] -> FilePath -> Shake.Action ([FilePath], [FilePath])
- transitiveIncludesOf :: Generated -> [FilePath] -> FilePath -> Shake.Action ([FilePath], [FilePath])
Documentation
enableDefines :: FilePath -> [String] -> [String] -> IO () Source #
Rewrite a file, switching #define
s to #undef
s and vice versa.
:: 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.
:: 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.need
s the intermediate files.