Add several new record features
[ghc-hetmet.git] / docs / users_guide / flags.xml
index 2f14127..ba6e895 100644 (file)
              <entry>-</entry>
            </row>
            <row>
+             <entry><option>-short-ghci-banner</option></entry>
+             <entry>Display a one-line banner at GHCi startup</entry>
+             <entry>dynamic</entry>
+             <entry>-</entry>
+           </row>
+           <row>
+             <entry><option>-long-ghci-banner</option></entry>
+             <entry>Display a full banner at GHCi startup</entry>
+             <entry>dynamic</entry>
+             <entry>-</entry>
+           </row>
+           <row>
              <entry><option>-fdebugging</option></entry>
              <entry>Generate bytecode enabled for debugging</entry>
              <entry>dynamic</entry>
          </thead>
          <tbody>
            <row>
-             <entry><option>-fallow-overlapping-instances</option></entry>
+             <entry><option>-fglasgow-exts</option></entry>
+             <entry>Enable most language extensions</entry>
+             <entry>dynamic</entry>
+             <entry><option>-fno-glasgow-exts</option></entry>
+           </row>
+           <row>
+             <entry><option>-X=AllowOverlappingInstances</option></entry>
              <entry>Enable <link linkend="instance-overlap">overlapping instances</link></entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-allow-overlapping-instances</option></entry>
+             <entry><option>-X=NoAllowOverlappingInstances</option></entry>
            </row>
            <row>
-             <entry><option>-fallow-incoherent-instances</option></entry>
+             <entry><option>-X=AllowIncoherentInstances</option></entry>
              <entry>Enable <link linkend="instance-overlap">incoherent instances</link>.  
-             Implies <option>-fallow-overlapping-instances</option> </entry>
+             Implies <option>-X=AllowOverlappingInstances</option> </entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-allow-incoherent-instances</option></entry>
+             <entry><option>-X=NoAllowIncoherentInstances</option></entry>
            </row>
            <row>
-             <entry><option>-fallow-undecidable-instances</option></entry>
+             <entry><option>-X=AllowUndecidableInstances</option></entry>
              <entry>Enable <link linkend="undecidable-instances">undecidable instances</link></entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-allow-undecidable-instances</option></entry>
+             <entry><option>-X=NoAllowUndecidableInstances</option></entry>
            </row>
            <row>
              <entry><option>-fcontext-stack=N</option><replaceable>n</replaceable></entry>
              <entry><option>20</option></entry>
            </row>
            <row>
-             <entry><option>-farrows</option></entry>
+             <entry><option>-X=Arrows</option></entry>
              <entry>Enable <link linkend="arrow-notation">arrow
              notation</link> extension</entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-arrows</option></entry>
+             <entry><option>-X=NoArrows</option></entry>
            </row>
            <row>
-             <entry><option>-ffi</option> or <option>-fffi</option></entry>
-             <entry>Enable <link linkend="ffi">foreign function interface</link> (implied by
-             <option>-fglasgow-exts</option>)</entry>
+             <entry><option>-fdisambiguate-record-fields</option></entry>
+             <entry>Enable <link linkend="disambiguate-fields">record 
+             field disambiguation</link></entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-ffi</option></entry>
+             <entry><option>-fno-disambiguate-record-fields</option></entry>
            </row>
            <row>
-             <entry><option>-fgenerics</option></entry>
-             <entry>Enable <link linkend="generic-classes">generic classes</link></entry>
+             <entry><option>-X=FFI</option> or <option>-X=ForeignFunctionInterface</option></entry>
+             <entry>Enable <link linkend="ffi">foreign function interface</link> (implied by
+             <option>-fglasgow-exts</option>)</entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-fgenerics</option></entry>
+             <entry><option>-X=NoFFI</option></entry>
            </row>
            <row>
-             <entry><option>-fglasgow-exts</option></entry>
-             <entry>Enable most language extensions</entry>
+             <entry><option>-X=Generics</option></entry>
+             <entry>Enable <link linkend="generic-classes">generic classes</link></entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-glasgow-exts</option></entry>
+             <entry><option>-X=NoGenerics</option></entry>
            </row>
            <row>
-             <entry><option>-fimplicit-params</option></entry>
+             <entry><option>-X=ImplicitParams</option></entry>
              <entry>Enable <link linkend="implicit-parameters">Implicit Parameters</link>.
              Implied by <option>-fglasgow-exts</option>.</entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-implicit-params</option></entry>
+             <entry><option>-X=NoImplicitParams</option></entry>
            </row>
            <row>
              <entry><option>-firrefutable-tuples</option></entry>
              <entry><option>-fno-irrefutable-tuples</option></entry>
            </row>
            <row>
-             <entry><option>-fno-implicit-prelude</option></entry>
+             <entry><option>-X=NoImplicitPrelude</option></entry>
              <entry>Don't implicitly <literal>import Prelude</literal></entry>
              <entry>dynamic</entry>
-             <entry><option>-fimplicit-prelude</option></entry>
+             <entry><option>-X=ImplicitPrelude</option></entry>
            </row>
            <row>
-             <entry><option>-fno-monomorphism-restriction</option></entry>
+             <entry><option>-X=NoMonomorphismRestriction</option></entry>
              <entry>Disable the <link linkend="monomorphism">monomorphism restriction</link></entry>
              <entry>dynamic</entry>
-             <entry><option>-fmonomorphism-restriction</option></entry>
+             <entry><option>-X=MonomorphismRrestriction</option></entry>
            </row>
            <row>
-             <entry><option>-fno-mono-pat-binds</option></entry>
+             <entry><option>-X=NoMonoPatBinds</option></entry>
              <entry>Make <link linkend="monomorphism">pattern bindings polymorphic</link></entry>
              <entry>dynamic</entry>
-             <entry><option>-fmono-pat-binds</option></entry>
+             <entry><option>-X=MonoPatBinds</option></entry>
            </row>
            <row>
-             <entry><option>-fextended-default-rules</option></entry>
+             <entry><option>-X=RelaxedPolyRed</option></entry>
+             <entry>Relaxed checking for <link linkend="typing-binds">mutually-recursive polymorphic functions</link></entry>
+             <entry>dynamic</entry>
+             <entry><option>-X=NoRelaxedPolyRec</option></entry>
+           </row>
+           <row>
+             <entry><option>-X=ExtendedDefaultRules</option></entry>
              <entry>Use GHCi's <link linkend="extended-default-rules">extended default rules</link> in a normal module</entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-extended-default-rules</option></entry>
+             <entry><option>-X=NoExtendedDefaultRules</option></entry>
            </row>
            <row>
-             <entry><option>-foverloaded-strings</option></entry>
+             <entry><option>-X=OverloadedStrings</option></entry>
              <entry>Enable <link linkend="overloaded-strings">overloaded string literals</link>.
              </entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-overloaded-strings</option></entry>
+             <entry><option>-X=NoOverloadedStrings</option></entry>
+           </row>
+           <row>
+             <entry><option>-X=GADTs</option></entry>
+             <entry>Enable <link linkend="gadts">generalised algebraic data types</link>.
+             </entry>
+             <entry>dynamic</entry>
+             <entry><option>-X=NoGADTs</option></entry>
+           </row>
+           <row>
+             <entry><option>-X=TypeFamilies</option></entry>
+             <entry>Enable <link linkend="type-families">type families</link>.</entry>
+             <entry>dynamic</entry>
+             <entry><option>-X=NoTypeFamilies</option></entry>
            </row>
            <row>
-             <entry><option>-fscoped-type-variables</option></entry>
+             <entry><option>-X=ScopedTypeVariables</option></entry>
              <entry>Enable <link linkend="scoped-type-variables">lexically-scoped type variables</link>.
              Implied by <option>-fglasgow-exts</option>.</entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-scoped-type-variables</option></entry>
+             <entry><option>-X=NoScopedTypeVariables</option></entry>
            </row>
            <row>
-             <entry><option>-fth</option></entry>
+             <entry><option>-X=TH</option> or <option>-X=TemplateHaskell</option></entry>
              <entry>Enable <link linkend="template-haskell">Template Haskell</link>. 
                No longer implied by <option>-fglasgow-exts</option>.</entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-th</option></entry>
+             <entry><option>-X=NoTH</option></entry>
            </row>
            <row>
-             <entry><option>-fbang-patterns</option></entry>
+             <entry><option>-X=BangPtterns</option></entry>
              <entry>Enable <link linkend="bang-patterns">bang patterns</link>.</entry>
              <entry>dynamic</entry>
-             <entry><option>-fno-bang-patterns</option></entry>
+             <entry><option>-X=NoBangPatterns</option></entry>
            </row>
          </tbody>
        </tgroup>
          </row>
          <row>
            <entry><option>-Wall</option></entry>
-           <entry>enable all warnings</entry>
+           <entry>enable almost all warnings (details in <xref linkend="options-sanity"/>)</entry>
            <entry>dynamic</entry>
            <entry><option>-w</option></entry>
          </row>
            <entry><option>-fno-warn-hi-shadowing</option></entry>
          </row>
 
+          <row>
+            <entry><option>-fwarn-implicit-prelude</option></entry>
+            <entry>warn when the Prelude is implicitly imported</entry>
+            <entry>dynamic</entry>
+            <entry><option>-fno-warn-implicit-prelude</option></entry>
+          </row>
+
          <row>
            <entry><option>-fwarn-incomplete-patterns</option></entry>
            <entry>warn when a pattern match could fail</entry>
          <tbody>
            <row>
              <entry><option>-fcase-merge</option></entry>
-             <entry>Enable case-merging</entry>
+             <entry>Enable case-merging. Implied by <option>-O</option>.</entry>
              <entry>dynamic</entry>
              <entry><option>-fno-case-merge</option></entry>
            </row>
 
            <row>
              <entry><option>-fdo-eta-reduction</option></entry>
-             <entry>Enable eta-reduction</entry>
+             <entry>Enable eta-reduction. Implied by <option>-O</option>.</entry>
              <entry>dynamic</entry>
              <entry><option>-fno-do-eta-reduction</option></entry>
            </row>
            </row>
 
            <row>
-             <entry><option>-frules-off</option></entry>
-             <entry>Switch off all rewrite rules (including rules
-             generated by automatic specialisation of overloaded functions)</entry>
-             <entry>static</entry>
-             <entry><option>-frules-off</option></entry>
-           </row>
-
-           <row>
              <entry><option>-fignore-asserts</option></entry>
              <entry>Ignore assertions in the source</entry>
              <entry>dynamic</entry>
            </row>
 
            <row>
-             <entry><option>-fliberate-case-threshold</option></entry>
-             <entry>Tweak the liberate-case optimisation (default: 10)</entry>
-             <entry>static</entry>
-             <entry><option>-fno-liberate-case-threshold</option></entry>
-           </row>
-
-           <row>
              <entry><option>-fomit-interface-pragmas</option></entry>
              <entry>Don't generate interface pragmas</entry>
              <entry>dynamic</entry>
            </row>
 
            <row>
-             <entry><option>-fno-cse</option></entry>
-             <entry>Turn off common sub-expression</entry>
+             <entry><option>-fcse</option></entry>
+             <entry>Turn on common sub-expression elimination. Implied by <option>-O</option>.</entry>
              <entry>dynamic</entry>
-             <entry>-</entry>
+             <entry>-fno-cse</entry>
            </row>
 
            <row>
-             <entry><option>-fno-full-laziness</option></entry>
-             <entry>Turn off full laziness (floating bindings outwards).</entry>
+             <entry><option>-ffull-laziness</option></entry>
+             <entry>Turn on full laziness (floating bindings outwards). Implied by <option>-O</option>.</entry>
              <entry>dynamic</entry>
-             <entry>-ffull-laziness</entry>
+             <entry>-fno-full-laziness</entry>
            </row>
 
            <row>
-             <entry><option>-fno-pre-inlining</option></entry>
-             <entry>Turn off pre-inlining</entry>
-             <entry>static</entry>
-             <entry>-</entry>
+             <entry><option>-frewrite-rules</option></entry>
+             <entry>Switch on all rewrite rules (including rules
+             generated by automatic specialisation of overloaded functions).
+             Implied by <option>-O</option>. </entry>
+             <entry>dynamic</entry>
+             <entry><option>-fno-rewrite-rules</option></entry>
            </row>
 
            <row>
-             <entry><option>-fno-strictness</option></entry>
-             <entry>Turn off strictness analysis</entry>
+             <entry><option>-fstrictness</option></entry>
+             <entry>Turn on strictness analysis. Implied by <option>-O</option>.</entry>
              <entry>dynamic</entry>
-             <entry>-</entry>
+             <entry>-fno-strictness</entry>
+           </row>
+
+           <row>
+             <entry><option>-fspec-constr</option></entry>
+             <entry>Turn on the SpecConstr transformation. Implied by <option>-O2</option>.</entry>
+             <entry>dynamic</entry>
+             <entry>-fno-spec-constr</entry>
+           </row>
+
+           <row>
+             <entry><option>-fliberate-case</option></entry>
+             <entry>Turn on the liberate-case transformation. Implied by <option>-O2</option>.</entry>
+             <entry>dynamic</entry>
+             <entry>-fno-liberate-case</entry>
+           </row>
+
+           <row>
+             <entry><option>-fspec-threshold</option>=<replaceable>n</replaceable></entry>
+             <entry>Set the size threshold for function specialisation to <replaceable>n</replaceable>, for both
+               the liberate-case and SpecConstr transformations (default: 200)</entry>
+             <entry>static</entry>
+             <entry><option>-</option></entry>
            </row>
 
            <row>
              <entry>static</entry>
              <entry><option>-fno-unfolding-use-threshold</option></entry>
            </row>
+
+           <row>
+             <entry><option>-fno-pre-inlining</option></entry>
+             <entry>Turn off pre-inlining</entry>
+             <entry>static</entry>
+             <entry>-</entry>
+           </row>
          </tbody>
        </tgroup>
       </informaltable>
     </sect2>
 
     <sect2>
+      <title>Program coverage options</title>
+      
+      <para><xref linkend="hpc"/></para>
+
+      <informaltable>
+       <tgroup cols="4" align="left" colsep="1" rowsep="1">
+         <thead>
+           <row>
+             <entry>Flag</entry>
+             <entry>Description</entry>
+             <entry>Static/Dynamic</entry>
+             <entry>Reverse</entry>
+           </row>
+         </thead>
+         <tbody>
+           <row>
+             <entry><option>-fhpc</option></entry>
+             <entry>Turn on Haskell program coverage instrumentation</entry>
+             <entry>static</entry>
+             <entry><option>-</option></entry>
+           </row>
+           <row>
+             <entry><option>-hpcdir dir</option></entry>
+             <entry>Directory to deposit .mix files during compilation</entry>
+             <entry>dynamic</entry>
+             <entry><option>-</option></entry>
+           </row>
+         </tbody>
+       </tgroup>
+      </informaltable>
+    </sect2>
+
+    <sect2>
       <title>Haskell pre-processor options</title>
 
       <para><xref linkend="pre-processor"/></para>
              <entry>-</entry>
            </row>
            <row>
+             <entry><option>-ddump-hpc</option></entry>
+             <entry>Dump after intrumentation for program coverage</entry>
+             <entry>dynamic</entry>
+             <entry>-</entry>
+           </row>
+           <row>
              <entry><option>-ddump-inlinings</option></entry>
              <entry>Dump inlining info</entry>
              <entry>dynamic</entry>