From da6eff29907a1b3373a6bf1fe663dc2f057e67fe Mon Sep 17 00:00:00 2001 From: simonmar Date: Fri, 28 Jan 2005 14:41:09 +0000 Subject: [PATCH] [project @ 2005-01-28 14:41:09 by simonmar] Document {-# INCLUDE #-} --- ghc/docs/users_guide/glasgow_exts.xml | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/ghc/docs/users_guide/glasgow_exts.xml b/ghc/docs/users_guide/glasgow_exts.xml index 0e19d42..765ff85 100644 --- a/ghc/docs/users_guide/glasgow_exts.xml +++ b/ghc/docs/users_guide/glasgow_exts.xml @@ -4200,6 +4200,31 @@ Assertion failures can be caught, see the documentation for the . + + INCLUDE pragma + + The INCLUDE pragma is for specifying the names + of C header files that should be #include'd into + the C source code generated by the compiler for the current module (if + compiling via C). For example: + + +{-# INCLUDE "foo.h" #-} +{-# INCLUDE <stdio.h> #-} + + The INCLUDE pragma(s) must appear at the top of + your source file with any OPTIONS_GHC + pragma(s). + + An INCLUDE pragma is the preferred alternative + to the option (), because the + INCLUDE pragma is understood by other + compilers. Yet another alternative is to add the include file to each + foreign import declaration in your code, but we + don't recommend using this approach with GHC. + + INLINE and NOINLINE pragmas -- 1.7.10.4