From 2f979bf83bad9b012efa225c38cfcd7ea91b2b29 Mon Sep 17 00:00:00 2001 From: "simonpj@microsoft.com" Date: Thu, 14 Aug 2008 15:26:48 +0000 Subject: [PATCH] Improve -fwarn-orphans documentation (thanks to Tim) --- docs/users_guide/separate_compilation.xml | 8 +++++++- docs/users_guide/using.xml | 3 ++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/docs/users_guide/separate_compilation.xml b/docs/users_guide/separate_compilation.xml index bc3afca..01748ae 100644 --- a/docs/users_guide/separate_compilation.xml +++ b/docs/users_guide/separate_compilation.xml @@ -1247,7 +1247,13 @@ These considerations lead to the following definition of an orphan module: -GHC will warn you if you are creating an orphan module, if you add `-fwarn-orphan-modules`. +If you use the flag , GHC will warn you +if you are creating an orphan module. +Like any warning, you can switch the warning off with , +and +will make the compilation fail if the warning is issued. + + You can identify an orphan module by looking in its interface file, M.hi, using the mode. If there is a [orphan module] on the diff --git a/docs/users_guide/using.xml b/docs/users_guide/using.xml index 4b3024a..e26cbdd 100644 --- a/docs/users_guide/using.xml +++ b/docs/users_guide/using.xml @@ -1179,7 +1179,8 @@ f foo = foo { x = 6 } The trouble with orphans is that GHC must pro-actively read the interface files for all orphan modules, just in case their instances or rules play a role, whether or not the module's interface would otherwise - be of any use. Other things being equal, avoid orphan modules. + be of any use. See for details. + -- 1.7.10.4