Changes between Version 2 and Version 3 of TagExportsWithNamespace


Ignore:
Timestamp:
Sep 6, 2006 6:20:42 PM (8 years ago)
Author:
chak@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TagExportsWithNamespace

    v2 v3  
    5050}}} 
    5151 
    52 == Variations == 
     52== Variation I == 
    5353 
    5454It would be better not to need to distinguish between type, newtype, and data.  These names all live in the same namespace.  And for implementation-abstract reasons, it would be useful not to need to reveal exactly how a type constructor was defined.  So an alternative proposal is to use ''no'' keyword for type constructors, but the 'class' keyword for classes.  This distinguishes the two capitalised namespaces exactly, and minimally.  With this scheme, we should probably remove the optionality of the class keyword. 
     
    6464            |  class tycls [ (..) | ( var_1, ... , var_n ) ]            (n>=0) 
    6565}}} 
     66 
     67== Variation II == 
     68 
     69Currently, constructors can not be exported without wrapping them in brackets prefixed by their data type name.  If we introduce tags, it would be nice to change that.  So an alternative proposal would be the following: 
     70 * Any name without a tag is a value-level entity (i.e., a function name or data constructor, depending on case). 
     71 * Any type constructor needs to be tagged with `type` (not distinguishing between data types, newtypes, and synonyms) or with `type`, `newtype`, or `data` (if we want this fine-grained distinction). 
     72 * Class names need to be tagged with `class`. 
     73 * Module names need to be tagged with `module`.