kazu-yamamoto/ghc-mod — pull request #60 by eagletmt (2012-03-24 04:11:52+00:00)
Title: Enable dynamic linking for FFI

`ghcLink` is required to be `LinkInMemory` to handle dynamic linking when `hscTarget = HscInterpreted`.
http://www.haskell.org/ghc/docs/7.4.1/html/libraries/ghc-7.4.1/GHC.html#t:HscTarget

And if .cabal file contains `Extra-libraries` field, `-l` options are automatically added.
You can also specify them manually: `ghc-mod -g -lfoo check Main.hs`.