3

I try to follow the way described in the answer to this question.

I have ExampleModule.o and ExampleModule.hi files in the working directory and I try to load ExampleModule.f function. But I get error message (with verbosity level set to 3):

Failed to load interface for `ExampleModule':
  locations searched:
    ExampleModule.hs
    ExampleModule.lhs

The packageIdString (thisPackage dynflags) is "main".

I suppose that's because I can only load modules from installed packages. Am I right? Is there a way to load a function dynamically from standalone object file, just like load function from plugins does, but with GHC API?

Community
  • 1
  • 1
modular
  • 1,099
  • 9
  • 22

0 Answers0