Disabled multi-valued seq-exprs in the for: macros because using them
triggers an internal error in the typechecker. original commit: e9a00146303991e4517fc0f406c484f1f6cca646
This commit is contained in:
parent
506bf7890c
commit
d7ef7a2bad
|
@ -10,6 +10,7 @@
|
|||
;; matter how many #:when clauses we throw at them.
|
||||
;; Of course, for*/list: and co won't work, since they are equivalent
|
||||
;; to for/list: and co with #:when clauses.
|
||||
;; These are currently documented as not working.
|
||||
(for/list: : (Listof Integer)
|
||||
((i : Exact-Positive-Integer '(1 2 3))
|
||||
#:when (odd? i)
|
||||
|
@ -27,8 +28,10 @@
|
|||
(j : Exact-Positive-Integer '(10 20 30)))
|
||||
(list i j))
|
||||
|
||||
;; The right type for the return value would be (values (Listof Integer) (Listof Integer)).
|
||||
;; The problem here is with the error message. Somehow, source location information is lost and the whole module is blamed.
|
||||
;; The right type for the return value would be:
|
||||
;; (values (Listof Integer) (Listof Integer)).
|
||||
;; The problem here is with the error message. Somehow, source location
|
||||
;; information is lost and the whole module is blamed.
|
||||
(for/lists: : (Listof Integer)
|
||||
((x : (Listof Integer))
|
||||
(y : (Listof Integer)))
|
||||
|
@ -36,7 +39,10 @@
|
|||
(j : Exact-Positive-Integer '(10 20 30)))
|
||||
(values i j))
|
||||
|
||||
;; This is a legitimate use of multi-valued seq-exprs, but it causes the typechecker to throw an internal error.
|
||||
;; This is a legitimate use of multi-valued seq-exprs, but it causes
|
||||
;; the typechecker to throw an internal error.
|
||||
;; Multi-valued seq-exprs are currently turned off and documented as
|
||||
;; not working.
|
||||
(for/list: : (Listof Integer)
|
||||
((([i : Exact-Positive-Integer]
|
||||
[j : Exact-Positive-Integer])
|
||||
|
|
|
@ -11,7 +11,8 @@
|
|||
(pattern (var:annotated-name seq-expr:expr)
|
||||
#:with (expand ...) (list #'(var.ann-name seq-expr)))
|
||||
;; multi-valued seq-expr
|
||||
(pattern ((v:annotated-name ...) seq-expr:expr)
|
||||
;; currently disabled because it triggers an internal error in the typechecker
|
||||
#;(pattern (((v:annotated-name) ...) seq-expr:expr)
|
||||
#:with (expand ...) (list #'((v.ann-name ...) seq-expr)))
|
||||
;; when clause
|
||||
(pattern (~seq #:when guard:expr)
|
||||
|
@ -23,7 +24,8 @@
|
|||
(pattern (var:annotated-name seq-expr:expr)
|
||||
#:with (expand ...) (list #'(var.ann-name seq-expr) #'#:when #'#t))
|
||||
;; multi-valued seq-expr
|
||||
(pattern ((v:annotated-name ...) seq-expr:expr)
|
||||
;; currently disabled because it triggers an internal error in the typechecker
|
||||
#;(pattern (((v:annotated-name) ...) seq-expr:expr)
|
||||
#:with (expand ...) (list #'((v.ann-name ...) seq-expr) #'#:when #'#t))
|
||||
;; when clause
|
||||
(pattern (~seq #:when guard:expr)
|
||||
|
|
Loading…
Reference in New Issue
Block a user