X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Fdocs%2Fusers_guide%2Fphases.sgml;h=e0f92b3fd23b408d63061bdb816631ddabf936dc;hb=d28ba8c800901bea01f70c4719278c2a364cf9fc;hp=043a45152b1bdc68873495264e5190e4d108a6c5;hpb=6eaf5b61b42afabc7757182ddf9b9d8a401d4434;p=ghc-hetmet.git
diff --git a/ghc/docs/users_guide/phases.sgml b/ghc/docs/users_guide/phases.sgml
index 043a451..e0f92b3 100644
--- a/ghc/docs/users_guide/phases.sgml
+++ b/ghc/docs/users_guide/phases.sgml
@@ -461,6 +461,19 @@ strmod = "\
+
+
+
+
+
+ Omit the link step. This flag can be useful if you
+ want to avoid linking in mode,
+ where linking is normally done automatically if the program
+ contains a Main module.
+
+
+
+ name
@@ -475,6 +488,20 @@ strmod = "\
+ name
+
+
+ On Darwin/MacOS X only, link in the framework name.
+ This option corresponds to the option for Apple's Linker.
+ Please note that frameworks and packages are two different things - frameworks don't
+ contain any haskell code. Rather, they are Apple's way of packaging shared libraries.
+ To link to Apple's “Carbon” API, for example, you'd use
+ .
+
+
+
+
+ dir
@@ -485,6 +512,16 @@ strmod = "\
+ dir
+
+
+ On Darwin/MacOS X only, prepend the directory dir to
+ the framework directories path. This option corresponds to the
+ option for Apple's Linker ( already means something else for GHC).
+
+
+
+
@@ -518,6 +555,27 @@ strmod = "\
+
+
+ specifying your own main function
+
+ The normal rule in Haskell is that your program must supply a main
+ function in module Main. When testing, it is often convenient
+ to change which function is the "main" one, and the flag
+ allows you to do so. The thing can be one of:
+
+ A lower-case identifier foo. GHC assumes that the main function is Main.foo.
+ An module name A. GHC assumes that the main function is A.main.
+ An qualified name A.foo. GHC assumes that the main function is A.foo.
+
+ Strictly speaking, is not a link-phase flag at all; it has no effect on the link step.
+ The flag must be specified when compiling the module containing the specified main function (e.g. module A
+ in the latter two items above. It has no effect for other modules (and hence can safely be given to ghc --make).
+
+
+
+
+ linking Haskell libraries with foreign code
@@ -526,8 +584,8 @@ strmod = "\
as part of another (non-Haskell) program, the RTS will not
be supplying its definition of main()
at link-time, you will have to. To signal that to the
- driver script when linking, use
- .
+ compiler when linking, use
+ . See also .
Notice that since the command-line passed to the
linker is rather involved, you probably want to use
@@ -536,6 +594,13 @@ strmod = "\
though, just try linking once with on
to see what options the driver passes through to the
linker.
+
+ The flag can also be
+ used to persuade the compiler to do the link step in
+ mode when there is no Haskell
+ Main module present (normally the
+ compiler will not attempt linking when there is no
+ Main).