Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Glasgow Haskell Compiler
GHC
Commits
20a40a62
Commit
20a40a62
authored
Sep 21, 2005
by
simonmar
Browse files
[project @ 2005-09-21 09:54:59 by simonmar]
Document the -x flag
parent
0e89dd44
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc/docs/users_guide/flags.xml
View file @
20a40a62
...
...
@@ -122,6 +122,12 @@
<entry>
static
</entry>
<entry>
-
</entry>
</row>
<row>
<entry><option>
-x
</option>
<replaceable>
suffix
</replaceable></entry>
<entry>
Override default behaviour for source files
</entry>
<entry>
static
</entry>
<entry>
-
</entry>
</row>
</tbody>
</tgroup>
</informaltable>
...
...
ghc/docs/users_guide/using.xml
View file @
20a40a62
...
...
@@ -515,6 +515,30 @@ ghc -c Foo.hs</screen>
of the compiler, dumping the result in a file. Note that this
differs from the previous behaviour of dumping the file to
standard output.
</para>
<sect3
id=
"overriding-suffixes"
>
<title>
Overriding the default behaviour for a file
</title>
<para>
As described above, the way in which a file is processed by GHC
depends on its suffix. This behaviour can be overriden using the
<option>
-x
</option>
option:
</para>
<variablelist>
<varlistentry>
<term><option>
-x
</option>
<replaceable>
suffix
</replaceable></term>
<indexterm><primary><option>
-x
</option></primary>
</indexterm>
<listitem>
<para>
Causes all files following this option on the command
line to be processed as if they had the suffix
<replaceable>
suffix
</replaceable>
. For example, to compile a
Haskell module in the file
<literal>
M.my-hs
</literal>
,
use
<literal>
ghc -c -x hs M.my-hs
</literal>
.
</para>
</listitem>
</varlistentry>
</variablelist>
</sect3>
</sect2>
</sect1>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment