From d7f62d19a48aa70aba834eb0893fed5de6c118e6 Mon Sep 17 00:00:00 2001 From: David Waern Date: Mon, 7 Jan 2008 16:42:10 +0000 Subject: Remove the documenation section on derived instances The problem mentioned there doesn't exist in Haddock 2.0.0.0 --- doc/haddock.xml | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'doc') 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 C.T. -
- Derived instances - - The deriving 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. - - One workaround for this is to use CPP () to give Haddock explicit instance headers. Here is an - example from the OpenGL library: - - -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 - - - As a rule of thumb, try deriving first, - and if that doesn't work then use the above workaround. -
-
Module Attributes -- cgit v1.2.3