Changes between Version 14 and Version 15 of ModuleSystem


Ignore:
Timestamp:
Dec 1, 2005 11:48:42 AM (8 years ago)
Author:
malcolm.wallace@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ModuleSystem

    v14 v15  
    4747= Permit Signatures in Export Lists = 
    4848 
    49 There is a good case to be made for permitting the inclusion of function signatures in the export list of a module.  People often write them there anyway in comments, but the comments are not checked against the implementation, so changes can go unnoticed.  There is also a good software engineering principle that says you should specify your interfaces as fully as possible. signatures in export lists should be considered equivalant to signatures specified in the module itself at the top level for all purposes. 
     49There is a good case to be made for permitting the inclusion of function signatures in the export list of a module.  People often write them there anyway in comments, but the comments are not checked against the implementation, so changes can go unnoticed.  There is also a good software engineering principle that says you should specify your interfaces as fully as possible. Signatures in export lists should be considered equivalant to signatures specified in the module itself at the top level for all purposes.  If there are signatures in both the interface and the implementation, they should be identical (not just unifiable). 
     50 
     51If we /required/ signatures in export lists (and always required a full export list too), this would solve the recursive module problem very simply.  The export list would represent exactly the information currently contained in ghc's hs-boot files (and nhc98's hand-written .hi bootstrapping method). 
     52 
     53= Permit qualified exports = 
     54 
     55There was a long thread about this on the libraries list.  Details to be filled in here.  Outline: 
     56 
     57  * module GTK (..., qualified module GTK.Button as Button, ...) where 
     58 
     59The user can import GTK and get all of the contents of GTK.Button imported qualified as Button. 
     60