-- | This oracle stores per-target argument list hashes in the Shake database,
-- allowing the user to track them between builds using 'trackArgsHash' queries.
argsHashOracle :: (ShakeValue c, ShakeValue b) => TrackArgument c b -> Args c b -> Rules ()
argsHashOracle trackArgument args = void $
    addOracle $ \(ArgsHash target) -> do
        argList <- interpret target args
        let trackedArgList = filter (trackArgument target) argList
        return $ hash trackedArgList
argsHashOracle :: (ShakeValue c, ShakeValue b) => TrackArgument c b -> Args c b -> Rules ()
argsHashOracle trackArgument args = void $
    addOracle $ \(ArgsHash target) -> do
        argList <- interpret target args
        let trackedArgList = filter (trackArgument target) argList
        return $ hash trackedArgList
argsHashOracle trackArgument args = void $
    addOracle $ \(ArgsHash target) -> do
        argList <- interpret target args
        let trackedArgList = filter (trackArgument target) argList
        return $ hash trackedArgList