Joey | 11 Feb 06:15 2014
Picon

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
transformerszm0zi3zi0zi0_ControlziMonadziTransziError_mapErrorT1_closure
whilst processing object file
/home/joey/.cabal/lib/transformers-0.3.0.0/ghc-7.6.3/HStransformers-0.3.0.0.o
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> haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe

Gmane