Changes between Version 1 and Version 6 of Ticket #246


Ignore:
Timestamp:
Nov 13, 2007 5:23:30 PM (8 years ago)
Author:
simonpj
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #246

    • Property Difficulty changed from to Unknown
    • Property Version changed from None to 6.4.1
    • Property Milestone changed from to _|_
  • Ticket #246 – Description

    v1 v6  
    1 {{{
    2 in section 3.17.2 case #6 of the haskell report
     1In section 3.17.2 case 6 of the haskell report
    32
    43There is some confusing language in the report.
     
    87
    98it says:
     9''Matching against a constructor using labeled fields is
     10the same as
     11matching ordinary constructor patterns except that
     12the fields are
     13matched in the order they are named in the field list.
     14All fields
     15listed must be declared by the constructor; fields may
     16not be named
     17more than once. Fields not named by the pattern are
     18ignored (matched
     19against _)''.
    1020
    11 # Matching against a constructor using labeled fields is
    12 the same as
    13 # matching ordinary constructor patterns except that
    14 the fields are
    15 # matched in the order they are named in the field list.
    16 All fields
    17 # listed must be declared by the constructor; fields may
    18 not be named
    19 # more than once. Fields not named by the pattern are
    20 ignored (matched
    21 # against _).
    22 
    23  If you interpret 'field list' to mean the order the fields
     21If you interpret 'field list' to mean the order the fields
    2422appear in the
    2523pattern then given the code below "bar" should be
     
    5149field names)
    5250
    53 
     51{{{
    5452-- the code --
    5553data Foo = Foo { a,b::Int }
     
    6462ghc => error: Prelue.undefined
    6563hugs => "bar"
    66 
    6764}}}