
Jason Dusek wrote:
I have a program here:
https://svn.j-s-n.org/public/haskell/cedict
currently at revision 302, which compiles okay but I can't get it to work. I'm using the FFI to take a (currently small) array and translate it into a Map.
It compiles fine and loads fine -- but it doesn't run fine:
GHCi, version 6.8.2: http://www.haskell.org/ghc/ :? for help Loading package base ... linking ... done. Prelude> import Data.Char.CEDICT Prelude Data.Char.CEDICT> traditional 'a' Loading package array-0.1.0.0 ... linking ... done. Loading package containers-0.1.0.1 ... linking ... done. Loading package parsec-2.1.0.0 ... linking ... done. Loading package utf8-string-0.2 ... linking ... done. Loading package cedict-0.1.1 ... linking ... <interactive>: unknown symbol `___stginit_cedictzm0zi1zi1_DataziCharziCEDICTziMatter_'
This is a cabal pitfall. Note that this is a symbol from Data.Char.CEDICT.Matter. (The 'zi' represents a dot) The problem is that this module wasn't packaged up in the library; you have to list it in the extra-modules field in the cabal file, along with the other used Data.Char.CEDICT.* modules. See also http://hackage.haskell.org/trac/hackage/ticket/128 HTH, Bertram