From 9b1dbf2663d88b696c80e8e0f2e7f58e9c80d3f1 Mon Sep 17 00:00:00 2001 From: Simon Marlow Date: Tue, 20 Feb 2007 13:25:32 +0000 Subject: [PATCH] describe the Z-encoding for __stginit symbol names (addresses #1014) --- docs/users_guide/ffi-chap.xml | 36 +++++++++++++++++++++++++++++++++++- 1 file changed, 35 insertions(+), 1 deletion(-) 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 -- 1.7.10.4