Skip to content

Commit a384608

Browse files
committed
Add support for racket/promise
Fixing poor formatting in racket/typed-racket#1426
1 parent 15ea025 commit a384608

File tree

3 files changed

+30
-0
lines changed

3 files changed

+30
-0
lines changed

conventions.rkt

+5
Original file line numberDiff line numberDiff line change
@@ -513,6 +513,11 @@
513513

514514
[("begin" "begin-for-syntax") (format-uniform-body/helper 0 #:require-body? #f)]
515515
[("test-begin") (format-uniform-body/helper 0 #:require-body? #f)]
516+
517+
[("delay" "lazy") (format-uniform-body/helper 0)]
518+
[("delay/name" "delay/strict" "delay/sync" "delay/thread" "delay/idle")
519+
(format-uniform-body/helper 0)]
520+
516521
[("begin0") (format-uniform-body/helper 1)]
517522
[("module+") (format-uniform-body/helper 1)]
518523
[("let/ec" "let/cc") (format-uniform-body/helper 1)]

tests/test-cases/delay.rkt

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
#lang racket
2+
3+
(delay/thread (begin0 (run-in-other-place p* error?)
4+
(when (zero? (modulo i 10))
5+
(eprintf "."))))
6+
7+
(delay/thread #:wait-for wait-evt-expr #:work-while while-evt-expr #:tick tick-secs-expr #:use use-ratio-expr
8+
(begin0 (run-in-other-place p* error?)
9+
(when (zero? (modulo i 10))
10+
(eprintf "."))))

tests/test-cases/delay.rkt.out

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#lang racket
2+
3+
(delay/thread
4+
(begin0 (run-in-other-place p* error?)
5+
(when (zero? (modulo i 10))
6+
(eprintf "."))))
7+
8+
(delay/thread
9+
#:wait-for wait-evt-expr
10+
#:work-while while-evt-expr
11+
#:tick tick-secs-expr
12+
#:use use-ratio-expr
13+
(begin0 (run-in-other-place p* error?)
14+
(when (zero? (modulo i 10))
15+
(eprintf "."))))

0 commit comments

Comments
 (0)