From: Simon Marlow Date: Tue, 20 Feb 2007 13:25:32 +0000 (+0000) Subject: describe the Z-encoding for __stginit symbol names (addresses #1014) X-Git-Url: http://git.megacz.com/?p=ghc-hetmet.git;a=commitdiff_plain;h=9b1dbf2663d88b696c80e8e0f2e7f58e9c80d3f1 describe the Z-encoding for __stginit symbol names (addresses #1014) --- diff --git a/docs/users_guide/ffi-chap.xml b/docs/users_guide/ffi-chap.xml index 8928ea8..82f3899 100644 --- a/docs/users_guide/ffi-chap.xml +++ b/docs/users_guide/ffi-chap.xml @@ -214,7 +214,41 @@ int main(int argc, char *argv[]) M is __stginit_M, and it may be declared as an external function symbol as in the - code above. + code above. Note that the symbol name should be transformed + according to the Z-encoding: + + + + + + Character + Replacement + + + + + . + zd + + + _ + zu + + + ` + zq + + + Z + ZZ + + + z + zz + + + + After we've finished invoking our Haskell functions, we can call hs_exit(), which