document -XUnicodeSyntax
authorSimon Marlow <marlowsd@gmail.com>
Wed, 20 May 2009 22:36:47 +0000 (22:36 +0000)
committerSimon Marlow <marlowsd@gmail.com>
Wed, 20 May 2009 22:36:47 +0000 (22:36 +0000)
docs/users_guide/flags.xml
docs/users_guide/glasgow_exts.xml

index 171eaba..2cbe4fa 100644 (file)
            </row>
            <row>
              <entry><option>-XUnicodeSyntax</option></entry>
-             <entry>Enable unicode syntax.</entry>
+             <entry>Enable <link linkend="unicode-syntax">unicode syntax</link>.</entry>
              <entry>dynamic</entry>
              <entry><option>-XNoUnicodeSyntax</option></entry>
            </row>
index 21aba83..f63c90e 100644 (file)
@@ -335,6 +335,75 @@ Indeed, the bindings can even be recursive.
 <sect1 id="syntax-extns">
 <title>Syntactic extensions</title>
  
+    <sect2 id="unicode-syntax">
+      <title>Unicode syntax</title>
+      <para>The language
+      extension <option>-XUnicodeSyntax</option><indexterm><primary><option>-XUnicodeSyntax</option></primary></indexterm>
+      enables Unicode characters to be used to stand for certain ASCII
+      character sequences.  The following alternatives are provided:</para>
+
+      <informaltable>
+       <tgroup cols="2" align="left" colsep="1" rowsep="1">
+         <thead>
+           <row>
+             <entry>ASCII</entry>
+              <entry>Unicode alternative</entry>
+             <entry>Code point</entry>
+             <entry>Name</entry>
+           </row>
+         </thead>
+         <tbody>
+           <row>
+             <entry><literal>::</literal></entry>
+             <entry>::</entry> <!-- no special char, apparently -->
+              <entry>0x2237</entry>
+             <entry>PROPORTION</entry>
+           </row>
+          </tbody>
+         <tbody>
+           <row>
+             <entry><literal>=&gt;</literal></entry>
+             <entry>&rArr;</entry>
+             <entry>0x21D2</entry>
+              <entry>RIGHTWARDS DOUBLE ARROW</entry>
+           </row>
+          </tbody>
+         <tbody>
+           <row>
+             <entry><literal>forall</literal></entry>
+             <entry>&forall;</entry>
+             <entry>0x2200</entry>
+              <entry>FOR ALL</entry>
+           </row>
+          </tbody>
+         <tbody>
+           <row>
+             <entry><literal>-&gt;</literal></entry>
+             <entry>&rarr;</entry>
+             <entry>0x2192</entry>
+              <entry>RIGHTWARDS ARROW</entry>
+           </row>
+          </tbody>
+         <tbody>
+           <row>
+             <entry><literal>&lt;-</literal></entry>
+             <entry>&larr;</entry>
+             <entry>0x2190</entry>
+              <entry>LEFTWARDS ARROW</entry>
+           </row>
+          </tbody>
+         <tbody>
+           <row>
+             <entry>..</entry>
+             <entry>&hellip;</entry>
+             <entry>0x22EF</entry>
+             <entry>MIDLINE HORIZONTAL ELLIPSIS</entry>
+           </row>
+          </tbody>
+        </tgroup>
+      </informaltable>
+    </sect2>
+
     <sect2 id="magic-hash">
       <title>The magic hash</title>
       <para>The language extension <option>-XMagicHash</option> allows "&num;" as a