<tbody>
<row>
<entry><option>--interactive</option></entry>
- <entry>Interactive mode - normally used by just running <command>ghci</command></entry>
+ <entry>Interactive mode - normally used by just running <command>ghci</command>;
+ see <xref linkend="ghci"/> for details.</entry>
<entry>mode</entry>
<entry>-</entry>
</row>
<row>
<entry><option>--make</option></entry>
- <entry>Build a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using <command>make</command>.</entry>
+ <entry>Build a multi-module Haskell program, automatically figuring out dependencies. Likely to be much easier, and faster, than using <command>make</command>;
+ see <xref linkend="make-mode"/> for details..</entry>
<entry>mode</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-e <replaceable>expr</replaceable></option></entry>
- <entry>Evaluate <replaceable>expr</replaceable></entry>
+ <entry>Evaluate <replaceable>expr</replaceable>;
+ see <xref linkend="eval-mode"/> for details.</entry>
<entry>mode</entry>
<entry>-</entry>
</row>
<row>
<entry><option>-M</option></entry>
- <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>.</entry>
+ <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>;
+ see <xref linkend="makefile-dependencies"/> for details.</entry>
<entry>mode</entry>
<entry>-</entry>
</row>
</thead>
<tbody>
<row>
- <entry><option>-keep-hc-file</option></entry>
+ <entry><option>-keep-hc-file</option> or
+ <option>-keep-hc-files</option></entry>
<entry>retain intermediate <literal>.hc</literal> files</entry>
<entry>dynamic</entry>
<entry>-</entry>
</row>
<row>
- <entry><option>-keep-s-file</option></entry>
+ <entry><option>-keep-s-file</option> or
+ <option>-keep-s-files</option></entry>
<entry>retain intermediate <literal>.s</literal> files</entry>
<entry>dynamic</entry>
<entry>-</entry>
</row>
<row>
- <entry><option>-keep-raw-s-file</option></entry>
+ <entry><option>-keep-raw-s-file</option> or
+ <option>-keep-raw-s-files</option></entry>
<entry>retain intermediate <literal>.raw_s</literal> files</entry>
<entry>dynamic</entry>
<entry>-</entry>
<entry>dynamic</entry>
<entry>-</entry>
</row>
+ <row>
+ <entry><option>-fno-print-bind-result</option></entry>
+ <entry><link linkend="ghci-stmts">Turn off printing of binding results in GHCi</link></entry>
+ <entry>dynamic</entry>
+ <entry>-</entry>
+ </row>
</tbody>
</tgroup>
</informaltable>
</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>-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>-fextended-default-rules</option></entry>
+ <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>Enable <link linkend="sec-bang-patterns">bang patterns</link>.</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>
</row>
<row>
+ <entry><option>-fwarn-monomorphism-restriction</option></entry>
+ <entry>warn when the Monomorphism Restriction is applied</entry>
+ <entry>dynamic</entry>
+ <entry><option>-fno-warn-monomorphism-restriction</option></entry>
+ </row>
+
+ <row>
<entry><option>-fwarn-unused-binds</option></entry>
<entry>warn about bindings that are unused</entry>
<entry>dynamic</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>
<row>
<entry><option>-fno-code</option></entry>
<entry>Omit code generation</entry>
- <entry>mode</entry>
+ <entry>dynamic</entry>
+ <entry>-</entry>
+ </row>
+ <row>
+ <entry><option>-fbyte-code</option></entry>
+ <entry>Generate byte-code</entry>
+ <entry>dynamic</entry>
+ <entry>-</entry>
+ </row>
+ <row>
+ <entry><option>-fobject-code</option></entry>
+ <entry>Generate object code</entry>
+ <entry>dynamic</entry>
<entry>-</entry>
</row>
</tbody>
<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>
<entry>dynamic</entry>
<entry>-</entry>
</row>
- <row>
- <entry><option>-fno-print-bind-result</option></entry>
- <entry><link linkend="ghci-stmts">Turn off printing of binding results in GHCi</link></entry>
- <entry>dynamic</entry>
- <entry>-</entry>
- </row>
</tbody>
</tgroup>
</informaltable>