Looks like you just need to add src/main
to hs-source-dirs
for test suit.
Also you can create a library with Methods
module and make both the executable and test suite depend on the library.
There are tons of examples on hackage, e.g. doctest It's test suit "spec" uses hs-source-dirs
and test suit "doctests" uses a library. The first approach allows to test interval functions, that are not exported by the library.