On 07/27/2015 03:57 PM, Stefan Scott Alexander wrote:
As a test, I'm now trying a very simple pattern as follows:

  fun getSomeColNam someCols =
    case someCols of
        { colNam = _ , ... } => colNam
      | _ => error

[...]

I'm trying to follow the syntax for the "flexible record pattern" from page 14 of the manual:

  {(x = p,)+, ... }      flexible record pattern

I can't find the error in my syntax.

The manual uses [X], not [x], indicating that only capitalized identifiers are allowed in those positions. As a consequence, no, you can't use those positions to bind names to arbitrarily chosen columns, as name variables are always lowercased. In general, pattern matching in Ur (and ML) is always deterministic.
_______________________________________________
Ur mailing list
[email protected]
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur

Reply via email to