Commit 9b1dbf26 authored by Simon Marlow's avatar Simon Marlow

describe the Z-encoding for __stginit symbol names (addresses #1014)

parent 3f82e352
...@@ -214,7 +214,41 @@ int main(int argc, char *argv[]) ...@@ -214,7 +214,41 @@ int main(int argc, char *argv[])
<replaceable>M</replaceable> is <replaceable>M</replaceable> is
<literal>__stginit_<replaceable>M</replaceable></literal>, and <literal>__stginit_<replaceable>M</replaceable></literal>, and
it may be declared as an external function symbol as in the it may be declared as an external function symbol as in the
code above.</para> code above. Note that the symbol name should be transformed
according to the Z-encoding:</para>
<informaltable>
<tgroup cols="2" align="left" colsep="1" rowsep="1">
<thead>
<row>
<entry>Character</entry>
<entry>Replacement</entry>
</row>
</thead>
<tbody>
<row>
<entry><literal>.</literal></entry>
<entry><literal>zd</literal></entry>
</row>
<row>
<entry><literal>_</literal></entry>
<entry><literal>zu</literal></entry>
</row>
<row>
<entry><literal>`</literal></entry>
<entry><literal>zq</literal></entry>
</row>
<row>
<entry><literal>Z</literal></entry>
<entry><literal>ZZ</literal></entry>
</row>
<row>
<entry><literal>z</literal></entry>
<entry><literal>zz</literal></entry>
</row>
</tbody>
</tgroup>
</informaltable>
<para>After we've finished invoking our Haskell functions, we <para>After we've finished invoking our Haskell functions, we
can call <literal>hs_exit()</literal>, which can call <literal>hs_exit()</literal>, which
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment