Joey | 11 Feb 06:15 2014

How Plugins works with a Cabal sandbox

I was wondering, could somebody talk me through how the Plugins package works with a Cabal sandbox, or Cabal in general?

Basically, I'm writing a program where I want to dynamically load and run user-supplied code. There are two cabal DBs in question: the sandbox which I'm using to build my program, and my "global" sandbox located in /home/user/.cabal.

Which database, if either, does a program I load with System.Plugins.Load.load have access to via "import" statements? How can I avoid double-loading of packages?

In particular, I'm currently getting this error when I try to load my code. Any thoughts?

GHCi runtime linker: fatal error: I found a duplicate definition for symbol
whilst processing object file
This could be caused by:
   * Loading two different object files which export the same symbol
   * Specifying the same object file twice on the GHCi command line
   * An incorrect `package.conf' entry, causing some object to be
     loaded twice.
GHCi cannot safely continue in this situation.  Exiting now.  Sorry.
Haskell-Cafe mailing list
Haskell-Cafe <at>