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
c6b2930d
Commit
c6b2930d
authored
Jan 12, 2006
by
simonmar
Browse files
[project @ 2006-01-12 10:04:36 by simonmar]
Document that source files are ASCII or UTF-8
parent
704ca16d
Changes
2
Hide whitespace changes
Inline
Side-by-side
ghc/docs/users_guide/separate_compilation.xml
View file @
c6b2930d
...
...
@@ -30,16 +30,30 @@
<sect2
id=
"source-files"
>
<title>
Haskell source files
</title>
<indexterm><primary>
filenames
</primary></indexterm>
<para>
Each Haskell source module should be placed in a file on
its own.
</para>
<para>
T
he file should
usually
be named after the module name,
by
<para>
Usually, t
he file should be named after the module name,
replacing dots in the module name by directory separators. For
example, on a Unix system, the module
<literal>
A.B.C
</literal>
should be placed in the file
<literal>
A/B/C.hs
</literal>
,
relative to some base directory. GHC's behaviour if this rule
is not followed is fully defined by the following section (
<xref
linkend=
"output-files"
/>
).
</para>
relative to some base directory. If the module is not going to
be imported by another module (
<literal>
Main
</literal>
, for
example), then you are free to use any filename for it.
</para>
<indexterm><primary>
unicode
</primary></indexterm>
<para>
GHC assumes that source files are
ASCII
<indexterm><primary>
ASCII
</primary></indexterm>
or
UTF-8
<indexterm><primary>
UTF-8
</primary></indexterm>
only, other
encodings
<indexterm><primary>
encoding
</primary></indexterm>
are
not recognised. However, invalid UTF-8 sequences will be
ignored in comments, so it is possible to use other encodings
such as
Latin-1
<indexterm><primary>
Latin-1
</primary></indexterm>
, as
long as the non-comment source code is ASCII only.
</para>
</sect2>
<sect2
id=
"output-files"
>
...
...
ghc/docs/users_guide/using.xml
View file @
c6b2930d
...
...
@@ -153,19 +153,19 @@ module X where
<variablelist>
<varlistentry>
<term>
<filename>
.lhs
</filename>
<indexterm><primary><literal>
lhs
</literal>
suffix
</primary></indexterm>
</term>
<term><filename>
.hs
</filename></term>
<listitem>
<para>
A
“
literate Haskell
”
module.
</para>
<para>
A
Haskell
module.
</para>
</listitem>
</varlistentry>
<varlistentry>
<term><filename>
.hs
</filename></term>
<term>
<filename>
.lhs
</filename>
<indexterm><primary><literal>
lhs
</literal>
suffix
</primary></indexterm>
</term>
<listitem>
<para>
A
not-so-
literate Haskell module.
</para>
<para>
A
“
literate Haskell
”
module.
</para>
</listitem>
</varlistentry>
...
...
@@ -368,7 +368,7 @@ ghc ––make Main.hs
file.
</para>
</listitem>
<listitem>
<para>
You don't have to write a
<literal>
Makefile
</literal>
.
</para>
<para>
You don't have to write a
<literal>
Makefile
</literal>
.
</para>
<indexterm><primary><literal>
Makefile
</literal>
s
</primary><secondary>
avoiding
</secondary></indexterm>
</listitem>
<listitem>
...
...
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