importing "in place" and packages
Ashley Yakeley
ashley at semantic.org
Fri Dec 22 05:44:01 EST 2006
I'm compiling the files for package "javavm" with GHC 6.6 (using
"-package-name javavm"). As part of the compilation process, I need a
runnable program that uses the modules I've compiled "in place":
import JVMBoot
But I get this error when compiling my "Main" module (ShowClasses.hs):
ShowClasses.hs:23:1:
Bad interface file: JVMBoot.hi
Something is amiss; requested module main:JVMBoot differs from
name found in the interface file javavm:JVMBoot
Really I want to import javavm:JVMBoot, not main:JVMBoot. I tried this,
but GHC doesn't like it (because it's not Haskell):
import javavm:JVMBoot
I tried compiling ShowClasses.hs with "-package-name javavm". This let
me compile, but then I get this on link:
/usr/bin/ld: Undefined symbols:
_ZCMain_main_closure
___stginit_ZCMain
collect2: ld returned 1 exit status
I tried adding a -main-is in the compile step, but this didn't help.
Is there any way to create a main function that calls files imported "in
place" that are in some package? I have the same issue when writing
tests for my "time" package.
--
Ashley Yakeley
More information about the Glasgow-haskell-users
mailing list