这是indexloc提供的服务,不要输入任何密码
Skip to content

Regression in pretty printing from Version 8.15 #695

@TimWhiting

Description

@TimWhiting

The following displays properly in version 8.15, but fails in pretty printing on more recent versions.

#lang rhombus
          
def simple = 'letrec rec = (fn(n): if n == 0 | 0 | rec(n - 1)):
                let _ = rec(5):
                  rec(1)'

Printable.current_pretty(#false)
println(simple)
Printable.current_pretty(#true)
println(simple)

Expected: (As in Racket 8.15)

letrec rec = (fn (n):« if n == 0 |« 0 » |« rec (n - 1) » »):« let _ = rec (5):« rec (1) » »
letrec rec = (fn (n): if n == 0 |« 0 » |« rec (n - 1) »):
  let _ = rec (5): rec (1)

Got: (In Racket 8.16, Racket 8.17)

letrec rec = (fn (n):« if n == 0|« 0 » |« rec (n - 1) » »):« let _ = rec (5):« rec (1) » »
unquote-splicing: contract violation
  expected: list?
  given: #false
  context...:
   /Users/timwhiting/Library/Racket/8.17/pkgs/rhombus-lib/rhombus/private/write.rkt:44:2: loop
   [repeats 1 more time]
   /Users/timwhiting/Library/Racket/8.17/pkgs/rhombus-lib/rhombus/private/write.rkt:25:0: pretty-shrubbery
   /Users/timwhiting/Library/Racket/8.17/pkgs/rhombus-lib/rhombus/private/print.rkt:266:0: print-other
   /Users/timwhiting/Library/Racket/8.17/pkgs/rhombus-lib/rhombus/private/define-arity.rkt:94:11: println
   body of "/Users/timwhiting/research/handler-sensitivity/repro.rhm"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions