Open soenkehahn opened 9 years ago
This happens because -f
is also a valid hspec
argument. I think you can disambiguate this by putting a --
at the back, or moving the flag before the module. Say
cabal exec -- sensei-web test/Spec.hs -fdefer-typed-holes --
or
cabal exec -- sensei-web -fdefer-typed-holes test/Spec.hs
should work.
Not sure what else we should do here, but at the very least we want a better error message.
I think -fwarn-no-name-shadowing
works correctly though.
I wonder if it would be best to avoid any heuristic and just say that hspec
arguments have to be passed after --
, no exceptions. At least that behaviour would be very easy to understand and unsurprising.
@soenkehahn -fno-warn-name-shadowing
also does not work, just tried.
I think our best bet is still to improve error messages, so that the user better understands what's going on and how he can do what he wants to do.
Here's a script in a branch that demonstrates the bug: https://github.com/soenkehahn/quickcheck-demo/blob/sensei-bug/sensei-bug.sh
The error message is: