[commit: ghc] master: Mention that the user has to import GHC.Exts for Constraint (5c904ba)

git at git.haskell.org git at git.haskell.org
Sun Nov 24 19:38:39 UTC 2013


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/5c904ba055147e0a71d5b200c8886ef0b1a47794/ghc

>---------------------------------------------------------------

commit 5c904ba055147e0a71d5b200c8886ef0b1a47794
Author: Joachim Breitner <mail at joachim-breitner.de>
Date:   Sun Nov 24 19:38:08 2013 +0000

    Mention that the user has to import GHC.Exts for Constraint
    
    (required judging from confusion on #haskell right now.)


>---------------------------------------------------------------

5c904ba055147e0a71d5b200c8886ef0b1a47794
 docs/users_guide/glasgow_exts.xml |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/docs/users_guide/glasgow_exts.xml b/docs/users_guide/glasgow_exts.xml
index 5c4b091..1366197 100644
--- a/docs/users_guide/glasgow_exts.xml
+++ b/docs/users_guide/glasgow_exts.xml
@@ -6387,9 +6387,10 @@ class (F a ~ b) => C a b where
 			type <literal>(Show a, Ord a)</literal> is of kind <literal>Constraint</literal>.
 		</listitem>
 		<listitem>
-			Anything whose form is not yet know, but the user has declared to have kind <literal>Constraint</literal>.
-			So for example <literal>type Foo (f :: * -> Constraint) = forall b. f b => b -> b</literal> is allowed, as
-			well as examples involving type families:
+			Anything whose form is not yet know, but the user has declared to have kind <literal>Constraint</literal>
+			(for which they need to import it from <literal>GHC.Exts</literal>).  So for example
+			<literal>type Foo (f :: * -> Constraint) = forall b. f b => b -> b</literal> is allowed, as well as
+			examples involving type families:
 <programlisting>
 type family Typ a b :: Constraint
 type instance Typ Int  b = Show b



More information about the ghc-commits mailing list