From: simonpj Date: Thu, 17 Mar 2005 10:29:46 +0000 (+0000) Subject: [project @ 2005-03-17 10:29:46 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~894 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=b35299a5bc8b15717684741d723a57c3be043885;hp=9061a6970741d6a5574b8a558ce46064e661259f;p=ghc-hetmet.git [project @ 2005-03-17 10:29:46 by simonpj] Clarify hs-boot docs --- diff --git a/ghc/docs/users_guide/separate_compilation.xml b/ghc/docs/users_guide/separate_compilation.xml index ecb843f..f750128 100644 --- a/ghc/docs/users_guide/separate_compilation.xml +++ b/ghc/docs/users_guide/separate_compilation.xml @@ -715,8 +715,16 @@ When a hs-boot file A.hs-boot If hs-boot files are considered distinct from their parent source files, and if a {-# SOURCE #-} import is considered to refer to the - hs-boot file, then the module import graph must have no cycles. The ghc -M - will report an error if a cycle is found. + hs-boot file, then the module import graph must have no cycles. The command + ghc -M will report an error if a cycle is found. + + + Every module that is + {-# SOURCE #-}-imported in a program must also be ordinarily imported (or + else be one of the root modules). To put it another way, if M.hs-boot is + reachable in the import graph, then M.hs must also be reachable. + The command ghc --make will report an error if this + condition is not satisfied. @@ -726,7 +734,7 @@ A hs-boot file need only contain the bare started. For example, it doesn't need to contain declarations for everything that module A exports, only the things required by the - module that imports A recursively. + module(s) that import A recursively. A hs-boot file is written in a subset of Haskell: The module header (including the export list), and import statements, are exactly as in