[Haskell-cafe] Using ghc-mod with FFI

Dan Piponi dpiponi at gmail.com
Fri Nov 28 22:11:18 UTC 2014


In my code I have this line:

foreign import ccall "set_num_states" setNumStates :: Int -> IO ()

I can build my project using cabal and have an appropriate "c-sources:"
line.

But when I use ghc-mod check (eg. from " ghc-mod-5.2.0.0", and launched
from Syntastic) it complains:

"ghc-mod:
ByteCodeLink: can't find label
During interactive linking, GHCi couldn't find the following symbol:
  set_num_states"

How should I be checking my code?
--
Dan
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20141128/8ff10514/attachment.html>


More information about the Haskell-Cafe mailing list