Changes between Version 3 and Version 4 of InfixTypeConstructors


Ignore:
Timestamp:
Oct 9, 2008 7:33:35 AM (6 years ago)
Author:
simonpj@…
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • InfixTypeConstructors

    v3 v4  
    5757 
    5858 * Note that classes can be infix too; this is useful. 
    59  * Need to have a way to set the fixity of a type constructor `T` differently than the data constructor `T` (or not?). 
     59 
     60 * If you say `module M( (+) ) where ...` are you exporting the type constructor `(+)` or the value `(+)`? Ditto import lists.  Possibilities: 
     61   * An ambiguous reference defaults to the locally-defined one.  (If we did this we should do so consistently, including for unqualified names in the text of a module.  I think this'd be a Good Thing.  A warning flag could warn if you used it.  It's just like shadowing.) 
     62   * If the two `(+)` things are not both locally defined, you can disambiguate with a qualified name `Prelude.(+)` or `M.(+)`.  That does not help if you define ''both'' in `M`. 
     63   * Use a keyword to distinguish; eg `module M( data (+) ) where`.  There are design issues here (e.g. distinguish `data` and `newtype`?). 
     64 
     65 * Can you set the fixity of a type constructor `T` differently than the data constructor `T`?  This is a similar ambiguity to the one in export lists.  Except that in this case it is very common to have a type constructor and data constructor with the same name. 
     66 
    6067 * Need to allow infix notation in contexts 
    6168{{{