[Remove the documenation section on derived instances David Waern **20080107164210 The problem mentioned there doesn't exist in Haddock 2.0.0.0 ] { hunk ./doc/haddock.xml 1282 - -
- 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. -
}