I was experiencing unnecessary rebuilds while using this matching pattern:
getDirectoryFiles "" $ "foo" </> "//*.c"
I'm on Linux so from my understanding the second argument will evaluate to
"foo///*.c"
and I presume that it would be incorrect to replace this with
"foo" </> "/*.c"
as that would not work on windows? On Linux however this works as I expect it to.
From testing I concluded that the pattern matched files outside of "foo" which makes no sense in my world. As an example the pattern above would match both testA.c and testB.c in a directory structure like the one below.
foo/testA.c
bar/testB.c
I see now that there is a <//>
operator, so maybe I should be using "foo" <//> "*.c"
instead but still. This was quite nasty to find and what does "foo///*.c"
actually do?