{"action":"created","issue":{"url":"https://api.github.com/repos/sol/doctest/issues/127","repository_url":"https://api.github.com/repos/sol/doctest","labels_url":"https://api.github.com/repos/sol/doctest/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/sol/doctest/issues/127/comments","events_url":"https://api.github.com/repos/sol/doctest/issues/127/events","html_url":"https://github.com/sol/doctest/issues/127","id":131398783,"number":127,"title":"Can't find module Paths_BNFC when using --run-tests","user":{"login":"gdetrez","id":38019,"avatar_url":"https://avatars.githubusercontent.com/u/38019?v=3","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2016-02-04T16:22:41Z","updated_at":"2016-02-13T19:06:45Z","closed_at":null,"body":"I use doctest in a test-suite, set-up in cabal like this:\r\n```cabal\r\nTest-suite bnfc-doctests\r\n    type:           exitcode-stdio-1.0\r\n    ghc-options:    -threaded\r\n    main-is:        doctests.hs\r\n    build-depends:  base, doctest >= 0.8\r\n    HS-source-dirs: test src\r\n```\r\nI added `-idist/build/autogen` to doctest so I can run the test using `cabal test` without problem but if I create a sdist package and try to install it with `cabal install --run-tests`, I get the following issue:\r\n```\r\nsrc/Main.hs:46:8:\r\n    Could not find module ‘Paths_BNFC’\r\n    Use -v to see a list of the files searched for.\r\n```\r\nI tried adding `Other-modules Paths_BNFC` but it doesn't help.\r\nIs there a way to make it work?"},"comment":{"url":"https://api.github.com/repos/sol/doctest/issues/comments/183727146","html_url":"https://github.com/sol/doctest/issues/127#issuecomment-183727146","issue_url":"https://api.github.com/repos/sol/doctest/issues/127","id":183727146,"user":{"login":"gdetrez","id":38019,"avatar_url":"https://avatars.githubusercontent.com/u/38019?v=3","gravatar_id":"","url":"https://api.github.com/users/gdetrez","html_url":"https://github.com/gdetrez","followers_url":"https://api.github.com/users/gdetrez/followers","following_url":"https://api.github.com/users/gdetrez/following{/other_user}","gists_url":"https://api.github.com/users/gdetrez/gists{/gist_id}","starred_url":"https://api.github.com/users/gdetrez/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/gdetrez/subscriptions","organizations_url":"https://api.github.com/users/gdetrez/orgs","repos_url":"https://api.github.com/users/gdetrez/repos","events_url":"https://api.github.com/users/gdetrez/events{/privacy}","received_events_url":"https://api.github.com/users/gdetrez/received_events","type":"User","site_admin":false},"created_at":"2016-02-13T19:06:45Z","updated_at":"2016-02-13T19:06:45Z","body":"Here it is [foo-0.1.0.0.tar.gz.zip](https://github.com/sol/doctest/files/129343/foo-0.1.0.0.tar.gz.zip) (zipped because github...). If I extract the attached package and then run `cabal test` in in, it  works fine. (It even works if I omit the `-idist/build/autogen`).\r\n\r\nBut if I try to do `cabal install --run-tests foo-0.1.0.0.tar.gz` (I used a sandbox) then it prints the following error:\r\n\r\n```\r\nTest suite bnfc-doctests: RUNNING...\r\n\r\nmain.hs:2:8:\r\n    Could not find module ‘Paths_foo’\r\n    Use -v to see a list of the files searched for.\r\nTest suite bnfc-doctests: FAIL\r\nTest suite logged to:\r\ndist/dist-sandbox-160c6e72/test/foo-0.1.0.0-bnfc-doctests.log\r\n0 of 1 test suites (0 of 1 test cases) passed.\r\ncabal: Error: some packages failed to install:\r\nfoo-0.1.0.0 failed during the tests phase. The exception was:\r\nExitFailure 1\r\n```\r\n\r\n"}}