I\'m a Haskell beginner, and I\'m trying to use the dynamic loading in the \'plugins\' package. I\'m kind of lost. Here is a minimal program with two files.
Main.h
You might want to take a look at a similar problem with the GHC-API on haskell ghc dynamic compliation only works on first compile.
I've tried your example under Ubuntu 10.10 with GHC 6.12.1 and the results are: both dynload
and load
with running both complied or through runhaskell
gives me "Prelude.undefined" error, so I think you should report a bug to the developers.
I cannot see any special cases nor conditions in their module's haddock documentation, so I don't think you doing anything wrong.