[Haskell-cafe] Library Versioning

James Cook mokus at deepbondi.net
Tue Jun 7 18:47:06 CEST 2011

On Jun 7, 2011, at 12:28 PM, Luis Cabellos wrote:

> You can export things from one module that are defined in other  
> modules.  For example:
> > module MyPackage ( version, ... )
> > import Paths_my_package( version )
> > ...
> Yes indeed, but I getting ugly errors (undefined references to  
> version I think) when use Paths_my_package from library, and i don't  
> know a better fix:
>  /home/cabellos/.cabal/lib/skema-server-0.1.0/ghc-6.12.3/libHSskema- 
> server-0.1.0.a(Main.o): In function `r4HU_info':
> (.text+0x3ef9): undefined reference to  
> `skemazmserverzm0zi1zi0_Pathszuskemazuserver_version1_closure'
> /home/cabellos/.cabal/lib/skema-server-0.1.0/ghc-6.12.3/libHSskema- 
> server-0.1.0.a(Main.o): In function `s5TE_info':
> (.text+0x8e03): undefined reference to  
> `__stginit_skemazmserverzm0zi1zi0_Pathszuskemazuserver_'
> Also, I'm using Dyre, It's possible that recompile proccess of dyre  
> cause the error.

Did you tell cabal that Paths_my_package is a part of your library?   
If it is referenced by your code, then it should be listed in either  
"exposed-modules" or "other-modules", otherwise it won't be  
installed.  I've never used dyre so I don't know whether it would  
cause any issues, but I suspect not.

-- James

More information about the Haskell-Cafe mailing list