By: Tom Sydney Kerckhove <syd@cs-syd.eu>
Do not read the discovery entry point as a test file A package's test/Spec.hs is what sydtest-discover generates from, and its module header is written by the preprocessor. It ends in Spec.hs, so the rules about test files were reading it as one, and then reporting that it has no export list. There is nothing in that file for them to read and no way to give it one: the two rules that ask about a test file's exports and its bindings have nothing to ask of it. What a test file is now says so in one place, as a function of the path rather than a field of a context, so it can be asked directly and tested directly. The name is read off the file rather than the whole path, which is what the suffix was reaching for.