flags.xml 88.3 KB
Newer Older
1
<?xml version="1.0" encoding="iso-8859-1"?>
2
  <sect1 id="flag-reference">
3 4
    <title>Flag reference</title>

5 6
    <para>This section is a quick-reference for GHC's command-line
    flags.  For each flag, we also list its static/dynamic status (see
7
    <xref linkend="static-dynamic-flags"/>), and the flag's opposite
8 9
    (if available).</para>

10
    <sect2>
11 12 13
      <title>Help and verbosity options</title>

      <para><xref linkend="options-help"/></para>
14 15

      <informaltable>
16
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
17 18 19 20 21 22 23 24 25 26 27 28
	  <thead>
	    <row>
	      <entry>Flag</entry>
	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
	      <entry><option>-?</option></entry>
	      <entry>help</entry>
29
	      <entry>mode</entry>
30 31 32 33 34
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-help</option></entry>
	      <entry>help</entry>
35
	      <entry>mode</entry>
36 37
	      <entry>-</entry>
	    </row>
Simon Marlow's avatar
Simon Marlow committed
38
            <row>
39 40 41 42 43 44 45 46 47 48 49
	      <entry><option>-v</option></entry>
	      <entry>verbose mode (equivalent to <option>-v3</option>)</entry>
	      <entry>dynamic</entry>
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-v</option><replaceable>n</replaceable></entry>
	      <entry>set verbosity level</entry>
	      <entry>dynamic</entry>
	      <entry>-</entry>
	    </row>
50 51 52
	    <row>
	      <entry><option>-V</option></entry>
	      <entry>display GHC version</entry>
53
	      <entry>mode</entry>
54 55
	      <entry>-</entry>
	    </row>
Ian Lynagh's avatar
Ian Lynagh committed
56
	    <row>
Ian Lynagh's avatar
Ian Lynagh committed
57 58
	      <entry><option>&ndash;&ndash;supported-extensions</option> or <option>&ndash;&ndash;supported-languages</option></entry>
	      <entry>display the supported languages and language extensions</entry>
Ian Lynagh's avatar
Ian Lynagh committed
59 60 61
	      <entry>mode</entry>
	      <entry>-</entry>
	    </row>
Ian Lynagh's avatar
Ian Lynagh committed
62 63 64 65 66 67
	    <row>
	      <entry><option>&ndash;&ndash;info</option></entry>
	      <entry>display information about the compiler</entry>
	      <entry>mode</entry>
	      <entry>-</entry>
	    </row>
68
	    <row>
69
	      <entry><option>&ndash;&ndash;version</option></entry>
70
	      <entry>display GHC version</entry>
71
	      <entry>mode</entry>
72 73 74
	      <entry>-</entry>
	    </row>
	    <row>
75
	      <entry><option>&ndash;&ndash;numeric-version</option></entry>
76
	      <entry>display GHC version (numeric only)</entry>
77
	      <entry>mode</entry>
78 79
	      <entry>-</entry>
	    </row>
80
	    <row>
81
	      <entry><option>&ndash;&ndash;print-libdir</option></entry>
82
	      <entry>display GHC library directory</entry>
83
	      <entry>mode</entry>
84
	      <entry>-</entry>
Ian Lynagh's avatar
Ian Lynagh committed
85
	    </row>
86 87 88 89 90 91
	    <row>
	      <entry><option>-ferror-spans</option></entry>
	      <entry>output full span in error messages</entry>
	      <entry>static</entry>
	      <entry>-</entry>
	    </row>
92 93 94 95 96 97
	    <row>
	      <entry><option>-H</option><replaceable>size</replaceable></entry>
	      <entry>Set the minimum heap size to <replaceable>size</replaceable></entry>
	      <entry>static</entry>
	      <entry>-</entry>
	    </row>
98 99 100 101 102 103
	    <row>
	      <entry><option>-Rghc-timing</option></entry>
	      <entry>Summarise timing stats for GHC (same as <literal>+RTS -tstderr</literal>)</entry>
	      <entry>static</entry>
	      <entry>-</entry>
	    </row>
104 105 106 107 108 109
	  </tbody>
	</tgroup>
      </informaltable>

    </sect2>
    <sect2>
110
      <title>Which phases to run</title>
daniel.is.fischer's avatar
daniel.is.fischer committed
111

112 113
      <para><xref linkend="options-order"/></para>

114
      <informaltable>
115
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
116 117 118 119 120 121 122 123 124 125 126 127
	  <thead>
	    <row>
	      <entry>Flag</entry>
	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
	      <entry><option>-E</option></entry>
	      <entry>Stop after preprocessing (<literal>.hspp</literal> file)</entry>
128
	      <entry>mode</entry>
129 130 131 132 133
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-C</option></entry>
	      <entry>Stop after generating C (<literal>.hc</literal> file)</entry>
134
	      <entry>mode</entry>
135 136 137 138 139
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-S</option></entry>
	      <entry>Stop after generating assembly (<literal>.s</literal> file)</entry>
140
	      <entry>mode</entry>
141 142 143 144
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-c</option></entry>
145 146
	      <entry>Do not link</entry>
	      <entry>dynamic</entry>
147 148
	      <entry>-</entry>
	    </row>
149 150 151 152 153 154
	    <row>
	      <entry><option>-x</option> <replaceable>suffix</replaceable></entry>
	      <entry>Override default behaviour for source files</entry>
	      <entry>static</entry>
	      <entry>-</entry>
	    </row>
155 156 157
	  </tbody>
	</tgroup>
      </informaltable>
158 159 160
    </sect2>

     <sect2>
161
      <title>Alternative modes of operation</title>
daniel.is.fischer's avatar
daniel.is.fischer committed
162

163 164
      <para><xref linkend="modes"/></para>

165
      <informaltable>
166
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
167 168 169 170 171 172 173 174 175 176 177
	  <thead>
	    <row>
	      <entry>Flag</entry>
	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
	      <entry><option>--interactive</option></entry>
178 179
	      <entry>Interactive mode - normally used by just running <command>ghci</command>;
	      see <xref linkend="ghci"/> for details.</entry>
180
	      <entry>mode</entry>
181 182 183 184
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>--make</option></entry>
185 186
	      <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>
187
	      <entry>mode</entry>
188 189 190 191
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-e <replaceable>expr</replaceable></option></entry>
192 193
	      <entry>Evaluate <replaceable>expr</replaceable>;
	      see <xref linkend="eval-mode"/> for details.</entry>
194
	      <entry>mode</entry>
195 196 197 198
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-M</option></entry>
199 200
	      <entry>Generate dependency information suitable for use in a <filename>Makefile</filename>;
	      see <xref linkend="makefile-dependencies"/> for details.</entry>
201
	      <entry>mode</entry>
202 203 204 205 206
	      <entry>-</entry>
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>
207 208 209
    </sect2>

    <sect2>
210
      <title>Redirecting output</title>
daniel.is.fischer's avatar
daniel.is.fischer committed
211

212 213
      <para><xref linkend="options-output"/></para>

214
      <informaltable>
215
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
216 217 218 219 220 221 222 223 224
	  <thead>
	    <row>
	      <entry>Flag</entry>
	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
225 226 227
	    <row>
	      <entry><option>-hcsuf</option> <replaceable>suffix</replaceable></entry>
	      <entry>set the suffix to use for intermediate C files</entry>
228
	      <entry>dynamic</entry>
229 230
	      <entry>-</entry>
	    </row>
231 232 233
	    <row>
	      <entry><option>-hidir</option> <replaceable>dir</replaceable></entry>
	      <entry>set directory for interface files</entry>
234
	      <entry>dynamic</entry>
235 236
	      <entry>-</entry>
	    </row>
237 238 239
	    <row>
	      <entry><option>-hisuf</option> <replaceable>suffix</replaceable></entry>
	      <entry>set the suffix to use for interface files</entry>
240
	      <entry>dynamic</entry>
241 242 243 244 245
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-o</option> <replaceable>filename</replaceable></entry>
	      <entry>set output filename</entry>
246
	      <entry>dynamic</entry>
247 248 249 250
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-odir</option> <replaceable>dir</replaceable></entry>
Simon Marlow's avatar
Simon Marlow committed
251
	      <entry>set directory for object files</entry>
252
	      <entry>dynamic</entry>
253 254 255 256 257
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-ohi</option> <replaceable>filename</replaceable></entry>
	      <entry>set the filename in which to put the interface</entry>
258
	      <entry>dynamic</entry>
259 260 261 262 263
	      <entry></entry>
	    </row>
	    <row>
	      <entry><option>-osuf</option> <replaceable>suffix</replaceable></entry>
	      <entry>set the output file suffix</entry>
264
	      <entry>dynamic</entry>
265 266
	      <entry>-</entry>
	    </row>
267 268 269 270 271 272
	    <row>
	      <entry><option>-stubdir</option> <replaceable>dir</replaceable></entry>
	      <entry>redirect FFi stub files</entry>
	      <entry>dynamic</entry>
	      <entry>-</entry>
	    </row>
Simon Marlow's avatar
Simon Marlow committed
273 274 275 276 277 278
	    <row>
	      <entry><option>-outputdir</option> <replaceable>dir</replaceable></entry>
	      <entry>set output directory</entry>
	      <entry>dynamic</entry>
	      <entry>-</entry>
	    </row>
279 280 281 282 283 284
	  </tbody>
	</tgroup>
      </informaltable>
    </sect2>

    <sect2>
285
      <title>Keeping intermediate files</title>
daniel.is.fischer's avatar
daniel.is.fischer committed
286

287
      <para><xref linkend="keeping-intermediates"/></para>
daniel.is.fischer's avatar
daniel.is.fischer committed
288

289
      <informaltable>
290
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
291 292 293 294 295 296 297 298 299 300
	  <thead>
	    <row>
	      <entry>Flag</entry>
	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
Ian Lynagh's avatar
Ian Lynagh committed
301 302
	      <entry><option>-keep-hc-file</option> or
                 <option>-keep-hc-files</option></entry>
303
	      <entry>retain intermediate <literal>.hc</literal> files</entry>
304
	      <entry>dynamic</entry>
305 306
	      <entry>-</entry>
	    </row>
307 308 309 310 311 312 313
	    <row>
	      <entry><option>-keep-llvm-file</option> or
                 <option>-keep-llvm-files</option></entry>
	      <entry>retain intermediate LLVM <literal>.ll</literal> files</entry>
	      <entry>dynamic</entry>
	      <entry>-</entry>
	    </row>
314
	    <row>
Ian Lynagh's avatar
Ian Lynagh committed
315 316
	      <entry><option>-keep-s-file</option> or
                 <option>-keep-s-files</option></entry>
317
	      <entry>retain intermediate <literal>.s</literal> files</entry>
318
	      <entry>dynamic</entry>
319 320 321 322 323
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-keep-tmp-files</option></entry>
	      <entry>retain all intermediate temporary files</entry>
324
	      <entry>dynamic</entry>
325 326 327 328 329 330 331 332
	      <entry>-</entry>
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>
    </sect2>

    <sect2>
333
      <title>Temporary files</title>
daniel.is.fischer's avatar
daniel.is.fischer committed
334

335 336
      <para><xref linkend="temp-files"/></para>

337
      <informaltable>
338
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
339 340 341 342 343 344 345 346 347 348 349 350
	  <thead>
	    <row>
	      <entry>Flag</entry>
	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
	      <entry><option>-tmpdir</option></entry>
	      <entry>set the directory for temporary files</entry>
351
	      <entry>dynamic</entry>
352 353 354 355 356 357 358 359
	      <entry>-</entry>
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>
    </sect2>

    <sect2>
360 361 362
      <title>Finding imports</title>

      <para><xref linkend="search-path"/></para>
363 364

      <informaltable>
365
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
366 367 368 369 370 371 372 373 374 375 376 377 378 379
	  <thead>
	    <row>
	      <entry>Flag</entry>

	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
	      <entry><option>-i</option><replaceable>dir1</replaceable>:<replaceable>dir2</replaceable>:...</entry>
	      <entry>add <replaceable>dir</replaceable>,
	          <replaceable>dir2</replaceable>, etc. to import path</entry>
380
	      <entry>static/<literal>:set</literal></entry>
381 382 383 384 385
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-i</option></entry>
	      <entry>Empty the import directory list</entry>
386
	      <entry>static/<literal>:set</literal></entry>
387 388 389 390 391 392 393 394
	      <entry>-</entry>
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>
    </sect2>

    <sect2>
395 396 397
      <title>Interface file options</title>

      <para><xref linkend="hi-options"/></para>
398 399

      <informaltable>
400
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420
	  <thead>
	    <row>
	      <entry>Flag</entry>

	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
	      <entry><option>-ddump-hi</option></entry>
	      <entry>Dump the new interface to stdout</entry>
	      <entry>dynamic</entry>
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-ddump-hi-diffs</option></entry>
	      <entry>Show the differences vs. the old interface</entry>
	      <entry>dynamic</entry>
421 422 423 424 425 426
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-ddump-minimal-imports</option></entry>
	      <entry>Dump a minimal set of imports</entry>
	      <entry>dynamic</entry>
427 428
	      <entry>-</entry>
	    </row>
429 430
	    <row>
	      <entry><option>--show-iface</option> <replaceable>file</replaceable></entry>
431
	      <entry>See <xref linkend="modes"/>.</entry>
432
	    </row>
433 434 435 436
	  </tbody>
	</tgroup>
      </informaltable>
    </sect2>
daniel.is.fischer's avatar
daniel.is.fischer committed
437

438
    <sect2>
439 440 441
      <title>Recompilation checking</title>

      <para><xref linkend="recomp"/></para>
442 443

      <informaltable>
444
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
445 446 447 448 449 450 451 452 453 454 455
	  <thead>
	    <row>
	      <entry>Flag</entry>

	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
456
	      <entry><option>-fforce-recomp</option></entry>
457 458 459
	      <entry>Turn off recompilation checking; implied by any
	      <option>-ddump-X</option> option</entry>
	      <entry>dynamic</entry>
460
	      <entry><option>-fno-force-recomp</option></entry>
461 462 463 464 465 466
	    </row>
	  </tbody>
	</tgroup>
      </informaltable>
    </sect2>

467
    <sect2 id="interactive-mode-options">
468
      <title>Interactive-mode options</title>
daniel.is.fischer's avatar
daniel.is.fischer committed
469

470 471
      <para><xref linkend="ghci-dot-files"/></para>

472
      <informaltable>
473
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
474
	  <thead>
475
	    <row>
476 477 478 479 480 481 482 483
	      <entry>Flag</entry>
	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
484 485
	      <entry><option>-ignore-dot-ghci</option></entry>
	      <entry>Disable reading of <filename>.ghci</filename> files</entry>
486 487 488 489
	      <entry>static</entry>
	      <entry>-</entry>
	    </row>
	    <row>
490 491
	      <entry><option>-read-dot-ghci</option></entry>
	      <entry>Enable reading of <filename>.ghci</filename> files</entry>
492 493 494
	      <entry>static</entry>
	      <entry>-</entry>
	    </row>
mnislaih's avatar
mnislaih committed
495 496 497 498 499 500 501 502 503 504 505 506
	    <row>
	      <entry><option>-fbreak-on-exception</option></entry>
	      <entry><link linkend="ghci-debugger-exceptions">Break on any exception thrown</link></entry>
	      <entry>dynamic</entry>
	      <entry><option>-fno-break-on-exception</option></entry>
	    </row>
	    <row>
	      <entry><option>-fbreak-on-error</option></entry>
	      <entry><link linkend="ghci-debugger-exceptions">Break on uncaught exceptions and errors</link></entry>
	      <entry>dynamic</entry>
	      <entry><option>-fno-break-on-error</option></entry>
	    </row>
507 508 509 510 511
	    <row>
	      <entry><option>-fprint-evld-with-show</option></entry>
	      <entry><link linkend="breakpoints">Enable usage of Show instances in <literal>:print</literal></link></entry>
	      <entry>dynamic</entry>
	      <entry><option>-fno-print-evld-with-show</option></entry>
daniel.is.fischer's avatar
daniel.is.fischer committed
512
	    </row>
513
	    <row>
514 515
	      <entry><option>-fprint-bind-result</option></entry>
	      <entry><link linkend="ghci-stmts">Turn on printing of binding results in GHCi</link></entry>
516
	      <entry>dynamic</entry>
517
	      <entry><option>-fno-print-bind-result</option></entry>
518
	    </row>
519 520 521 522 523 524
	    <row>
	      <entry><option>-fno-print-bind-contents</option></entry>
	      <entry><link linkend="breakpoints">Turn off printing of binding contents in GHCi</link></entry>
	      <entry>dynamic</entry>
	      <entry>-</entry>
	    </row>
525 526 527 528 529 530 531
	    <row>
	      <entry><option>-fno-implicit-import-qualified</option></entry>
	      <entry><link linkend="ghci-import-qualified">Turn off
	      implicit qualified import of everything in GHCi</link></entry>
	      <entry>dynamic</entry>
	      <entry>-</entry>
	    </row>
532

533 534 535 536 537 538
	  </tbody>
	</tgroup>
      </informaltable>
    </sect2>

    <sect2>
539 540 541 542
      <title>Packages</title>

      <para><xref linkend="packages"/></para>

543
      <informaltable>
544
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
545 546 547 548 549 550 551 552 553
	  <thead>
    	    <row>
	      <entry>Flag</entry>
	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
554 555 556
	    <row>
	      <entry><option>-package-name</option> <replaceable>P</replaceable></entry>
	      <entry>Compile to be part of package <replaceable>P</replaceable></entry>
557
              <entry>static</entry>
558 559
	      <entry>-</entry>
	    </row>
560
	    <row>
561 562
	      <entry><option>-package</option> <replaceable>P</replaceable></entry>
	      <entry>Expose package <replaceable>P</replaceable></entry>
563
	      <entry>static/<literal>:set</literal></entry>
564
	      <entry>-</entry>
565 566 567 568 569 570
	    </row>
	    <row>
	      <entry><option>-hide-all-packages</option></entry>
	      <entry>Hide all packages by default</entry>
	      <entry>static</entry>
	      <entry>-</entry>
571 572 573 574
	    </row>
	    <row>
	      <entry><option>-hide-package</option> <replaceable>name</replaceable></entry>
	      <entry>Hide package <replaceable>P</replaceable></entry>
575
	      <entry>static/<literal>:set</literal></entry>
576 577 578 579 580
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-ignore-package</option> <replaceable>name</replaceable></entry>
	      <entry>Ignore package <replaceable>P</replaceable></entry>
581
	      <entry>static/<literal>:set</literal></entry>
582 583 584
	      <entry>-</entry>
	    </row>
	    <row>
585 586
	      <entry><option>-package-conf</option> <replaceable>file</replaceable></entry>
	      <entry>Load more packages from <replaceable>file</replaceable></entry>
587
	      <entry>static</entry>
588 589 590
	      <entry>-</entry>
	    </row>
	    <row>
591 592
	      <entry><option>-no-user-package-conf</option></entry>
	      <entry>Don't load the user's package config file.</entry>
593
	      <entry>static</entry>
594 595
	      <entry>-</entry>
	    </row>
596 597 598 599 600 601
	    <row>
	      <entry><option>-no-auto-link-packages</option></entry>
	      <entry>Don't automatically link in the haskell98 package.</entry>
	      <entry>dynamic</entry>
	      <entry>-</entry>
	    </row>
602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621
	    <row>
	      <entry><option>-trust</option> <replaceable>P</replaceable></entry>
        <entry>Expose package <replaceable>P</replaceable> and set it to be
          trusted</entry>
	      <entry>static/<literal>:set</literal></entry>
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-distrust</option> <replaceable>P</replaceable></entry>
        <entry>Expose package <replaceable>P</replaceable> and set it to be
          distrusted</entry>
	      <entry>static/<literal>:set</literal></entry>
	      <entry>-</entry>
	    </row>
	    <row>
	      <entry><option>-distrust-all</option> </entry>
        <entry>Distrust all packages by default</entry>
	      <entry>static/<literal>:set</literal></entry>
	      <entry>-</entry>
	    </row>
622 623 624 625 626 627
	  </tbody>
	</tgroup>
      </informaltable>
    </sect2>

    <sect2>
628 629
      <title>Language options</title>

daniel.is.fischer's avatar
daniel.is.fischer committed
630
      <para>Language options can be enabled either by a command-line option
631 632
      <option>-Xblah</option>, or by a <literal>{-# LANGUAGE blah #-}</literal>
      pragma in the file itself.  See <xref linkend="options-language"/></para>
633 634

      <informaltable>
635
	<tgroup cols="4" align="left" colsep="1" rowsep="1">
636 637 638 639 640 641 642 643 644 645
	  <thead>
    	    <row>
	      <entry>Flag</entry>
	      <entry>Description</entry>
	      <entry>Static/Dynamic</entry>
	      <entry>Reverse</entry>
	    </row>
	  </thead>
	  <tbody>
	    <row>
646 647 648 649 650 651
	      <entry><option>-fglasgow-exts</option></entry>
	      <entry>Enable most language extensions</entry>
	      <entry>dynamic</entry>
	      <entry><option>-fno-glasgow-exts</option></entry>
	    </row>
	    <row>
652
	      <entry><option>-XOverlappingInstances</option></entry>
653
	      <entry>Enable <link linkend="instance-overlap">overlapping instances</link></entry>
654
	      <entry>dynamic</entry>
655
	      <entry><option>-XNoOverlappingInstances</option></entry>
656
	    </row>
657
	    <row>
658
	      <entry><option>-XIncoherentInstances</option></entry>
daniel.is.fischer's avatar
daniel.is.fischer committed
659
	      <entry>Enable <link linkend="instance-overlap">incoherent instances</link>.
660
	      Implies <option>-XOverlappingInstances</option> </entry>
661
	      <entry>dynamic</entry>
662
	      <entry><option>-XNoIncoherentInstances</option></entry>
663 664
	    </row>
	    <row>
665
	      <entry><option>-XUndecidableInstances</option></entry>
666
	      <entry>Enable <link linkend="undecidable-instances">undecidable instances</link></entry>
667
	      <entry>dynamic</entry>
668
	      <entry><option>-XNoUndecidableInstances</option></entry>
669
	    </row>
670
	    <row>
671
	      <entry><option>-fcontext-stack=N</option><replaceable>n</replaceable></entry>
672
	      <entry>set the <link linkend="undecidable-instances">limit for context reduction</link>. Default is 20.</entry>
673
	      <entry>dynamic</entry>
674
	      <entry></entry>
675
	    </row>
676
	    <row>
677
	      <entry><option>-XArrows</option></entry>
678 679 680
	      <entry>Enable <link linkend="arrow-notation">arrow
	      notation</link> extension</entry>
	      <entry>dynamic</entry>
681
	      <entry><option>-XNoArrows</option></entry>
682
	    </row>
683
	    <row>
684
	      <entry><option>-XDisambiguateRecordFields</option></entry>
daniel.is.fischer's avatar
daniel.is.fischer committed
685
	      <entry>Enable <link linkend="disambiguate-fields">record
686 687
	      field disambiguation</link></entry>
	      <entry>dynamic</entry>
688
	      <entry><option>-XNoDisambiguateRecordFields</option></entry>
689
	    </row>
chak's avatar
chak committed
690
	    <row>
691
	      <entry><option>-XForeignFunctionInterface</option></entry>
692
	      <entry>Enable <link linkend="ffi">foreign function interface</link> (implied by
chak's avatar
chak committed
693 694
	      <option>-fglasgow-exts</option>)</entry>
	      <entry>dynamic</entry>
695
	      <entry><option>-XNoForeignFunctionInterface</option></entry>
ross's avatar
ross committed
696 697
	    </row>
	    <row>
698
	      <entry><option>-XGenerics</option></entry>
699
	      <entry>Deprecated, does nothing. No longer enables <link linkend="generic-classes">generic classes</link>.
700 701
               See also GHC's support for
               <link linkend="generic-programming">generic programming</link>.</entry>
ross's avatar
ross committed
702
	      <entry>dynamic</entry>
703
	      <entry><option>-XNoGenerics</option></entry>
chak's avatar
chak committed
704
	    </row>
705
	    <row>
706
	      <entry><option>-XImplicitParams</option></entry>
707
	      <entry>Enable <link linkend="implicit-parameters">Implicit Parameters</link>.
708
	      Implied by <option>-fglasgow-exts</option>.</entry>
709
	      <entry>dynamic</entry>
710
	      <entry><option>-XNoImplicitParams</option></entry>
711 712 713 714 715 716 717
	    </row>
	    <row>
	      <entry><option>-firrefutable-tuples</option></entry>
	      <entry>Make tuple pattern matching irrefutable</entry>
	      <entry>dynamic</entry>
	      <entry><option>-fno-irrefutable-tuples</option></entry>
	    </row>
718
	    <row>
719
	      <entry><option>-XNoImplicitPrelude</option></entry>
720 721
	      <entry>Don't implicitly <literal>import Prelude</literal></entry>
	      <entry>dynamic</entry>
722
	      <entry><option>-XImplicitPrelude</option></entry>
723
	    </row>
724 725 726 727 728 729
	    <row>
	      <entry><option>-XRebindableSyntax</option></entry>
	      <entry>Employ <link linkend="rebindable-syntax">rebindable syntax</link></entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoRebindableSyntax</option></entry>
	    </row>
730
	    <row>
731
	      <entry><option>-XNoMonomorphismRestriction</option></entry>
732
	      <entry>Disable the <link linkend="monomorphism">monomorphism restriction</link></entry>
733
	      <entry>dynamic</entry>
734
	      <entry><option>-XMonomorphismRrestriction</option></entry>
735
	    </row>
736 737 738 739 740 741
	    <row>
	      <entry><option>-XNoNPlusKPatterns</option></entry>
	      <entry>Disable support for <literal>n+k</literal> patterns</entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNPlusKPatterns</option></entry>
	    </row>
742
	    <row>
743
	      <entry><option>-XNoMonoPatBinds</option></entry>
744
	      <entry>Make <link linkend="monomorphism">pattern bindings polymorphic</link></entry>
745
	      <entry>dynamic</entry>
746
	      <entry><option>-XMonoPatBinds</option></entry>
747
	    </row>
748
	    <row>
749
	      <entry><option>-XRelaxedPolyRec</option></entry>
750 751
	      <entry>Relaxed checking for <link linkend="typing-binds">mutually-recursive polymorphic functions</link></entry>
	      <entry>dynamic</entry>
752
	      <entry><option>-XNoRelaxedPolyRec</option></entry>
753
	    </row>
754
	    <row>
755
	      <entry><option>-XExtendedDefaultRules</option></entry>
756
	      <entry>Use GHCi's <link linkend="extended-default-rules">extended default rules</link> in a normal module</entry>
757
	      <entry>dynamic</entry>
758
	      <entry><option>-XNoExtendedDefaultRules</option></entry>
759
	    </row>
760
	    <row>
761
	      <entry><option>-XOverloadedStrings</option></entry>
762 763 764
	      <entry>Enable <link linkend="overloaded-strings">overloaded string literals</link>.
	      </entry>
	      <entry>dynamic</entry>
765
	      <entry><option>-XNoOverloadedStrings</option></entry>
766 767
	    </row>
	    <row>
768
	      <entry><option>-XGADTs</option></entry>
simonpj@microsoft.com's avatar
simonpj@microsoft.com committed
769
	      <entry>Enable <link linkend="gadt">generalised algebraic data types</link>.
770 771
	      </entry>
	      <entry>dynamic</entry>
772
	      <entry><option>-XNoGADTs</option></entry>
773
	    </row>
Ian Lynagh's avatar
Ian Lynagh committed
774 775 776 777 778 779 780
	    <row>
	      <entry><option>-XGADTSyntax</option></entry>
	      <entry>Enable <link linkend="gadt-style">generalised algebraic data type syntax</link>.
	      </entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoGADTSyntax</option></entry>
	    </row>
781
	    <row>
782
	      <entry><option>-XTypeFamilies</option></entry>
783 784
	      <entry>Enable <link linkend="type-families">type families</link>.</entry>
	      <entry>dynamic</entry>
785
	      <entry><option>-XNoTypeFamilies</option></entry>
786
	    </row>
787
	    <row>
788
	      <entry><option>-XScopedTypeVariables</option></entry>
789
	      <entry>Enable <link linkend="scoped-type-variables">lexically-scoped type variables</link>.
790 791
	      Implied by <option>-fglasgow-exts</option>.</entry>
	      <entry>dynamic</entry>
792
	      <entry><option>-XNoScopedTypeVariables</option></entry>
793
	    </row>
794 795 796 797 798 799 800
	    <row>
	      <entry><option>-XMonoLocalBinds</option></entry>
	      <entry>Enable <link linkend="mono-local-binds">do not generalise local bindings</link>.
	      </entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoMonoLocalBinds</option></entry>
	    </row>
801
	    <row>
802
	      <entry><option>-XTemplateHaskell</option></entry>
daniel.is.fischer's avatar
daniel.is.fischer committed
803
	      <entry>Enable <link linkend="template-haskell">Template Haskell</link>.
804
		No longer implied by <option>-fglasgow-exts</option>.</entry>
805
	      <entry>dynamic</entry>
806
	      <entry><option>-XNoTemplateHaskell</option></entry>
807
	    </row>
808 809 810 811 812 813
	    <row>
	      <entry><option>-XQuasiQuotes</option></entry>
	      <entry>Enable <link linkend="th-quasiquotation">quasiquotation</link>.</entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoQuasiQuotes</option></entry>
	    </row>
814
	    <row>
815
	      <entry><option>-XBangPatterns</option></entry>
816
	      <entry>Enable <link linkend="bang-patterns">bang patterns</link>.</entry>
817
	      <entry>dynamic</entry>
818
	      <entry><option>-XNoBangPatterns</option></entry>
819
	    </row>
820
	    <row>
821
	      <entry><option>-XCPP</option></entry>
822 823
	      <entry>Enable the <link linkend="c-pre-processor">C preprocessor</link>.</entry>
	      <entry>dynamic</entry>
824
	      <entry><option>-XNoCPP</option></entry>
825 826
	    </row>
	    <row>
827
	      <entry><option>-XPatternGuards</option></entry>
828 829
	      <entry>Enable <link linkend="pattern-guards">pattern guards</link>.</entry>
	      <entry>dynamic</entry>
830
	      <entry><option>-XNoPatternGuards</option></entry>
831
	    </row>
832 833 834 835 836 837
	    <row>
	      <entry><option>-XViewPatterns</option></entry>
	      <entry>Enable <link linkend="view-patterns">view patterns</link>.</entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoViewPatterns</option></entry>
	    </row>
838
	    <row>
839
	      <entry><option>-XUnicodeSyntax</option></entry>
Simon Marlow's avatar
Simon Marlow committed
840
	      <entry>Enable <link linkend="unicode-syntax">unicode syntax</link>.</entry>
841
	      <entry>dynamic</entry>
842
	      <entry><option>-XNoUnicodeSyntax</option></entry>
843 844
	    </row>
	    <row>
845
	      <entry><option>-XMagicHash</option></entry>
846
	      <entry>Allow "#" as a <link linkend="magic-hash">postfix modifier on identifiers</link>.</entry>
847
	      <entry>dynamic</entry>
848
	      <entry><option>-XNoMagicHash</option></entry>
849
	    </row>
850
	    <row>
daniel.is.fischer's avatar
daniel.is.fischer committed
851
	      <entry><option>-XExplicitForAll</option></entry>
852 853 854 855 856 857 858 859 860 861 862
	      <entry>Enable <link linkend="explicit-foralls">explicit universal quantification</link>.
              Implied by <option>-XScopedTypeVariables</option>,
	    <option>-XLiberalTypeSynonyms</option>,
	    <option>-XRank2Types</option>,
	    <option>-XRankNTypes</option>,
	    <option>-XPolymorphicComponents</option>,
	    <option>-XExistentialQuantification</option>
              </entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoExplicitForAll</option></entry>
	    </row>
863
	    <row>
864
	      <entry><option>-XPolymorphicComponents</option></entry>
865
	      <entry>Enable <link linkend="universal-quantification">polymorphic components for data constructors</link>.</entry>
866
	      <entry>dynamic</entry>
867
	      <entry><option>-XNoPolymorphicComponents</option></entry>
868
	    </row>
869 870 871 872 873 874 875 876 877 878 879 880
	    <row>
	      <entry><option>-XRank2Types</option></entry>
	      <entry>Enable <link linkend="universal-quantification">rank-2 types</link>.</entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoRank2Types</option></entry>
	    </row>
	    <row>
	      <entry><option>-XRankNTypes</option></entry>
	      <entry>Enable <link linkend="universal-quantification">rank-N types</link>.</entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoRankNTypes</option></entry>
	    </row>
881 882 883 884 885 886
	    <row>
	      <entry><option>-XImpredicativeTypes</option></entry>
	      <entry>Enable <link linkend="impredicative-polymorphism">impredicative types</link>.</entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoImpredicativeTypes</option></entry>
	    </row>
887
	    <row>
888
	      <entry><option>-XExistentialQuantification</option></entry>
889 890
	      <entry>Enable <link linkend="existential-quantification">existential quantification</link>.</entry>
	      <entry>dynamic</entry>
891
	      <entry><option>-XNoExistentialQuantification</option></entry>
892 893
	    </row>
	    <row>
894
	      <entry><option>-XKindSignatures</option></entry>
895
	      <entry>Enable <link linkend="kinding">kind signatures</link>.</entry>
896
	      <entry>dynamic</entry>
897
	      <entry><option>-XNoKindSignatures</option></entry>
898 899
	    </row>
	    <row>
900
	      <entry><option>-XEmptyDataDecls</option></entry>
901 902
	      <entry>Enable empty data declarations.</entry>
	      <entry>dynamic</entry>
903
	      <entry><option>-XNoEmptyDataDecls</option></entry>
904 905
	    </row>
	    <row>
906
	      <entry><option>-XParallelListComp</option></entry>
907 908
	      <entry>Enable <link linkend="parallel-list-comprehensions">parallel list comprehensions</link>.</entry>
	      <entry>dynamic</entry>
909
	      <entry><option>-XNoParallelListComp</option></entry>
910
	    </row>
911 912
	    <row>
	      <entry><option>-XTransformListComp</option></entry>
913
	      <entry>Enable <link linkend="generalised-list-comprehensions">generalised list comprehensions</link>.</entry>
914 915 916
	      <entry>dynamic</entry>
	      <entry><option>-XNoTransformListComp</option></entry>
	    </row>
917 918 919 920 921 922
        <row>
	      <entry><option>-XMonadComprehensions</option></entry>
	      <entry>Enable <link linkend="monad-comprehensions">monad comprehensions</link>.</entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoMonadComprehensions</option></entry>
	    </row>
923
	    <row>
924
	      <entry><option>-XUnliftedFFITypes</option></entry>
925 926
	      <entry>Enable unlifted FFI types.</entry>
	      <entry>dynamic</entry>
927
	      <entry><option>-XNoUnliftedFFITypes</option></entry>
928 929
	    </row>
	    <row>
930 931
	      <entry><option>-XLiberalTypeSynonyms</option></entry>
	      <entry>Enable <link linkend="type-synonyms">liberalised type synonyms</link>.</entry>
932
	      <entry>dynamic</entry>
933
	      <entry><option>-XNoLiberalTypeSynonyms</option></entry>
934 935
	    </row>
	    <row>
936
	      <entry><option>-XTypeOperators</option></entry>
937 938
	      <entry>Enable type operators.</entry>
	      <entry>dynamic</entry>
939
	      <entry><option>-XNoTypeOperators</option></entry>
940
	    </row>
941 942 943 944 945 946
	    <row>
	      <entry><option>-XDoRec</option></entry>
	      <entry>Enable <link linkend="recursive-do-notation">recursive do notation</link>.</entry>
	      <entry>dynamic</entry>
	      <entry><option>-XNoDoRec</option></entry>
	    </row>
947
	    <row>
948
	      <entry><option>-XRecursiveDo</option></entry>
949
	      <entry>Enable <link linkend="mdo-notation">recursive do (mdo) notation</link>. This is deprecated; please use <link linkend="recursive-do-notation">recursive do notation</link> instead.</entry>
950
	      <entry>dynamic</entry>
951
	      <entry><option>-XNoRecursiveDo</option></entry>
952 953
	    </row>
	    <row>
954
	      <entry><option>-XPArr</option></entry>
955 956
	      <entry>Enable parallel arrays.</entry>
	      <entry>dynamic</entry>
957
	      <entry><option>-XNoPArr</option></entry>
958 959
	    </row>
	    <row>
960
	      <entry><option>-XRecordWildCards</option></entry>
961
	      <entry>Enable <link linkend="record-wildcards">record wildcards</link>.</entry>
962
	      <entry>dynamic</entry>
963
	      <entry><option>-XNoRecordWildCards</option></entry>
964 965
	    </row>
	    <row>
966
	      <entry><option>-XNamedFieldPuns</option></entry>
967
	      <entry>Enable <link linkend="record-puns">record puns</link>.</entry>
968
	      <entry>dynamic</entry>
969
	      <entry><option>-XNoNamedFieldPuns</option></entry>
970 971
	    </row>
	    <row>
972
	      <entry><option>-XDisambiguateRecordFields</option></entry>
973
	      <entry>Enable  <link linkend="disambiguate-fields">record field disambiguation</link>. </entry>
974
	      <entry>dynamic</entry>
975
	      <entry><option>-XNoDisambiguateRecordFields</option></entry>
</