Hi Sergey,
If it's useful I'd certainly accept a patch - I think the withArgs
trick is effective, but quite hacky.
Unfortunately I can't think of a good API, but perhaps:
shakeArgsPruneAlways :: ShakeOptions -> ([FilePath] -> IO ()) ->
[OptDescr (Either String a)] -> ([a] -> [String] -> IO (Maybe (Rules
()))) -> IO ()
Which is like shakeArgsPruneWith, but doesn't add the new flag, just
always assumes its set.
I also note that following Development.Shake.Database at
https://hackage.haskell.org/package/shake-0.18.3/docs/Development-Shake-Database.html
the prune stuff could now be implemented without temporary files using
shakeLiveFilesDatabase, but that might be a much bigger refactoring.
Thanks, Neil