From dde80d73a5affea82e6cd54f51120866e3175de5 Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 28 Oct 2005 15:51:15 +0000 Subject: [PATCH] [project @ 2005-10-28 15:51:15 by simonmar] document -stubdir --- ghc/docs/users_guide/ffi-chap.xml | 5 ++++ ghc/docs/users_guide/flags.xml | 6 +++++ ghc/docs/users_guide/separate_compilation.xml | 34 +++++++++++++++++++++++++ 3 files changed, 45 insertions(+) diff --git a/ghc/docs/users_guide/ffi-chap.xml b/ghc/docs/users_guide/ffi-chap.xml index 84fb8ae..e1374c4 100644 --- a/ghc/docs/users_guide/ffi-chap.xml +++ b/ghc/docs/users_guide/ffi-chap.xml @@ -107,6 +107,11 @@ extern HsInt foo(HsInt a0); invoke foo() from C, just #include "Foo_stub.h" and call foo(). + The foo_stub.c and + foo_stub.h files can be redirected using the + option; see . + Using your own <literal>main()</literal> diff --git a/ghc/docs/users_guide/flags.xml b/ghc/docs/users_guide/flags.xml index bbd57a0..a6c4d12 100644 --- a/ghc/docs/users_guide/flags.xml +++ b/ghc/docs/users_guide/flags.xml @@ -242,6 +242,12 @@ dynamic - + + dir + redirect FFi stub files + dynamic + - + diff --git a/ghc/docs/users_guide/separate_compilation.xml b/ghc/docs/users_guide/separate_compilation.xml index 97fe772..fc44fe6 100644 --- a/ghc/docs/users_guide/separate_compilation.xml +++ b/ghc/docs/users_guide/separate_compilation.xml @@ -253,6 +253,23 @@ Main.hs, and put the resulting executable in foo.exe (not foo). + + If you use ghc --make and you don't + use the , the name GHC will choose + for the executable will be based on the name of the file + containing the module Main. + Note that with GHC the Main module doesn't + have to be put in file Main.hs. + Thus both + + ghc --make Prog + + and + + ghc --make Prog.hs + + will produce Prog (or + Prog.exe if you are on Windows). @@ -326,6 +343,23 @@ $ ghc -c parse/Foo.hs parse/Bar.hs gurgle/Bumble.hs -odir `arch` + dir + + + + Redirects all generated FFI stub files into + dir. Stub files are generated when the + Haskell source contains a foreign export or + foreign import "&wrapper" declaration (see ). The + option behaves in exactly the same way as + and with respect to hierarchical + modules. + + + + + suffix -- 1.7.10.4