<nidx>-Onot option</nidx>
<nidx>optimising, reset</nidx>
-This option will make GHC ``forget'' any -Oish options it has seen so
+This option will make GHC ``forget'' any @-O@ish options it has seen so
far. Sometimes useful; for example: @make all EXTRA_HC_OPTS=-Onot@.
<tag>@-Ofile <file>@:</tag>
something. When we want to go for broke, we tend to use @-O -fvia-C
-O2-for-C@ (and we go for lots of coffee breaks).
-The easiest way to see what @-O@ (etc) ``really mean'' is to run with
+The easiest way to see what @-O@ (etc.) ``really mean'' is to run with
@-v@, then stand back in amazement. Alternatively, just look at the
@HsC_minus<blah>@ lists in the @ghc@ driver script.
more critical one; it's what determines how eager GHC is about
expanding unfoldings.
+<tag>@-funbox-strict-fields@:</tag>
+<nidx>-funbox-strict-fields option</nidx>
+<nidx>strict constructor fields</nidx>
+<nidx>constructor fields, strict</nidx>
+
+This option causes all constructor fields which are marked strict
+(i.e. ``!'') to be unboxed or unpacked if possible. For example:
+
+<tscreen><verb>
+data T = T !Float !Float
+</verb></tscreen>
+
+will create a constructor @T@ containing two unboxed floats if the
+@-funbox-strict-fields@ flag is given. This may not always be an
+optimisation: if the @T@ constructor is scrutinised and the floats
+passed to a non-strict function for example, they will have to be
+reboxed (this is done automatically by the compiler).
+
+This option should only be used in conjunction with @-O@, in order to
+expose unfoldings to the compiler so the reboxing can be removed as
+often as possible. For example:
+
+<tscreen><verb>
+f :: T -> Float
+f (T f1 f2) = f1 + f2
+</verb></tscreen>
+
+The compiler will avoid reboxing @f1@ and @f2@ by inlining @+@ on
+floats, but only when @-O@ is on.
+
+Any single-constructor data is eligible for unpacking; for example
+
+<tscreen><verb>
+data T = T !(Int,Int)
+</verb></tscreen>
+
+will store the two @Int@s directly in the @T@ constructor, by flattening
+the pair. Multi-level unpacking is also supported:
+
+<tscreen><verb>
+data T = T !S
+data S = S !Int !Int
+</verb></tscreen>
+
+will store two unboxed @Int#@s directly in the @T@ constructor.
+
<tag>@-fsemi-tagging@:</tag>
This option (which <em>does not work</em> with the native-code generator)
tells the compiler to add extra code to test for already-evaluated
for a parallel machine and the others weren't.) You may turn off this
check with @-no-link-chk@. You can turn it (back) on with
@-link-chk@ (the default).
+
+<tag><tt>-no-hs-main</tt>:</tag>
+<nidx>-no-hs-main option</nidx>
+<nidx>linking Haskell libraries with foreign code</nidx>
+
+In the event you want to include ghc-compiled code as part of another
+(non-Haskell) program, the RTS will not be supplying its definition of
+<tt/main()/ at link-time, you will have to. To signal that to the
+driver script when linking, use <tt/-no-hs-main/.
+
+Notice that since the command-line passed to the linker is rather
+involved, you probably want to use the ghc driver script to do the
+final link of your `mixed-language' application. This is not a
+requirement though, just try linking once with <tt/-v/ on to see what
+options the driver passes through to the linker.
+
</descrip>
%************************************************************************
%************************************************************************
%* *
-<sect2>Potential problems with Concurrent Haskell
-<label id="concurrent-problems">
-<p>
-<nidx>Concurrent Haskell problems</nidx>
-<nidx>problems, Concurrent Haskell</nidx>
-%* *
-%************************************************************************
-
-The previous implementation of Concurrent Haskell in GHC had problems
-with using signals handlers in concurrent programs. The current
-system, however, provides thread-safe signal handling (see Section
-<ref name="Signal Handling" id="signals">).
-
-%************************************************************************
-%* *
<sect1>Using Parallel Haskell
<p>
<nidx>Parallel Haskell---use</nidx>