racket / scribble

Other
197 stars 91 forks source link

defproc looses parenthesis #211

Closed gus-massa closed 4 years ago

gus-massa commented 4 years ago

I'm making this based in a bug report from the mailing list, with a few changes. (original message)

The original report used two files to avoid warnings. The problem happens when defproc has additional parenthesis. My version is

#lang scribble/manual

@defproc[(ok (x list?)) list?]{blah blah}
@defproc[((bad) (x list?)) list?]{blah blah}
@defproc[(((((((((((very-bad)))))))))) (x list?)) list?]{blah blah}
@defproc[(((((((((((very-weird (x list?)))))))))))) list?]{blah blah}

The output is something like

v.7.4

(ok x) → list?
  x : list?
blah blah

((bad x) → list?
  x : list?
blah blah

(((((((((((very-bad x) → list?
  x : list?
blah blah

(((((((((((very-weird x(((((((((() → list?
  x : list?
blah blah
bennn commented 4 years ago

50862d0 fixed the parentheses in these examples. The defproc from the original email looks good now too (@defproc[((make-proc ) (x any/c) (y any/c #f)) any/c]{blah blah})

joskoot commented 4 years ago

7.4.0.10--2019-09-29(487d3bfd7d/a) [3m] works fine,\ Thanks,\ Jos