Improve error messages.
svn: r17545
This commit is contained in:
parent
f9311ff9dc
commit
a40d5c5569
|
@ -42,6 +42,7 @@
|
||||||
|
|
||||||
(define-syntax-class annotated-formal
|
(define-syntax-class annotated-formal
|
||||||
#:description "annotated variable of the form [x : T]"
|
#:description "annotated variable of the form [x : T]"
|
||||||
|
#:opaque
|
||||||
#:attributes (name ty ann-name)
|
#:attributes (name ty ann-name)
|
||||||
(pattern [:annotated-name]))
|
(pattern [:annotated-name]))
|
||||||
|
|
||||||
|
|
|
@ -170,8 +170,11 @@ This file defines two sorts of primitives. All of them are provided into any mod
|
||||||
(identifier? #'nm)
|
(identifier? #'nm)
|
||||||
(with-syntax ([new-nm (syntax-property #'nm 'type-label #'ty)])
|
(with-syntax ([new-nm (syntax-property #'nm 'type-label #'ty)])
|
||||||
(syntax/loc stx (define new-nm body)))]
|
(syntax/loc stx (define new-nm body)))]
|
||||||
[(define: (vars:id ...) (f:id args ...) : ret body ...)
|
[(define: (tvars:id ...) (nm:id . formals:annotated-formals) : ret-ty body ...)
|
||||||
#'(pdefine: (vars ...) (f args ...) : ret body ...)]))
|
(with-syntax ([type (syntax/loc #'ret-ty (All (tvars ...) (formals.arg-ty ... -> ret-ty)))])
|
||||||
|
(syntax/loc stx
|
||||||
|
(define: nm : type
|
||||||
|
(plambda: (tvars ...) formals body ...))))]))
|
||||||
|
|
||||||
(define-syntax (lambda: stx)
|
(define-syntax (lambda: stx)
|
||||||
(syntax-parse stx
|
(syntax-parse stx
|
||||||
|
|
Loading…
Reference in New Issue
Block a user