Skip to content

Commit

Permalink
Add support for racket/promise
Browse files Browse the repository at this point in the history
Fixing poor formatting in racket/typed-racket#1426
  • Loading branch information
sorawee committed Jan 10, 2025
1 parent 15ea025 commit aa16235
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions conventions.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,11 @@

[("begin" "begin-for-syntax") (format-uniform-body/helper 0 #:require-body? #f)]
[("test-begin") (format-uniform-body/helper 0 #:require-body? #f)]

[("delay" "lazy") (format-uniform-body/helper 0)]
[("delay/name" "delay/strict" "delay/sync" "delay/thread" "delay/idle")
(format-uniform-body/helper 0)]

[("begin0") (format-uniform-body/helper 1)]
[("module+") (format-uniform-body/helper 1)]
[("let/ec" "let/cc") (format-uniform-body/helper 1)]
Expand Down
10 changes: 10 additions & 0 deletions tests/test-cases/delay.rkt
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#lang racket

(delay/thread (begin0 (run-in-other-place p* error?)
(when (zero? (modulo i 10))
(eprintf "."))))

(delay/thread #:wait-for wait-evt-expr #:work-while while-evt-expr #:tick tick-secs-expr #:use use-ratio-expr
(begin0 (run-in-other-place p* error?)
(when (zero? (modulo i 10))
(eprintf "."))))
15 changes: 15 additions & 0 deletions tests/test-cases/delay.rkt.out
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#lang racket

(delay/thread
(begin0 (run-in-other-place p* error?)
(when (zero? (modulo i 10))
(eprintf "."))))

(delay/thread
#:wait-for wait-evt-expr
#:work-while while-evt-expr
#:tick tick-secs-expr
#:use use-ratio-expr
(begin0 (run-in-other-place p* error?)
(when (zero? (modulo i 10))
(eprintf "."))))

0 comments on commit aa16235

Please sign in to comment.