Improve error messages.
svn: r17545
This commit is contained in:
parent
f9311ff9dc
commit
a40d5c5569
|
@ -42,6 +42,7 @@
|
|||
|
||||
(define-syntax-class annotated-formal
|
||||
#:description "annotated variable of the form [x : T]"
|
||||
#:opaque
|
||||
#:attributes (name ty ann-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)
|
||||
(with-syntax ([new-nm (syntax-property #'nm 'type-label #'ty)])
|
||||
(syntax/loc stx (define new-nm body)))]
|
||||
[(define: (vars:id ...) (f:id args ...) : ret body ...)
|
||||
#'(pdefine: (vars ...) (f args ...) : ret body ...)]))
|
||||
[(define: (tvars:id ...) (nm:id . formals:annotated-formals) : ret-ty 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)
|
||||
(syntax-parse stx
|
||||
|
|
Loading…
Reference in New Issue
Block a user