fmt icon indicating copy to clipboard operation
fmt copied to clipboard

Buggy formatting of dotted pairs

Open jackfirth opened this issue 1 year ago • 0 comments

This code:

(define (f stx)
  (syntax-case stx (module)
    [(module . rest) (void)]))

Is currently reformatted by fmt to this:

(define (f stx)
  (syntax-case stx (module)
    [(module . rest
       )
     (void)]))

As discussed here, that seems to be because fmt thinks (module . rest) is a normal module form and . is the module's name. The issue isn't specific to module; it probably affects all uses of dotted pairs.

jackfirth avatar Oct 31 '24 19:10 jackfirth