[nem-bug] [Nemerle 0000746]: Unrestricted matching in def's and method "heads"

feedback at nemerle.org feedback at nemerle.org
Sun Aug 20 03:04:54 CEST 2006


The following issue has been UPDATED.
======================================================================
<http://nemerle.org/bugs/view.php?id=746> 
======================================================================
Reported By:                d
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   746
Category:                   Language Feature
Reproducibility:            N/A
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             08-20-2006 03:03 CEST
Last Modified:              08-20-2006 03:04 CEST
======================================================================
Summary:                    Unrestricted matching in def's and method "heads"
Description: 
#pragma indent

using Tree

variant Tree ['a]
  | Node
    left : Tree ['a]
    elem : 'a
    right : Tree ['a]
  | Leaf

def Node (_, e, _) = Node (Leaf (), "foo", Leaf ())

System.Console.WriteLine (e)

// And similar stuff in function/method definitions.
/* This is a classic in the functional world, so it would be expected to
work. It's also very useful sometimes, makes the code shorter and more
readable. */
======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
08-20-06 03:03 d              New Issue                                    
08-20-06 03:04 d              Summary                  Unrestricted matching in
def's method "heads" => Unrestricted matching in def\'s and method \"heads\"
08-20-06 03:04 d              Description Updated                          
======================================================================




More information about the bugs mailing list