You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@thrift.apache.org by bu...@apache.org on 2014/05/27 00:14:25 UTC

svn commit: r910033 - in /websites/staging/thrift/trunk/content: ./ lib/ tutorial/

Author: buildbot
Date: Mon May 26 22:14:25 2014
New Revision: 910033

Log:
Staging update by buildbot for thrift

Modified:
    websites/staging/thrift/trunk/content/   (props changed)
    websites/staging/thrift/trunk/content/lib/go.html
    websites/staging/thrift/trunk/content/lib/js.html
    websites/staging/thrift/trunk/content/tutorial/as3.html
    websites/staging/thrift/trunk/content/tutorial/cpp.html
    websites/staging/thrift/trunk/content/tutorial/csharp.html
    websites/staging/thrift/trunk/content/tutorial/d.html
    websites/staging/thrift/trunk/content/tutorial/delphi.html
    websites/staging/thrift/trunk/content/tutorial/go.html
    websites/staging/thrift/trunk/content/tutorial/graphviz.html
    websites/staging/thrift/trunk/content/tutorial/hs.html
    websites/staging/thrift/trunk/content/tutorial/index.html
    websites/staging/thrift/trunk/content/tutorial/java.html
    websites/staging/thrift/trunk/content/tutorial/js.html
    websites/staging/thrift/trunk/content/tutorial/nodejs.html
    websites/staging/thrift/trunk/content/tutorial/ocaml.html
    websites/staging/thrift/trunk/content/tutorial/perl.html
    websites/staging/thrift/trunk/content/tutorial/php.html
    websites/staging/thrift/trunk/content/tutorial/py.html
    websites/staging/thrift/trunk/content/tutorial/rb.html

Propchange: websites/staging/thrift/trunk/content/
------------------------------------------------------------------------------
--- cms:source-revision (original)
+++ cms:source-revision Mon May 26 22:14:25 2014
@@ -1 +1 @@
-1594773
+1597655

Modified: websites/staging/thrift/trunk/content/lib/go.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/go.html (original)
+++ websites/staging/thrift/trunk/content/lib/go.html Mon May 26 22:14:25 2014
@@ -74,13 +74,13 @@
 
   	<div class="container">
           <h1 id="using-thrift-with-go">Using Thrift with Go</h1>
-<p>In following Go conventions, we reccomend you use the 'go' tool to install
+<p>In following Go conventions, we recommend you use the 'go' tool to install
 Thrift for go.</p>
-<div class="codehilite"><pre>$ <span class="n">go</span> <span class="n">get</span> <span class="n">git</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">thrift</span><span class="p">.</span><span class="n">git</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">go</span><span class="o">/</span><span class="n">thrift</span>
+<div class="codehilite"><pre>$ <span class="n">go</span> <span class="n">get</span> <span class="n">git</span><span class="o">-</span><span class="n">wip</span><span class="o">-</span><span class="n">us</span><span class="p">.</span><span class="n">apache</span><span class="p">.</span><span class="n">org</span><span class="o">/</span><span class="n">repos</span><span class="o">/</span><span class="n">asf</span><span class="o">/</span><span class="n">thrift</span><span class="p">.</span><span class="n">git</span><span class="o">/</span><span class="n">lib</span><span class="o">/</span><span class="n">go</span><span class="o">/</span><span class="n">thrift</span>
 </pre></div>
 
 
-<p>Will install the last stable release.</p>
+<p>Will retrieve and install the most recent version of the package.</p>
 <h1 id="a-note-about-optional-fields">A note about optional fields</h1>
 <p>The thrift-to-Go compiler tries to represent thrift IDL structs as Go structs.
 We must be able to distinguish between optional fields that are set to their

Modified: websites/staging/thrift/trunk/content/lib/js.html
==============================================================================
--- websites/staging/thrift/trunk/content/lib/js.html (original)
+++ websites/staging/thrift/trunk/content/lib/js.html Mon May 26 22:14:25 2014
@@ -79,13 +79,19 @@ library. This directory contains a Grunt
 package.json. Many of the build and test tools used here
 require a recent version of Node.js to be installed. To 
 install the support files for the Grunt build tool execute
-the command:
-   $ npm install
-This reads the package.json and pulls in the appropriate
+the command:</p>
+<div class="codehilite"><pre><span class="n">npm</span> <span class="n">install</span>
+</pre></div>
+
+
+<p>This reads the package.json and pulls in the appropriate
 sources from the internet. To build the JavaScript branch
-of Apache Thrift execute the command:
-   $ grunt
-This runs the grunt build tool, linting all of the source 
+of Apache Thrift execute the command:</p>
+<div class="codehilite"><pre><span class="n">grunt</span>
+</pre></div>
+
+
+<p>This runs therunt build tool, linting all of the source 
 files, setting up and running the tests, concatenating and
 minifying the main libraries and generating the html 
 documentation.</p>
@@ -176,6 +182,12 @@ service. </p>
 </pre></div>
 
 
+<h2 id="typescript">TypeScript</h2>
+<p>TypeScript definition files can also be generated by running:</p>
+<div class="codehilite"><pre><span class="n">thrift</span> <span class="o">--</span><span class="n">gen</span> <span class="n">js</span><span class="p">:</span><span class="n">ts</span> <span class="n">file</span><span class="p">.</span><span class="n">thrift</span>
+</pre></div>
+
+
 <p><p class='snippet_footer'>
   This page was generated by Apache Thrift's <strong>source tree docs</strong>:
   <a href="http://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob;f=lib/js/README.md;hb=HEAD"</a>lib/js/README.md</a>

Modified: websites/staging/thrift/trunk/content/tutorial/as3.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/as3.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/as3.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">as3</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/cpp.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/cpp.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/cpp.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">cpp</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/csharp.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/csharp.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/csharp.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">csharp</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/d.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/d.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/d.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">d</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/delphi.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/delphi.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/delphi.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">delphi</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/go.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/go.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/go.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">go</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/graphviz.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/graphviz.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/graphviz.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">cpp</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/hs.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/hs.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/hs.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">hs</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 
@@ -105,7 +105,9 @@
 <span class="n">import</span> <span class="n">Thrift</span><span class="p">.</span><span class="n">Transport</span><span class="p">.</span><span class="n">Handle</span>
 <span class="n">import</span> <span class="n">Thrift</span><span class="p">.</span><span class="n">Server</span>
 
+<span class="n">import</span> <span class="n">Control</span><span class="p">.</span><span class="n">Exception</span>
 <span class="n">import</span> <span class="n">Data</span><span class="p">.</span><span class="n">Maybe</span>
+<span class="n">import</span> <span class="n">Data</span><span class="p">.</span><span class="n">Text</span><span class="p">.</span><span class="n">Lazy</span>
 <span class="n">import</span> <span class="n">Text</span><span class="p">.</span><span class="n">Printf</span>
 <span class="n">import</span> <span class="n">Network</span>
 
@@ -127,9 +129,8 @@
                     <span class="n">f_Work_comment</span> <span class="o">=</span> <span class="n">Nothing</span>
                   <span class="p">}</span>
 
-  <span class="o">--</span> <span class="n">TODO</span> <span class="o">-</span> <span class="n">get</span> <span class="k">this</span> <span class="n">one</span> <span class="n">working</span>
-  <span class="o">--</span><span class="k">catch</span> <span class="p">(</span><span class="n">Client</span><span class="p">.</span><span class="n">calculate</span> <span class="n">client</span> <span class="mi">1</span> <span class="n">work</span><span class="p">)</span> <span class="p">(</span><span class="err">\</span><span class="n">except</span> <span class="o">-&gt;</span>
-  <span class="o">--</span>     <span class="n">printf</span> <span class="s">&quot;InvalidOp %s&quot;</span> <span class="p">(</span><span class="n">show</span> <span class="n">except</span><span class="p">))</span>
+  <span class="n">Control</span><span class="p">.</span><span class="n">Exception</span><span class="p">.</span><span class="k">catch</span> <span class="p">(</span><span class="n">printf</span> <span class="s">&quot;1/0=%d</span><span class="se">\n</span><span class="s">&quot;</span> <span class="o">=&lt;&lt;</span> <span class="n">Client</span><span class="p">.</span><span class="n">calculate</span> <span class="n">client</span> <span class="mi">1</span> <span class="n">work</span><span class="p">)</span>
+        <span class="p">(</span><span class="err">\</span><span class="n">e</span> <span class="o">-&gt;</span> <span class="n">printf</span> <span class="s">&quot;InvalidOperation %s</span><span class="se">\n</span><span class="s">&quot;</span> <span class="p">(</span><span class="n">show</span> <span class="p">(</span><span class="n">e</span> <span class="o">::</span> <span class="n">InvalidOperation</span><span class="p">)))</span>
 
 
   <span class="n">let</span> <span class="n">work</span> <span class="o">=</span> <span class="n">Work</span> <span class="p">{</span> <span class="n">f_Work_op</span> <span class="o">=</span> <span class="n">Just</span> <span class="n">SUBTRACT</span><span class="p">,</span>
@@ -142,10 +143,9 @@
   <span class="n">printf</span> <span class="s">&quot;15-10=%d</span><span class="se">\n</span><span class="s">&quot;</span> <span class="n">diff</span>
 
   <span class="n">log</span> <span class="o">&lt;-</span> <span class="n">SClient</span><span class="p">.</span><span class="n">getStruct</span> <span class="n">client</span> <span class="mi">1</span>
-  <span class="n">printf</span> <span class="s">&quot;Check log: %s</span><span class="se">\n</span><span class="s">&quot;</span>  <span class="err">$</span> <span class="n">fromJust</span> <span class="err">$</span> <span class="n">f_SharedStruct_value</span> <span class="n">log</span>
+  <span class="n">printf</span> <span class="s">&quot;Check log: %s</span><span class="se">\n</span><span class="s">&quot;</span>  <span class="err">$</span> <span class="n">fromJust</span> <span class="err">$</span> <span class="n">unpack</span> <span class="err">`</span><span class="n">fmap</span><span class="err">`</span> <span class="n">f_SharedStruct_value</span> <span class="n">log</span>
 
   <span class="o">--</span> <span class="n">Close</span><span class="o">!</span>
-  <span class="n">tClose</span> <span class="n">transport</span>
 </pre></div>
 
 <p class='snippet_footer'>
@@ -154,7 +154,9 @@
 </p>
 
 <h3 id="server">Server</h3>
-<div class="codehilite"><pre><span class="n">import</span> <span class="n">qualified</span> <span class="n">Calculator</span>
+<div class="codehilite"><pre><span class="p">{</span><span class="o">-</span><span class="err">#</span> <span class="n">LANGUAGE</span> <span class="n">OverloadedStrings</span> <span class="err">#</span><span class="o">-</span><span class="p">}</span>
+
+<span class="n">import</span> <span class="n">qualified</span> <span class="n">Calculator</span>
 <span class="n">import</span> <span class="n">Calculator_Iface</span>
 <span class="n">import</span> <span class="n">Tutorial_Types</span>
 <span class="n">import</span> <span class="n">SharedService_Iface</span>
@@ -165,6 +167,8 @@
 <span class="n">import</span> <span class="n">Thrift</span><span class="p">.</span><span class="n">Transport</span>
 <span class="n">import</span> <span class="n">Thrift</span><span class="p">.</span><span class="n">Server</span>
 
+<span class="n">import</span> <span class="n">Data</span><span class="p">.</span><span class="n">Int</span>
+<span class="n">import</span> <span class="n">Data</span><span class="p">.</span><span class="n">String</span>
 <span class="n">import</span> <span class="n">Data</span><span class="p">.</span><span class="n">Maybe</span>
 <span class="n">import</span> <span class="n">Text</span><span class="p">.</span><span class="n">Printf</span>
 <span class="n">import</span> <span class="n">Control</span><span class="p">.</span><span class="n">Exception</span> <span class="p">(</span><span class="k">throw</span><span class="p">)</span>
@@ -173,7 +177,7 @@
 <span class="n">import</span> <span class="n">Data</span><span class="p">.</span><span class="n">Map</span> <span class="p">((</span><span class="o">!</span><span class="p">))</span>
 <span class="n">import</span> <span class="n">Data</span><span class="p">.</span><span class="n">Monoid</span>
 
-<span class="n">data</span> <span class="n">CalculatorHandler</span> <span class="o">=</span> <span class="n">CalculatorHandler</span> <span class="p">{</span><span class="n">mathLog</span> <span class="o">::</span> <span class="n">MVar</span> <span class="p">(</span><span class="n">M</span><span class="p">.</span><span class="n">Map</span> <span class="n">Int</span> <span class="n">SharedStruct</span><span class="p">)}</span>
+<span class="n">data</span> <span class="n">CalculatorHandler</span> <span class="o">=</span> <span class="n">CalculatorHandler</span> <span class="p">{</span><span class="n">mathLog</span> <span class="o">::</span> <span class="n">MVar</span> <span class="p">(</span><span class="n">M</span><span class="p">.</span><span class="n">Map</span> <span class="n">Int32</span> <span class="n">SharedStruct</span><span class="p">)}</span>
 
 <span class="n">newCalculatorHandler</span> <span class="o">=</span> <span class="k">do</span>
   <span class="n">log</span> <span class="o">&lt;-</span> <span class="n">newMVar</span> <span class="n">mempty</span>
@@ -207,16 +211,16 @@
                     <span class="k">if</span> <span class="n">num2</span> <span class="n">work</span> <span class="o">==</span> <span class="mi">0</span> <span class="n">then</span>
                         <span class="k">throw</span> <span class="err">$</span>
                               <span class="n">InvalidOperation</span> <span class="p">{</span>
-                                 <span class="n">f_InvalidOperation_what</span> <span class="o">=</span> <span class="n">Just</span> <span class="err">$</span> <span class="n">fromEnum</span> <span class="err">$</span> <span class="n">op</span> <span class="n">work</span><span class="p">,</span>
+                                 <span class="n">f_InvalidOperation_what</span> <span class="o">=</span> <span class="n">Just</span> <span class="err">$</span> <span class="n">fromIntegral</span> <span class="err">$</span> <span class="n">fromEnum</span> <span class="err">$</span> <span class="n">op</span> <span class="n">work</span><span class="p">,</span>
                                  <span class="n">f_InvalidOperation_why</span> <span class="o">=</span> <span class="n">Just</span> <span class="s">&quot;Cannot divide by 0&quot;</span>
                                             <span class="p">}</span>
                     <span class="k">else</span>
                         <span class="n">num1</span> <span class="n">work</span> <span class="err">`</span><span class="n">div</span><span class="err">`</span> <span class="n">num2</span> <span class="n">work</span>
 
-    <span class="n">let</span> <span class="n">logEntry</span> <span class="o">=</span> <span class="n">SharedStruct</span> <span class="p">(</span><span class="n">Just</span> <span class="n">logid</span><span class="p">)</span> <span class="p">(</span><span class="n">Just</span> <span class="p">(</span><span class="n">show</span> <span class="n">val</span><span class="p">))</span>
+    <span class="n">let</span> <span class="n">logEntry</span> <span class="o">=</span> <span class="n">SharedStruct</span> <span class="p">(</span><span class="n">Just</span> <span class="n">logid</span><span class="p">)</span> <span class="p">(</span><span class="n">Just</span> <span class="p">(</span><span class="n">fromString</span> <span class="err">$</span> <span class="n">show</span> <span class="err">$</span> <span class="n">val</span><span class="p">))</span>
     <span class="n">modifyMVar_</span> <span class="p">(</span><span class="n">mathLog</span> <span class="n">self</span><span class="p">)</span> <span class="err">$</span> <span class="k">return</span> <span class="p">.(</span><span class="n">M</span><span class="p">.</span><span class="n">insert</span> <span class="n">logid</span> <span class="n">logEntry</span><span class="p">)</span>
 
-    <span class="k">return</span> <span class="n">val</span>
+    <span class="k">return</span> <span class="err">$</span><span class="o">!</span> <span class="n">val</span>
 
    <span class="n">where</span>
      <span class="o">--</span> <span class="n">stupid</span> <span class="n">dynamic</span> <span class="n">languages</span> <span class="n">f</span><span class="err">&#39;</span><span class="n">ing</span> <span class="n">it</span> <span class="n">up</span>
@@ -233,10 +237,6 @@
     <span class="n">print</span> <span class="s">&quot;zip()&quot;</span>
 
 <span class="n">main</span> <span class="o">=</span>  <span class="k">do</span>
-  <span class="n">handler</span> <span class="o">&lt;-</span> <span class="n">newCalculatorHandler</span>
-  <span class="n">print</span> <span class="s">&quot;Starting the server...&quot;</span>
-  <span class="n">runBasicServer</span> <span class="n">handler</span> <span class="n">Calculator</span><span class="p">.</span><span class="n">process</span> <span class="mi">9090</span>
-  <span class="n">print</span> <span class="s">&quot;done.&quot;</span>
 </pre></div>
 
 <p class='snippet_footer'>

Modified: websites/staging/thrift/trunk/content/tutorial/index.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/index.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/index.html Mon May 26 22:14:25 2014
@@ -83,9 +83,8 @@
 </li>
 <li>
 <h3 id="build-and-install-the-apache-thrift-compiler-and-libraries">Build and Install the Apache Thrift compiler and libraries</h3>
-<div class="codehilite"><pre><span class="n">You</span> <span class="n">will</span> <span class="n">then</span> <span class="n">need</span> <span class="n">to</span> <span class="n">build</span> <span class="n">the</span> <span class="n">Apache</span> <span class="n">Thrift</span> <span class="n">compiler</span> <span class="n">and</span> <span class="n">libraries</span><span class="p">.</span>
-
-<span class="o">./</span><span class="n">configure</span> <span class="o">&amp;&amp;</span> <span class="n">make</span>
+<p>You will then need to build the Apache Thrift compiler and libraries.</p>
+<div class="codehilite"><pre><span class="o">./</span><span class="n">configure</span> <span class="o">&amp;&amp;</span> <span class="n">make</span>
 </pre></div>
 
 
@@ -94,16 +93,24 @@ See the <a href="/docs/BuildingFromSourc
 </li>
 <li>
 <h3 id="writing-a-thrift-file">Writing a .thrift file</h3>
-<p>After the Thrift compiler is installed you will need to create a thrift file. This file is an <a href="/docs/idl">interface definition</a> made up of <a href="/docs/types">thrift types</a> and Services. The services you define in this file are implemented by the server and are called by any clients.</p>
+<p>After the Thrift compiler is installed you will need to create a .thrift file. This file is an <a href="/docs/idl">interface definition</a> made up of <a href="/docs/types">thrift types</a> and Services. The services you define in this file are implemented by the server and are called by any clients.</p>
 </li>
 <li>
 <h3 id="generate-thrift-file-to-source-code">Generate Thrift file to source code</h3>
-<p>The Thrift compiler is used to generate your Thrift File into source code which is used by the different client libraries and the server you write. To generate the source from a thrift file run</p>
+<p>The Thrift compiler is used to generate your Thrift file into source code which is used by the different client libraries and the server you write. To generate the source from a Thrift file run</p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">--</span><span class="n">gen</span> <span class="o">&lt;</span><span class="n">language</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">Thrift</span> <span class="n">filename</span><span class="o">&gt;</span>
 </pre></div>
 
 
-<p>The sample <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file defines a basic calculator service. This will be used to demonstrate both the client and server.</p>
+<p>To recursivly generate source code from a Thrift file and all other Thrift files included by it, run</p>
+<div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="o">&lt;</span><span class="n">language</span><span class="o">&gt;</span> <span class="o">&lt;</span><span class="n">Thrift</span> <span class="n">filename</span><span class="o">&gt;</span>
+</pre></div>
+
+
+<p>The sample <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> 
+file defines a basic calculator service. This sample caluclator service .thrift file includes another file called 
+<a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a>. 
+Both files will be used to demonstrate how to build a Thrift client and server pair. </p>
 </li>
 </ul>
 <h2 id="examples-clients-and-servers">Examples Clients and Servers</h2>

Modified: websites/staging/thrift/trunk/content/tutorial/java.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/java.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/java.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">java</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/js.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/js.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/js.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">js</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/nodejs.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/nodejs.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/nodejs.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">js</span><span class="p">:</span><span class="n">node</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/ocaml.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/ocaml.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/ocaml.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">ocaml</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/perl.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/perl.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/perl.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">perl</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/php.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/php.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/php.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">php</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/py.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/py.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/py.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">py</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>
 

Modified: websites/staging/thrift/trunk/content/tutorial/rb.html
==============================================================================
--- websites/staging/thrift/trunk/content/tutorial/rb.html (original)
+++ websites/staging/thrift/trunk/content/tutorial/rb.html Mon May 26 22:14:25 2014
@@ -80,7 +80,7 @@
 <ol>
 <li>Built and installed the Apache Thrift Compiler and Libraries, see <a href="/docs/BuildingFromSource">Building from source</a> for more details.</li>
 <li>
-<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> file as <a href="/tutorial/">discussed here</a></p>
+<p>Generated the <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/tutorial.thrift">tutorial.thrift</a> and <a href="https://git-wip-us.apache.org/repos/asf?p=thrift.git;a=blob_plain;f=tutorial/shared.thrift">shared.thrift</a> files as <a href="/tutorial/">discussed here</a></p>
 <div class="codehilite"><pre><span class="n">thrift</span> <span class="o">-</span><span class="n">r</span> <span class="o">--</span><span class="n">gen</span> <span class="n">rb</span> <span class="n">tutorial</span><span class="p">.</span><span class="n">thrift</span>
 </pre></div>