LoadAllTargets not loading dependencies

Sam Halliday sam.halliday at gmail.com
Wed Aug 7 19:39:18 UTC 2019


Hello all,

I've been following along with Stephen Diehl's blog series on the ghc
api and I am using `load LoadAllTargets` on a .hs file (let's call it
Wibble.hs) and then typechecking.

All seems well until I add a second module (let's call it Wobble.hs) in
the same package and import it from Wibble.

I can see that the load has correctly calculated the dependency graph
and includes Wobble in the dependencies of Wibble. But if I try to
typecheck Wibble, then I get an error:

    Could not find module ‘Wobble’
    Use -v to see a list of the files searched for.
  |
4 | import           Wobble
  | ^^^^^^^^^^^^^^^^^^^^^^^

I have separately compiled the package, and can see its packagedb is
listed in the .ghc.env file. What else do I need to do so that Wibble
can see Wobble?

-- 
Best regards,
Sam
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 194 bytes
Desc: not available
URL: <http://mail.haskell.org/pipermail/ghc-devs/attachments/20190807/55d4fe37/attachment.sig>


More information about the ghc-devs mailing list