When you create a construction site in yesod, it puts the tests in a separate directory as follows:
YourProj/ YourProj/SomeModule.hs YourProj/Handlers/FooHandler.hs ... YourProj/tests/main.hs YourProj/tests/FooTests.hs
So now I want to run ghci and import the code from YourProj/tests/main.hs or YourProj/tests/FooTests.hs for playback. How can I do it? I tried:
cabal-dev ghci > :set -itests > :load tests/TestImport.hs tests/TestImport.hs:15:8: Could not find module `Control.Monad.IO.Class' It is a member of the hidden package `transformers-0.3.0.0'. Perhaps you need to add `transformers' to the build-depends in your .cabal file. Use -v to see a list of the files searched for.
So, although I managed to add a subdirectory, I'm still having problems due to the configuration configuration in the build-depends parameter cache in the cabal file for the test suite.
How do I run cabal-dev ghci and import the code from the tests into Yesod?
source share