[Document SOURCE pragma; clarify TH behavior for mutually-recurive modules (Trac #1012) simonpj@microsoft.com**20080104121939] { hunk ./docs/users_guide/glasgow_exts.xml 5003 - Furthermore, you can only run a function at compile time if it is imported + You can only run a function at compile time if it is imported hunk ./docs/users_guide/glasgow_exts.xml 5005 - that includes the module currently being compiled. For example, when compiling module A, + that includes the module currently being compiled. Furthermore, all of the modules of + the mutually-recursive group must be reachable by non-SOURCE imports from the module where the + splice is to be run. + + For example, when compiling module A, hunk ./docs/users_guide/glasgow_exts.xml 6381 - Multi-level unpacking is also supported: + Multi-level unpacking is also supported: hunk ./docs/users_guide/glasgow_exts.xml 6388 - will store two unboxed Int#s + will store two unboxed Int#s hunk ./docs/users_guide/glasgow_exts.xml 6402 + + SOURCE pragma + + SOURCE + The {-# SOURCE #-} pragma is used only in import declarations, + to break a module loop. It is described in detail in . + + + hunk ./docs/users_guide/separate_compilation.xml 705 -circular dependency. For every module A.hs that is {-# SOURCE #-}-imported +circular dependency. Every loop in the module import graph must be broken by a {-# SOURCE #-} import; +or, equivalently, the module import graph must be acyclic if {-# SOURCE #-} imports are ignored. + +For every module A.hs that is {-# SOURCE #-}-imported }