From 9082111dcdbad7d161ecb0a08bb467f6c62e0a1b Mon Sep 17 00:00:00 2001 From: Richard Eisenberg Date: Mon, 5 Aug 2013 16:54:44 +0100 Subject: Added support for writing and checking closed type families is hs-boot files. As documented in the users' guide, you can now write type family Foo a where .. in a hs-boot file to declare an abstract closed type family. --- docs/users_guide/separate_compilation.xml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'docs/users_guide') diff --git a/docs/users_guide/separate_compilation.xml b/docs/users_guide/separate_compilation.xml index 44206f0948..84f6684307 100644 --- a/docs/users_guide/separate_compilation.xml +++ b/docs/users_guide/separate_compilation.xml @@ -836,7 +836,13 @@ values. For example: Fixity declarations are exactly as in Haskell. - Type synonym declarations are exactly as in Haskell. + Vanilla type synonym declarations are exactly as in Haskell. + Open type and data family declarations are exactly as in Haskell. + A closed type family may optionally omit its equations, as in the following example: + + type family ClosedFam a where .. + +The .. is meant literally -- you should write two dots in your file. Note that the where clause is still necessary to distinguish closed families from open ones. If you give any equations of a closed family, you must give all of them, in the same order as they appear in the accompanying Haskell file. A data type declaration can either be given in full, exactly as in Haskell, or it can be given abstractly, by omitting the '=' sign and everything that follows. For example: -- cgit v1.2.1