[Ur] Using a simpler "flexible record pattern" - still getting syntax errors
Adam Chlipala
adamc at csail.mit.edu
Tue Jul 28 09:43:21 EDT 2015
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.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.impredicative.com/pipermail/ur/attachments/20150728/11773b82/attachment.html>
More information about the Ur
mailing list