[Haskell-cafe] GHC API output files options problem

Marianna Rapoport amaurremi at gmail.com
Fri Jul 15 14:28:29 CEST 2011


Hi all,

we are working on a Haskell support plugin for IntelliJ IDEA, and need to
provide correct compilation of Haskell programs.

We compile the latter using GHC API, with options specifying .hi and .o
paths. For some reason, unlike a standalone GHC compilation, GHC API ignores
the values of the outputFile and outputHi flags.

Please find attached a minimal example where "err_test.hs" uses GHC API to
compile "src/A.hs".

Thus, "test_ghc.sh" and "test_my.sh" should do the same, but the first works
correctly while the latter puts "use.o" and "use.hi" to the "src" folder. To
launch "test_my.sh", please change the value of lib in "err_test.hs"
according to your GHC installation path.

Thank you very much in advance!

Marianna Rapoport, amaurremi at gmail.com
Oleg Sobolev, sobolev_ov at mail.ru
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110715/1376c00d/attachment.htm>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: htest.tar
Type: application/x-tar
Size: 10240 bytes
Desc: not available
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20110715/1376c00d/attachment.tar>


More information about the Haskell-Cafe mailing list