-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
I'm following along typing everything, and hit a minor snag.
Section 3.1 gives two alternative definitions of unique and suggests they are equivalent:
(define-metafunction REDEX unique : any ... -> boolean [(unique any_!_1 ...) #t] [(unique _ ...) #f])There is a kind of short-hand for defining predicates (metafunctions that produce either true or false), called, confusingly enough, define-relation:
(define-relation REDEX unique ⊆ any × ... [(unique any_!_1 ...)])
The text suggests the two are interchangable, but the define-metafunction form seems to break things. I tried to evaluate the PCF typing judgment using the define-metafunction form of unique, but got the following error:
define-judgment-form: expected judgment form name in: unique
The error goes away if I switch to the define-relation form, and the tutorial code itself uses the relation form in shared.rkt (line 128)
I ran into this on Racket (DrRacket) 6.5, but checked on 6.2.1 as well.
Metadata
Metadata
Assignees
Labels
No labels