diff --git a/gf.cabal b/gf.cabal
--- a/gf.cabal
+++ b/gf.cabal
@@ -1,5 +1,5 @@
 name: gf
-version: 3.12
+version: 3.12.0
 
 cabal-version: 1.22
 build-type: Simple
diff --git a/src/compiler/GF/Compile/PGFtoHaskell.hs b/src/compiler/GF/Compile/PGFtoHaskell.hs
--- a/src/compiler/GF/Compile/PGFtoHaskell.hs
+++ b/src/compiler/GF/Compile/PGFtoHaskell.hs
@@ -51,7 +51,7 @@
           derivingClause
                  | dataExt = "deriving (Show,Data)"
                  | otherwise = "deriving Show"
-          extraImports | gadt = ["import Control.Monad.Identity", "import Control.Monad", "import Data.Monoid"]
+          extraImports | gadt = ["import Control.Monad.Identity", "import Data.Monoid"]
                        | dataExt = ["import Data.Data"]
                        | otherwise = []
           pgfImports | pgf2 = ["import PGF2 hiding (Tree)", "", "showCId :: CId -> String", "showCId = id"]
diff --git a/src/www/gf-web-api.html b/src/www/gf-web-api.html
deleted file mode 100644
--- a/src/www/gf-web-api.html
+++ /dev/null
@@ -1,894 +0,0 @@
-<!DOCTYPE html>
-<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
-<head>
-  <meta charset="utf-8" />
-  <meta name="viewport" content="width=device-width, initial-scale=1.0" />
-  <meta name="author" content="June 2016" />
-  <title>GF Web Service API</title>
-  <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.1.3/css/bootstrap.min.css" integrity="sha384-MCw98/SFnGE8fJT3GXwEOngsV7Zt27NXFoaoApmYm81iuXoPkFOJwJ8ERdknLPMO" crossorigin="anonymous">
-  <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.4.2/css/all.css" integrity="sha384-/rXc/GQVaYpyDdyxK+ecHPVYJSN9bmVFBvjA/9eOB+pb3F2w2N6fc5qB9Ew5yIns" crossorigin="anonymous">
-  <!--[if lt IE 9]>
-    <script src="//cdnjs.cloudflare.com/ajax/libs/html5shiv/3.7.3/html5shiv-printshiv.min.js"></script>
-  <![endif]-->
-</head>
-<body class="bg-light">
-  <div class="bg-white pb-5">
-<div class="container-fluid py-5" style="max-width:1200px">
-
-<header id="title-block-header">
-<a href="../.." title="Home">
-  <img src="../../doc/Logos/gf1.svg" height="200" class="float-md-right ml-3 mb-3 bg-white" alt="GF Logo">
-</a>
-<h1 class="title">GF Web Service API</h1>
-<p class="author">June 2016</p>
-</header>
-<hr />
-<ul>
-<li><a href="#toc1">Introduction</a></li>
-<li><a href="#toc2">Commands</a>
-<ul>
-<li><a href="#toc3">Grammar</a></li>
-<li><a href="#toc4">Parsing</a></li>
-<li><a href="#toc5">Linearization</a></li>
-<li><a href="#toc6">Translation</a></li>
-<li><a href="#toc7">Random Generation</a></li>
-<li><a href="#toc8">Word Completion</a></li>
-<li><a href="#toc9">Abstract Syntax Tree Visualization</a></li>
-<li><a href="#toc10">Parse Tree Visualization</a></li>
-<li><a href="#toc11">Word Alignment Diagrams</a></li>
-<li><a href="#toc12">Word Dependency Diagrams</a></li>
-<li><a href="#toc13">Undocumented commands</a></li>
-</ul></li>
-<li><a href="#toc14">Commands that use the C run-time system</a></li>
-</ul>
-<hr />
-<div id="toc1">
-
-</div>
-<h2 id="introduction">Introduction</h2>
-<p>The PGF API is available as Web Service through the built-in HTTP
-server in the main GF executable. It is activated by starting GF with
-the <code>-server</code> flag:</p>
-<pre><code>  $ gf -server
-  This is GF version 3.8.
-  Document root = /usr/share/gf-3.8/www
-  Starting HTTP server, open http://localhost:41296/ in your web browser.</code></pre>
-<p>A compiled GF grammar (a <code>.pgf</code> file) can be used in web
-applications by placing it somewhere under the document root. When there
-is a request for access to a <code>.pgf</code> file, the GF web server
-will load and cache the grammar and interpret any parameters included in
-the URL (in the <em>url-encoded-query</em> format). The response you get
-back is usually a data structure in <a
-href="http://www.json.org/">JSON</a> format, but it could also be an
-image or plain text.</p>
-<p>For example, if <code>my_grammar.pgf</code> is a grammar placed
-directly under the document root, then the grammar could be accessed
-using this URL:</p>
-<pre><code>  http://localhost:41296/my_grammar.pgf</code></pre>
-<p>The default when no parameters are included in the URL is a response
-with some general information about the grammar, encoded in JSON format.
-To perform specific command you have to tell what command you want to
-perform. The command is encoded in the parameter <code>command</code>,
-i.e.:</p>
-<p><code>http://localhost/my_grammar.pgf?command=</code><em>cmd</em></p>
-<p>where <em>cmd</em> is the name of the command. Most commands require
-additional arguments, which are encoded as parameters as well. The
-supported commands and their arguments are described below.</p>
-<div id="toc2">
-
-</div>
-<h2 id="commands">Commands</h2>
-<hr />
-<div id="toc3">
-
-</div>
-<h3 id="grammar">Grammar</h3>
-<p>This command provides some general information about the grammar.
-This command is also executed if no `command` parameter is given.</p>
-<h5 id="input">Input</h5>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th style="text-align: center;">Parameter</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td style="text-align: center;">command</td>
-<td>should be <code>grammar</code></td>
-<td>-</td>
-</tr>
-</tbody>
-</table>
-<h5 id="output">Output</h5>
-<p>A JSON object including the following fields:</p>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Field</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>name</code></td>
-<td>the name of the abstract syntax in the grammar</td>
-</tr>
-<tr class="even">
-<td><code>userLanguage</code></td>
-<td>the concrete language in the grammar which best matches the default
-language set in the user's browser</td>
-</tr>
-<tr class="odd">
-<td><code>categories</code></td>
-<td>list of all abstract syntax categories defined in the grammar</td>
-</tr>
-<tr class="even">
-<td><code>functions</code></td>
-<td>list of all abstract syntax functions defined in the grammar</td>
-</tr>
-<tr class="odd">
-<td><code>languages</code></td>
-<td>list of concrete languages available in the grammar</td>
-</tr>
-</tbody>
-</table>
-<p>Every language is described with object having this two fields:</p>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Field</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>name</code></td>
-<td>the name of the concrete syntax for the language</td>
-</tr>
-<tr class="even">
-<td><code>languageCode</code></td>
-<td>the two-character language code according to the <a
-href="http://www.loc.gov/standards/iso639-2/php/code_list.php">ISO
-standard</a> i.e. <code>en</code> for English, <code>bg</code> for
-Bulgarian, etc.</td>
-</tr>
-</tbody>
-</table>
-<p>The language codes need to be specified in the grammar with
-<code>flags language=...</code>. The web service receives the code of
-the language set in the browser and compares it with the codes defined
-in the grammar. If there is a match then the service returns the
-corresponding concrete syntax name. If no match is found then the first
-language in alphabetical order is returned.</p>
-<hr />
-<div id="toc4">
-
-</div>
-<h3 id="parsing">Parsing</h3>
-<p>This command parses a string and returns a list of abstract syntax
-trees.</p>
-<h4 id="input-1">Input</h4>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Parameter</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>command</code></td>
-<td>should be <code>parse</code></td>
-<td>-</td>
-</tr>
-<tr class="even">
-<td><code>cat</code></td>
-<td>the start category for the parser</td>
-<td>the default start category for the grammar</td>
-</tr>
-<tr class="odd">
-<td><code>input</code></td>
-<td>the string to be parsed</td>
-<td>empty string</td>
-</tr>
-<tr class="even">
-<td><code>from</code></td>
-<td>the name of the concrete syntax to use for parsing</td>
-<td>all languages in the grammar will be tried</td>
-</tr>
-<tr class="odd">
-<td><code>limit</code></td>
-<td>limit how many trees are returned (gf&gt;3.3.3)</td>
-<td>no limit is applied</td>
-</tr>
-</tbody>
-</table>
-<h4 id="output-1">Output</h4>
-<p>List of objects where every object represents the analyzes for every
-input language. The objects have three fields:</p>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Field</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>from</code></td>
-<td>the concrete language used in the parsing</td>
-</tr>
-<tr class="even">
-<td><code>brackets</code></td>
-<td>the bracketed string from the parser</td>
-</tr>
-<tr class="odd">
-<td><code>trees</code></td>
-<td>list of abstract syntax trees</td>
-</tr>
-<tr class="even">
-<td><code>typeErrors</code></td>
-<td>list of errors from the type checker</td>
-</tr>
-</tbody>
-</table>
-<p>The abstract syntax trees are sent as plain strings. The type errors
-are objects with two fields:</p>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Field</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>fid</code></td>
-<td>forest id which points to a bracket in the bracketed string where
-the error occurs</td>
-</tr>
-<tr class="even">
-<td><code>msg</code></td>
-<td>the text message for the error</td>
-</tr>
-</tbody>
-</table>
-<p>The current implementation either returns a list of abstract syntax
-trees or a list of type errors. By checking whether the field trees is
-not null we check whether the type checking was successful.</p>
-<hr />
-<div id="toc5">
-
-</div>
-<h3 id="linearization">Linearization</h3>
-<p>The command takes an abstract syntax tree and produces string in the
-specified language(s).</p>
-<h4 id="input-2">Input</h4>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Parameter</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>command</code></td>
-<td>should be <code>linearize</code></td>
-<td>-</td>
-</tr>
-<tr class="even">
-<td><code>tree</code></td>
-<td>the abstract syntax tree to linearize</td>
-<td>-</td>
-</tr>
-<tr class="odd">
-<td><code>to</code></td>
-<td>the name of the concrete syntax to use in the linearization</td>
-<td>linearizations for all languages in the grammar will be
-generated</td>
-</tr>
-</tbody>
-</table>
-<h4 id="output-2">Output</h4>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Field</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>to</code></td>
-<td>the concrete language used for the linearization</td>
-</tr>
-<tr class="even">
-<td><code>tree</code></td>
-<td>the output text</td>
-</tr>
-</tbody>
-</table>
-<hr />
-<div id="toc6">
-
-</div>
-<h3 id="translation">Translation</h3>
-<p>The translation is a two step process. First the input sentence is
-parsed with the source language and after that the output sentence(s)
-are produced via linearization with the target language(s). For that
-reason the input and the output for this command is the union of the
-input/output of the commands for parsing and the one for
-linearization.</p>
-<h4 id="input-3">Input</h4>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Parameter</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>command</code></td>
-<td>should be <code>translate</code></td>
-<td>-</td>
-</tr>
-<tr class="even">
-<td><code>cat</code></td>
-<td>the start category for the parser</td>
-<td>the default start category for the grammar</td>
-</tr>
-<tr class="odd">
-<td><code>input</code></td>
-<td>the input string to be translated</td>
-<td>empty string</td>
-</tr>
-<tr class="even">
-<td><code>from</code></td>
-<td>the source language</td>
-<td>all languages in the grammar will be tried</td>
-</tr>
-<tr class="odd">
-<td><code>to</code></td>
-<td>the target language</td>
-<td>linearizations for all languages in the grammar will be
-generated</td>
-</tr>
-<tr class="even">
-<td><code>limit</code></td>
-<td>limit how many parse trees are used (gf&gt;3.3.3)</td>
-<td>no limit is applied</td>
-</tr>
-</tbody>
-</table>
-<h4 id="output-3">Output</h4>
-<p>The output is a list of objects with these fields:</p>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Field</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>from</code></td>
-<td>the concrete language used in the parsing</td>
-</tr>
-<tr class="even">
-<td><code>brackets</code></td>
-<td>the bracketed string from the parser</td>
-</tr>
-<tr class="odd">
-<td><code>translations</code></td>
-<td>list of translations</td>
-</tr>
-<tr class="even">
-<td><code>typeErrors</code></td>
-<td>list of errors from the type checker</td>
-</tr>
-</tbody>
-</table>
-<p>Every translation is an object with two fields:</p>
-<table class="table" data-border="1" data-cellpadding="4">
-<tbody>
-<tr class="odd">
-<td><code>tree</code></td>
-<td>abstract syntax tree</td>
-</tr>
-<tr class="even">
-<td><code>linearizations</code></td>
-<td>list of linearizations</td>
-</tr>
-</tbody>
-</table>
-<p>Every linearization is an object with two fields:</p>
-<table class="table" data-border="1" data-cellpadding="4">
-<tbody>
-<tr class="odd">
-<td>Field</td>
-<td>Description</td>
-</tr>
-<tr class="even">
-<td><code>to</code></td>
-<td>the concrete language used in the linearization</td>
-</tr>
-<tr class="odd">
-<td><code>text</code></td>
-<td>the sentence produced</td>
-</tr>
-</tbody>
-</table>
-<p>The type errors are objects with two fields:</p>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Field</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>fid</code></td>
-<td>forest id which points to a bracket in the bracketed string where
-the error occurs</td>
-</tr>
-<tr class="even">
-<td><code>msg</code></td>
-<td>the text message for the error</td>
-</tr>
-</tbody>
-</table>
-<p>The current implementation either returns a list of translations or a
-list of type errors. By checking whether the field translations is not
-null we check whether the type checking was successful.</p>
-<hr />
-<div id="toc7">
-
-</div>
-<h3 id="random-generation">Random Generation</h3>
-<p>This command generates random abstract syntax tree where the
-top-level function will be of the specified category. The categories for
-the sub-trees will be determined by the type signatures of the parent
-function.</p>
-<h4 id="input-4">Input</h4>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Parameter</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>command</code></td>
-<td>should be <code>random</code></td>
-<td>-</td>
-</tr>
-<tr class="even">
-<td><code>cat</code></td>
-<td>the start category for the generator</td>
-<td>the default start category for the grammar</td>
-</tr>
-<tr class="odd">
-<td><code>limit</code></td>
-<td>maximal number of trees generated</td>
-<td>1</td>
-</tr>
-</tbody>
-</table>
-<h4 id="output-4">Output</h4>
-<p>The output is a list of objects with only one field:</p>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Field</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>tree</code></td>
-<td>the generated abstract syntax tree</td>
-</tr>
-</tbody>
-</table>
-<p>The length of the list is limited by the limit parameter.</p>
-<hr />
-<div id="toc8">
-
-</div>
-<h3 id="word-completion">Word Completion</h3>
-<p>Word completion is a special case of parsing. If there is an
-incomplete sentence then it is first parsed and after that the state of
-the parse chart is used to predict the set of words that could follow in
-a grammatically correct sentence.</p>
-<h4 id="input-5">Input</h4>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Parameter</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>command</code></td>
-<td>should be <code>complete</code></td>
-<td>-</td>
-</tr>
-<tr class="even">
-<td><code>cat</code></td>
-<td>the start category for the parser</td>
-<td>the default start category for the grammar</td>
-</tr>
-<tr class="odd">
-<td><code>input</code></td>
-<td>the string to the left of the cursor that is already typed</td>
-<td>empty string</td>
-</tr>
-<tr class="even">
-<td><code>from</code></td>
-<td>the name of the concrete syntax to use for parsing</td>
-<td>all languages in the grammar will be tried</td>
-</tr>
-<tr class="odd">
-<td><code>limit</code></td>
-<td>maximal number of trees generated</td>
-<td>all words will be returned</td>
-</tr>
-</tbody>
-</table>
-<h4 id="output-5">Output</h4>
-<p>The output is a list of objects with two fields which describe the
-completions.</p>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Field</th>
-<th>Description</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>from</code></td>
-<td>the concrete syntax for this word</td>
-</tr>
-<tr class="even">
-<td><code>text</code></td>
-<td>the word itself</td>
-</tr>
-</tbody>
-</table>
-<hr />
-<div id="toc9">
-
-</div>
-<h3 id="abstract-syntax-tree-visualization">Abstract Syntax Tree
-Visualization</h3>
-<p>This command renders an abstract syntax tree into an image. Several
-image formats are supported.</p>
-<h4 id="input-6">Input</h4>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Parameter</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>command</code></td>
-<td>should be <code>abstrtree</code></td>
-<td>-</td>
-</tr>
-<tr class="even">
-<td><code>tree</code></td>
-<td>the abstract syntax tree to render</td>
-<td>-</td>
-</tr>
-<tr class="odd">
-<td><code>format</code></td>
-<td>output format (gf&gt;3.3.3)</td>
-<td><code>png</code></td>
-</tr>
-</tbody>
-</table>
-<h4 id="output-6">Output</h4>
-<p>By default, the output is an image in PNG format. The Content-Type is
-set to <code>image/png</code>, so the easiest way to visualize the
-generated image is to add HTML element <code>&lt;img/&gt;</code> which
-points to URL for the visualization command i.e.:</p>
-<pre><code>  &lt;img src=&quot;http://localhost/my_grammar.pgf?command=abstrtree&amp;tree=...&quot;/&gt;</code></pre>
-<p>The <code>format</code> parameter can also be <code>gif</code>,
-<code>svg</code> or <code>gv</code>, for GIF (<code>image/gif</code>),
-SVG (<code>image/svg+xml</code>) or graphviz (<code>text/plain</code>)
-format, respectively.</p>
-<hr />
-<div id="toc10">
-
-</div>
-<h3 id="parse-tree-visualization">Parse Tree Visualization</h3>
-<p>This command renders the parse tree that corresponds to a specific
-abstract syntax tree. The generated image is in PNG format.</p>
-<h4 id="input-7">Input</h4>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Parameter</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>command</code></td>
-<td>should be <code>parsetree</code></td>
-<td>-</td>
-</tr>
-<tr class="even">
-<td><code>tree</code></td>
-<td>the abstract syntax tree to render</td>
-<td>-</td>
-</tr>
-<tr class="odd">
-<td><code>from</code></td>
-<td>the name of the concrete syntax to use in the rendering</td>
-<td>-</td>
-</tr>
-<tr class="even">
-<td><code>format</code></td>
-<td>output format (gf&gt;3.3.3)</td>
-<td><code>png</code></td>
-</tr>
-<tr class="odd">
-<td><em>options</em></td>
-<td>additional rendering options (gf&gt;3.4)</td>
-<td>-</td>
-</tr>
-</tbody>
-</table>
-<p>The additioal rendering options are: <code>noleaves</code>,
-<code>nofun</code> and <code>nocat</code> (booleans, false by default);
-<code>nodefont</code>, <code>leaffont</code>, <code>nodecolor</code>,
-<code>leafcolor</code>, <code>nodeedgestyle</code> and
-<code>leafedgestyle</code> (strings, have builtin defaults).</p>
-<h4 id="output-7">Output</h4>
-<p>By default, the output is an image in PNG format. The Content-Type is
-set to <code>image/png</code>, so the easiest way to visualize the
-generated image is to add HTML element <code>&lt;img/&gt;</code> which
-points to URL for the visualization command i.e.:</p>
-<pre><code>  &lt;img src=&quot;http://localhost/my_grammar.pgf?command=parsetree&amp;tree=...&quot;/&gt;</code></pre>
-<p>The <code>format</code> parameter can also be <code>gif</code>,
-<code>svg</code> or <code>gv</code>, for GIF (<code>image/gif</code>),
-SVG (<code>image/svg+xml</code>) or graphviz (<code>text/plain</code>)
-format, respectively.</p>
-<hr />
-<div id="toc11">
-
-</div>
-<h3 id="word-alignment-diagrams">Word Alignment Diagrams</h3>
-<p>This command renders the word alignment diagram for some sentence and
-all languages in the grammar. The sentence is generated from a given
-abstract syntax tree.</p>
-<h4 id="input-8">Input</h4>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Parameter</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>command</code></td>
-<td>should be <code>alignment</code></td>
-<td>-</td>
-</tr>
-<tr class="even">
-<td><code>tree</code></td>
-<td>the abstract syntax tree to render</td>
-<td>-</td>
-</tr>
-<tr class="odd">
-<td><code>format</code></td>
-<td>output format (gf&gt;3.3.3)</td>
-<td><code>png</code></td>
-</tr>
-<tr class="even">
-<td><code>to</code></td>
-<td>list of languages to include in the diagram (gf&gt;3.4)</td>
-<td>all languages supported by the grammar</td>
-</tr>
-</tbody>
-</table>
-<h4 id="output-8">Output</h4>
-<p>By default, the output is an image in PNG format. The Content-Ttype
-is set to <code>image/png</code>, so the easiest way to visualize the
-generated image is to add HTML element <code>&lt;img/&gt;</code> which
-points to URL for the visualization command i.e.:</p>
-<pre><code>  &lt;img src=&quot;http://localhost/my_grammar.pgf?command=alignment&amp;tree=...&quot;/&gt;</code></pre>
-<p>The <code>format</code> parameter can also be <code>gif</code>,
-<code>svg</code> or <code>gv</code>, for GIF (<code>image/gif</code>),
-SVG (<code>image/svg+xml</code>) or graphviz (<code>text/plain</code>)
-format, respectively.</p>
-<hr />
-<div id="toc12">
-
-</div>
-<h3 id="word-dependency-diagrams">Word Dependency Diagrams</h3>
-<p>This command (available in GF&gt;=3.8) outputs word dependency
-diagrams in various format.</p>
-<h4 id="input-9">Input</h4>
-<table class="table" data-border="1" data-cellpadding="4">
-<thead>
-<tr class="header">
-<th>Parameter</th>
-<th>Description</th>
-<th>Default</th>
-</tr>
-</thead>
-<tbody>
-<tr class="odd">
-<td><code>command</code></td>
-<td>should be <code>deptree</code></td>
-<td>-</td>
-</tr>
-<tr class="even">
-<td><code>tree</code></td>
-<td>the abstract syntax tree to render</td>
-<td>-</td>
-</tr>
-<tr class="odd">
-<td><code>format</code></td>
-<td>output format, see below</td>
-<td><code>dot</code></td>
-</tr>
-<tr class="even">
-<td><code>to</code></td>
-<td>name of the concrete syntax to use in the diagram</td>
-<td>-</td>
-</tr>
-</tbody>
-</table>
-<p>The <code>format</code> is one of the following:</p>
-<ul>
-<li><code>png</code>, <code>gif</code>, <code>gv</code>: rendered with
-graphviz,</li>
-<li><code>svg</code>, <code>latex</code>: <a
-href="http://universaldependencies.org/">universal dependency</a>
-diagrams, in SVG format for use in web pages or as LaTeX Picture code
-for use in LaTeX documents,</li>
-<li><code>conll</code>, <code>malt_tab</code> and
-<code>malt_input</code>: text formats</li>
-</ul>
-<hr />
-<div id="toc13">
-
-</div>
-<h3 id="undocumented-commands">Undocumented commands</h3>
-<p>There a few additional commands that lack proper documentation:</p>
-<ul>
-<li><code>abstrjson</code>, <code>browse</code>, <code>download</code>,
-<code>generate</code>, <code>linearizeAll</code>,
-<code>linearizeTable</code>, <code>lookupmorpho</code>,
-<code>translategroup</code>.</li>
-</ul>
-<p>See the source code for details.</p>
-<hr />
-<div id="toc14">
-
-</div>
-<h2 id="commands-that-use-the-c-run-time-system">Commands that use the C
-run-time system</h2>
-<p>GF includes two implementations of the PGF API: the traditional
-Haskell implementation and the newer C implementation. The commands
-documented above all use the Haskell implementation. The following
-commands use the C implementation instead:</p>
-<ul>
-<li><code>c-parse</code>, <code>c-linearize</code>,
-<code>c-linearizeAll</code>, <code>c-translate</code>,
-<code>c-lookupmorpho</code>, <code>c-flush</code>,
-<code>c-grammar</code>, <code>c-abstrtree</code>,
-<code>c-parsetree</code>, <code>c-wordforword</code>.</li>
-</ul>
-<p>They implement the same functionality as the corresponding commands
-without the <code>c-</code> prefix, although there are some restrictions
-in what parameters they support, and some differences in the JSON data
-structures they output.</p>
-<p>When using these commands, the grammar will be loaded and cached by
-the C run-time system. If you use commands from both the Haskell and C
-implementations with the same grammar, the grammar will be loaded
-twice.</p>
-<hr />
-<p><a
-href="http://www.grammaticalframework.org">www.grammaticalframework.org</a></p>
-</div><!-- .container -->
-</div><!-- .bg-white -->
-
-<footer class="py-5">
-  <div class="container">
-    <div class="row">
-
-      <div class="col-6 col-sm-3">
-        <a href="../..">
-          <i class="fas fa-home"></i>
-          Home
-        </a>
-        <h6 class="text-muted mt-3">Get started</h6>
-        <ul class="list-unstyled">
-          <li><a href="https://www.youtube.com/watch?v=x1LFbDQhbso">Google Tech Talk</a></li>
-          <li><a href="http://cloud.grammaticalframework.org/">GF Cloud</a></li>
-          <li>
-            <a href="../../doc/tutorial/gf-tutorial.html">Tutorial</a>
-             ·
-            <a href="../../lib/doc/rgl-tutorial/index.html">RGL Tutorial</a>
-          </li>
-          <li><a href="../../doc/gf-video-tutorials.html">Video Tutorials</a></li>
-          <li><a href="../../download"><strong>Download GF</strong></a></li>
-        </ul>
-      </div>
-
-      <div class="col-6 col-sm-3">
-        <h6 class="text-muted">Learn more</h6>
-        <ul class="list-unstyled">
-          <li><a href="../../gf-book">The GF Book</a></li>
-          <li><a href="../../doc/gf-refman.html">Reference Manual</a></li>
-          <li><a href="../../doc/gf-shell-reference.html">GF Shell Reference</a></li>
-          <li><a href="http://www.molto-project.eu/sites/default/files/MOLTO_D2.3.pdf">Best Practices</a></li>
-          <li><a href="../../lib/doc/synopsis/index.html"><strong>RGL Synopsis</strong></a></li>
-        </ul>
-      </div>
-
-      <div class="col-6 col-sm-3">
-        <h6 class="text-muted">Develop</h6>
-        <ul class="list-unstyled">
-          <li><a href="../../doc/gf-developers.html">Developers Guide</a></li>
-          <li><a href="http://hackage.haskell.org/package/gf/docs/PGF.html">PGF library API (Haskell runtime)</a></li>
-          <li><a href="../../doc/runtime-api.html">PGF library API (C runtime)</a></li>
-          <li><a href="http://hackage.haskell.org/package/gf/docs/GF.html">GF compiler API</a></li>
-          <li><a href="../../doc/gf-editor-modes.html">Text Editor Support</a></li>
-        </ul>
-      </div>
-
-      <div class="col-6 col-sm-3">
-        <h6 class="text-muted">Contribute</h6>
-        <ul class="list-unstyled">
-          <li><a href="http://groups.google.com/group/gf-dev">Mailing List</a></li>
-          <li><a href="https://github.com/GrammaticalFramework/gf-core/issues">Issue Tracker</a></li>
-          <li><a href="../../doc/gf-people.html">Authors</a></li>
-          <li><a href="http://school.grammaticalframework.org/2018/">Summer School</a></li>
-        </ul>
-        <h6 class="text-muted">
-          Repositories
-          <i class="fab fa-github ml-1"></i>
-        </h6>
-        <a href="https://github.com/GrammaticalFramework/gf-core">GF</a> ·
-        <a href="https://github.com/GrammaticalFramework/gf-rgl">RGL</a> ·
-        <a href="https://github.com/GrammaticalFramework/gf-contrib">Contributions</a>
-      </div>
-    </div>
-  </div>
-</footer>
-<script type="text/javascript">
-var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
-document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
-</script>
-<script type="text/javascript">
-try {
-var pageTracker = _gat._getTracker("UA-7811807-3");
-pageTracker._trackPageview();
-} catch(err) {}</script>
-</body>
-</html>
