remove empty dir
[ghc-hetmet.git] / ghc / docs / users_guide / separate_compilation.xml
index fc44fe6..c33ff21 100644 (file)
     <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>The file should usually be named after the module name, by
+      <para>Usually, the 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">
@@ -55,8 +69,8 @@
       an <firstterm>interface file</firstterm>. </para>
 
       <para>The object file, which normally ends in a
-      <literal>.o</literal> suffix (or <literal>.obj</literal> if
-      you're on Windows), contains the compiled code for the module.</para>
+      <literal>.o</literal> suffix, contains the compiled code for the
+      module.</para>
 
       <para>The interface file,
       which normally ends in a <literal>.hi</literal> suffix, contains