> On Mar 20, 2018, at 11:51 PM, Alex Knauth <alexan...@knauth.org> wrote:
> 
> 
> 
>> On Mar 19, 2018, at 11:37 AM, David Storrs <david.sto...@gmail.com> wrote:
>> 
>> This does not work:
> 
>> (define user (hash 'name  "bob" 'job (hash 'type 'dev 'id 112)))
>> (match user
>>  [(hash-table ('name name) ('job (hash-table 'type type 'id id)))
>>   (displayln name)
>>   (displayln type)
>>   (displayln id)])
>> ; id49: unbound identifier;
>> ;  also, no #%top syntax transformer is bound
>> ;   in: id49
>> ; [,bt for context]
> 
> Jos Koot already found the problem, but why is this error message so 
> horrible? This seems like a bug in match.

By the way, this is the same error message as this issue:

https://github.com/racket/racket/issues/1964 
<https://github.com/racket/racket/issues/1964>
#lang racket
(match (list 1 1)
  [(list-no-order x x)
   x)]
... signals the error

x7: unbound identifier;
 also, no #%top transformer is bound in: x7
Since `hash-table` patterns turn into `list-no-order` patterns, there problem 
are two problems that combine to make this:
 - the secret feature of `hash-table` makes it mean something you never meant
 - `list-no-order` never checks for duplicate identifiers to throw a proper 
error message


-- 
You received this message because you are subscribed to the Google Groups 
"Racket Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to racket-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to