[Haskell-cafe] How Plugins works with a Cabal sandbox

Joey jmitdase at gmail.com
Tue Feb 11 05:15:43 UTC 2014


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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20140210/10a9faf3/attachment.html>


More information about the Haskell-Cafe mailing list