"Manuel M. T. Chakravarty" wrote:
> IMHO it would be much more important to think about a
> mechanism for automatically extracting all the interface
> information (including the interface comments) from a
> Haskell module.  Something like an automatically generated
> Modula-2 definition module that defines and explains the
> interface without forcing the reader to wade through the
> implementation.
A less technological solution which has been suggested before would be an
extension to the Haskell language to allow type annotations in
module export lists.  This would allow a considerable part of the
interface to be documented and automatically checked in one central
place.  I could then write a typical Haskell module in the following order: 
(1) module export list, listing types and comments for all values; 
(2) import list; (3) interface and type declarations; (4) all non-trivial code.  
Then it is easy to get at the interface (sections (1) & (3)), but at the 
same time you don't have to duplicate the same stuff in different places.

Reply via email to