Commit 2ce9f3af authored by simonpj's avatar simonpj
Browse files

[project @ 2001-11-16 15:33:53 by simonpj]

Correct docs about SPECIALIZE instance; MERGE TO STABLE
parent 744e19be
......@@ -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>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment