From b35299a5bc8b15717684741d723a57c3be043885 Mon Sep 17 00:00:00 2001 From: simonpj Date: Thu, 17 Mar 2005 10:29:46 +0000 Subject: [PATCH] [project @ 2005-03-17 10:29:46 by simonpj] Clarify hs-boot docs --- ghc/docs/users_guide/separate_compilation.xml | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) 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 -- 1.7.10.4