ghci & TclHaskell

Volker Stolz stolz at
Wed Oct 22 11:07:24 EDT 2003

ghci doesn't automatically pick up libtcl & libtk, although they're in
package.conf.  LD_PRELOADing them works fine [plain ghc works as well].
Is this a feature?
Tracing shows that libt{cl,k} *are* opened. Changing the order in
extra_libraries or moving them to extra_ld_opts doesn't help, either.

> ghci -package TclHaskell
Loading package TclHaskell ... linking ... /usr/local/lib/ghc-6.0.1//HSTclHaskell_cbits.o: unknown symbol `Tcl_AppendResult'
ghc-6.0.1: panic! (the `impossible' happened, GHC version 6.0.1):
        can't load package `TclHaskell'

> LD_PRELOAD=/usr/local/lib/ ghci -package TclHaskell
Loading package TclHaskell ... linking ... done.

[Not that that's any useful, but conclusion about the above might be relevant for
 other packages.
Skipping  Main             ( philos.hs, ./philos.o )
Ok, modules loaded: Main, ConcurrentDebug, CHD_ConcurrentSampleVar, CHD_Label, CHD_ConcurrentQSemN, CHD_ConcurrentQSem, CHD_ConcurrentCVar, CHD_ConcurrentMain, CHD_ConcurrentChannel, CHD_ConcurrentMVar, CHD_DebugMsgChan, CHD_BaseTypes, CHD_BaseFunctions, CHD_GuiConfigWindow, CHD_Enviroment, PriorDoubleChannel.
Prelude Main> main
No compiled code for Tcl

    {name = "TclHaskell",
     auto = False,
     import_dirs = ["/usr/local/lib/ghc-6.0.1/imports/tclhaskell/"],
     source_dirs = [],
     library_dirs = ["/usr/local/lib/ghc-6.0.1/"],
     hs_libraries = ["HSTclHaskell"],
     extra_libraries = ["tcl83", "tk83", "HSTclHaskell_cbits" ],
     include_dirs = ["/usr/local/lib/ghc-6.0.1/include"],
     c_includes = [],
     package_deps = ["rts", "lang", "concurrent", "data"],
     extra_ghc_opts = ["-fglasgow-exts", "-fvia-C"],
     extra_cc_opts = [],
     extra_ld_opts = ["-L/usr/local/lib", "-lncurses"],
     framework_dirs = [],
     extra_frameworks = []}]
Volker Stolz * * PGP * S/MIME

More information about the Glasgow-haskell-users mailing list