From 29fd4389898bf80f58f3a936ce1319fff92f4cc2 Mon Sep 17 00:00:00 2001 From: simonpj Date: Tue, 24 Feb 2004 17:56:00 +0000 Subject: [PATCH] [project @ 2004-02-24 17:56:00 by simonpj] more hi-boot documentation --- ghc/docs/users_guide/separate_compilation.sgml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/ghc/docs/users_guide/separate_compilation.sgml b/ghc/docs/users_guide/separate_compilation.sgml index 262821e..3c20447 100644 --- a/ghc/docs/users_guide/separate_compilation.sgml +++ b/ghc/docs/users_guide/separate_compilation.sgml @@ -950,13 +950,12 @@ newtype GHC.IOBase.IO a For data or newtype declaration, you may omit all -the constructors, thus: +the constructors, by omitting the '=' and everything that follows it: module A where data TA - (You must write all the type parameters, but omit the - '=' and everything that follows it.) In a source program + In a source program this would declare TA to have no constructors (a GHC extension: see ), but in an hi-boot file it means "I don't know or care what the construtors are". This is the most common form of data type declaration, because it's easy to get right. @@ -969,6 +968,11 @@ module A where assumed that you express the outcome of this decision. (So in the cases where GHC decided not to unpack, you must not use the pragma.) Tread with care. + + Regardless of whether you write the constructors, you must write all the type parameters, + including their kinds + if they are not '*'. (You can give explicit kinds in source files too (), + but you must do so in hi-boot files.) For class declaration, you may not specify any class -- 1.7.10.4