macrotypes
macrotypes copied to clipboard
Type pattern expander in custom syntax class has confusing error
For some reason, using the generated ~ pattern expanders for types does not work in (define-syntax-class ...). As a simple example,
#lang turnstile
(define-type-constructor List #:arity = 1)
(begin-for-syntax
(define-syntax-class list-τ
(pattern (~List _))))
produces the error
pattern: required attribute is not defined: g86
; in: (pattern (~List _))
I think this has something to do with the temporary generated for use in producing the "Expected _, got: _" error.