diff options
author | David Waern <davve@dtek.chalmers.se> | 2008-01-07 16:42:10 +0000 |
---|---|---|
committer | David Waern <davve@dtek.chalmers.se> | 2008-01-07 16:42:10 +0000 |
commit | d7f62d19a48aa70aba834eb0893fed5de6c118e6 (patch) | |
tree | 3723c1ca601b67a1d5355f1cebdc30626d3c37cf /doc | |
parent | 2e60299addd5c15f728afa8eb6e1e1c04aad58ea (diff) |
Remove the documenation section on derived instances
The problem mentioned there doesn't exist in Haddock 2.0.0.0
Diffstat (limited to 'doc')
-rw-r--r-- | doc/haddock.xml | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/doc/haddock.xml b/doc/haddock.xml index c78fb662..ba3cb3e0 100644 --- a/doc/haddock.xml +++ b/doc/haddock.xml @@ -1280,38 +1280,6 @@ import B point locally to <literal>C.T</literal>.</para> </section> - <section id="deriving"> - <title>Derived instances</title> - - <para>The <literal>deriving</literal> keyword in Haskell - presents a small problem for Haddock. Lacking a full type - system, Haddock has to figure out what the shape of the derived - instance is. There is currently a partial implementation of - this, but for some data types Haddock can't determine the shape - of the derived instance, and you see something like - “???” in the documentation.</para> - - <para>One workaround for this is to use CPP (<xref linkend="cpp" - />) to give Haddock explicit instance headers. Here is an - example from the OpenGL library:</para> - -<programlisting> -data VertexArrayDescriptor a = - VertexArrayDescriptor !NumComponents !DataType !Stride !(Ptr a) -#ifdef __HADDOCK__ --- Help Haddock a bit, because it doesn't do any instance inference. -instance Eq (VertexArrayDescriptor a) -instance Ord (VertexArrayDescriptor a) -instance Show (VertexArrayDescriptor a) -#else - deriving ( Eq, Ord, Show ) -#endif -</programlisting> - - <para>As a rule of thumb, try <literal>deriving</literal> first, - and if that doesn't work then use the above workaround.</para> - </section> - <section id="module-attributes"> <title>Module Attributes</title> |