From: simonpj Date: Fri, 26 Nov 2004 13:42:21 +0000 (+0000) Subject: [project @ 2004-11-26 13:42:21 by simonpj] X-Git-Tag: Initial_conversion_from_CVS_complete~1395 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;h=114455e66913c7a172bb1c4e7da5f070443745ea;p=ghc-hetmet.git [project @ 2004-11-26 13:42:21 by simonpj] More about hi-boot files --- diff --git a/ghc/docs/users_guide/separate_compilation.xml b/ghc/docs/users_guide/separate_compilation.xml index 8329df4..9a6b7e3 100644 --- a/ghc/docs/users_guide/separate_compilation.xml +++ b/ghc/docs/users_guide/separate_compilation.xml @@ -974,9 +974,9 @@ newtype GHC.IOBase.IO a Only data, type, newtype, class, and type signature declarations may be included. You cannot declare - instances or derive them automatically. - - + instances or derive them automatically with + a deriving clause. + For data or newtype declaration, you may omit all the constructors, by omitting the '=' and everything that follows it: @@ -1004,9 +1004,16 @@ module A where but you must do so in hi-boot files.) - For class declaration, you may not specify any class -operations. We could lift this restriction if it became tiresome. - + + In a class declararation, you may not specify any class operations; that is, + there can be no where part. If you want to use the class operations in a recursive + way, declare them in the hi-boot file with separate, overloaded type signatures, thus: + + class Num a + (+) :: Num a => a -> a -> a + + + If M.hi-boot mentions an entity N.f, defined in some other