Unbreak signatures for BSL.
This commit is contained in:
parent
232a580e53
commit
8bc95ace01
|
@ -13,6 +13,8 @@
|
||||||
(for-syntax syntax/boundmap)
|
(for-syntax syntax/boundmap)
|
||||||
(for-syntax syntax/kerncase))
|
(for-syntax syntax/kerncase))
|
||||||
|
|
||||||
|
(require (for-syntax "firstorder.ss"))
|
||||||
|
|
||||||
(define-syntax (print-results stx)
|
(define-syntax (print-results stx)
|
||||||
(syntax-case stx ()
|
(syntax-case stx ()
|
||||||
((_ expr)
|
((_ expr)
|
||||||
|
@ -46,13 +48,13 @@
|
||||||
(filter (lambda (maybe)
|
(filter (lambda (maybe)
|
||||||
(syntax-case maybe (:)
|
(syntax-case maybe (:)
|
||||||
((: ?id ?cnt)
|
((: ?id ?cnt)
|
||||||
(identifier? #'id)
|
(identifier? #'?id)
|
||||||
(begin
|
(let ((real-id (first-order->higher-order #'?id)))
|
||||||
(when (bound-identifier-mapping-get table #'?id (lambda () #f))
|
(when (bound-identifier-mapping-get table real-id (lambda () #f))
|
||||||
(raise-syntax-error #f
|
(raise-syntax-error #f
|
||||||
"Second signature declaraton for the same name."
|
"Second signature declaraton for the same name."
|
||||||
maybe))
|
maybe))
|
||||||
(bound-identifier-mapping-put! table #'?id #'?cnt)
|
(bound-identifier-mapping-put! table real-id #'?cnt)
|
||||||
#f))
|
#f))
|
||||||
((: ?id)
|
((: ?id)
|
||||||
(raise-syntax-error 'signatures "Signature declaration is missing a signature." maybe))
|
(raise-syntax-error 'signatures "Signature declaration is missing a signature." maybe))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user