[project @ 2001-11-16 15:33:53 by simonpj]
authorsimonpj <unknown>
Fri, 16 Nov 2001 15:33:53 +0000 (15:33 +0000)
committersimonpj <unknown>
Fri, 16 Nov 2001 15:33:53 +0000 (15:33 +0000)
Correct docs about SPECIALIZE instance; MERGE TO STABLE

ghc/docs/users_guide/glasgow_exts.sgml

index da5c497..20d164d 100644 (file)
@@ -2627,12 +2627,17 @@ i2d (I# i) = D# (int2Double# i) -- uses Glasgow prim-op directly
 Same idea, except for instance declarations.  For example:
 
 <programlisting>
-instance (Eq a) => Eq (Foo a) where { ... usual stuff ... }
-
-{-# SPECIALIZE instance Eq (Foo [(Int, Bar)] #-}
+instance (Eq a) => Eq (Foo a) where { 
+   {-# SPECIALIZE instance Eq (Foo [(Int, Bar)]) #-}
+   ... usual stuff ...
+ }
 </programlisting>
-
-Compatible with HBC, by the way.
+The pragma must occur inside the <literal>where</literal> part
+of the instance declaration.
+</para>
+<para>
+Compatible with HBC, by the way, except perhaps in the placement
+of the pragma.
 </para>
 
 </sect2>