summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorsimonpj@microsoft.com <unknown>2007-01-31 09:14:51 +0000
committersimonpj@microsoft.com <unknown>2007-01-31 09:14:51 +0000
commit2c953bfaae37b427b71cbe20f0ceeda4c1d6f00f (patch)
tree37e3ac2b9af8d65fb781f5b199bc3053f54625d6 /docs
parent3bec818f91e382b882f8de4bdab8036884eb657f (diff)
downloadhaskell-2c953bfaae37b427b71cbe20f0ceeda4c1d6f00f.tar.gz
Add note about Template Haskell and mutual recursion
Diffstat (limited to 'docs')
-rw-r--r--docs/users_guide/glasgow_exts.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 0c3b07cb6c..fb2124e7fb 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -4226,6 +4226,14 @@ Tim Sheard is going to expand it.)
(It would make sense to do so, but it's hard to implement.)
</para></listitem>
+ <listitem><para>
+ Furthermore, the you can only run a function at compile time if it is imported
+ from another module <emphasis> that is not part of a mutually-recursive group of modules
+ that includes the module currently being compiled</emphasis>. For example, when compiling module A,
+ you can only run Template Haskell functions imported from B if B does not import A (directly or indirectly).
+ The reason should be clear: to run B we must compile and run A, but we are currently type-checking A.
+ </para></listitem>
+
<listitem><para>
The flag <literal>-ddump-splices</literal> shows the expansion of all top-level splices as they happen.
</para></listitem>