Changes between Version 9 and Version 10 of PatternSynonyms


Ignore:
Timestamp:
Aug 11, 2013 8:11:21 AM (22 months ago)
Author:
heisenbug
Comment:

suggest associated constructors

Legend:

Unmodified
Added
Removed
Modified
  • PatternSynonyms

    v9 v10  
    144144   headOf (Cons x _) = Just x 
    145145}}} 
     146 
     147One could go one step further and leave out the `pattern` keyword to obtain ''associated constructors'', which are required to be bidirectional. The capitalized constructor would indicate that a pattern synonym is being defined. For complicated cases one could resort to the `where` syntax (shown above).