Add some runghc docs to the users guide
authorIan Lynagh <igloo@earth.li>
Sun, 19 Aug 2007 00:02:58 +0000 (00:02 +0000)
committerIan Lynagh <igloo@earth.li>
Sun, 19 Aug 2007 00:02:58 +0000 (00:02 +0000)
docs/users_guide/runghc.xml [new file with mode: 0644]
docs/users_guide/ug-book.xml.in
docs/users_guide/ug-ent.xml

diff --git a/docs/users_guide/runghc.xml b/docs/users_guide/runghc.xml
new file mode 100644 (file)
index 0000000..cfd5cbe
--- /dev/null
@@ -0,0 +1,42 @@
+<?xml version="1.0" encoding="iso-8859-1"?>
+<chapter id="ghci">
+  <title>Using runghc</title>
+  <indexterm><primary>runghc</primary></indexterm>
+
+  <para>runghc allows you to run Haskell programs without first having
+  to compile them.</para>
+
+  <sect1 id="ghci-introduction">
+    <title>Flags</title>
+
+    <para>The runghc commandline looks like:</para>
+<screen>
+runghc [runghc flags] [GHC flags] module [program flags]
+</screen>
+    <para>The only runghc flag currently is
+    <literal>-f /path/to/ghc</literal>,
+    which tells runghc which GHC to use to run the program. If it is
+    not given then runghc will search for GHC in the directories in the
+    system search path.</para>
+
+    <para>runghc will try to work out where the boundaries between
+    <literal>[runghc flags]</literal> and
+    <literal>[GHC flags]</literal>, and
+    <literal>[GHC flags]</literal> and
+    <literal>module</literal> are, but you can use a
+    <literal>--</literal> flag if it doesn't get it right. For example,
+    <literal>runghc -- -fglasgow-exts Foo</literal> means runghc
+    won't try to use <literal>glasgow-exts</literal> as the path to GHC,
+    but instead will pass the flag to GHC.
+    </para>
+
+  </sect1>
+
+</chapter>
+
+<!-- Emacs stuff:
+     ;;; Local Variables: ***
+     ;;; mode: xml ***
+     ;;; sgml-parent-document: ("users_guide.xml" "book" "chapter") ***
+     ;;; End: ***
+ -->
index c5710f1..c44f07f 100644 (file)
@@ -11,6 +11,7 @@
 &intro;
 &installing;
 &ghci;
+&runghc;
 &using;
 &prof;
 &sooner;
index 1700cfa..d5614e8 100644 (file)
@@ -1,4 +1,5 @@
 <!ENTITY ghci           SYSTEM "ghci.xml">
+<!ENTITY runghc         SYSTEM "runghc.xml">
 <!ENTITY flags          SYSTEM "flags.xml">
 <!ENTITY license        SYSTEM "license.xml">
 <!ENTITY intro          SYSTEM "intro.xml" >