File tree Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Expand file tree Collapse file tree 4 files changed +11
-8
lines changed Original file line number Diff line number Diff line change 1212
1313(provide render-menu render-warnings render-large render-comparison render-program
1414 render-bogosity render-help
15- format-percent
15+ format-percent doc-url
1616 program->fpcore program->tex render-reproduction js-tex-include)
1717
1818(define (program->fpcore expr ctx #:ident [ident #f ])
4242 (define top (if ident (format "FPCore ~a ~a " ident args) (format "FPCore ~a " args)))
4343 (pretty-format `(,top ,@props* ,expr) #:mode 'display ))
4444
45+
46+ (define (doc-url page)
47+ (format "https://herbie.uwplse.org/doc/~a/~a " (*herbie-version*) page))
48+
4549(define/contract (render-menu #:path [path ". " ] name links)
4650 (->* (string? (listof (cons/c string? string?)))
4751 (#:path string?)
265269 (summary
266270 (h2 "Reproduce " )
267271 (a ([class "help-button float " ]
268- [href " / doc/latest/ report.html#reproduction "]
272+ [href ,( doc-url " report.html#reproduction ")]
269273 [target "_blank " ]) "? " ))
270274 (pre ((class "shell " ))
271275 (code
279283
280284(define (render-help url #:float [float? #t ])
281285 `(a ([class ,(if float? "help-button float " "help-button " )]
282- [href ,(format " / doc/latest/~a " url)]
286+ [href ,(doc-url url)]
283287 [target "_blank " ]) "? " ))
284288
285289(define js-tex-include
Original file line number Diff line number Diff line change 126126 (summary (h2 "Specification " )
127127 ,dropdown
128128 (a ([class "help-button float " ]
129- [href " / doc/latest/ report.html#spec "]
129+ [href ,( doc-url " report.html#spec ")]
130130 [target "_blank " ]) "? " ))
131131 ,body
132132 (p "Sampling outcomes in " (kbd ,(~a (representation-name repr))) " precision: " )
137137 (h2 "Local Percentage Accuracy vs "
138138 (span ([id "variables " ]))
139139 (a ([class "help-button float " ]
140- [href " / doc/latest/ report.html#graph " ]
140+ [href ,( doc-url " report.html#graph ") ]
141141 [target "_blank " ]) "? " ))
142142 (svg)
143143 (div ([id "functions " ]))
155155 ,@(if target-cost `([data-target-cost ,(~a target-cost)]) '() ))
156156 (h2 "Accuracy vs Speed "
157157 (a ([class "help-button float " ]
158- [href " / doc/latest/ report.html#cost-accuracy "]
158+ [href ,( doc-url " report.html#cost-accuracy ")]
159159 [target "_blank " ]) "? " ))
160160 (div ([class "figure-row " ])
161161 (svg)
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 3434 (summary (h2 "Specification " )
3535 ,dropdown
3636 (a ([class "help-button float " ]
37- [href " / doc/latest/ report.html#spec " ]
37+ [href ,( doc-url " report.html#spec ") ]
3838 [target "_blank " ]) "? " ))
3939 ,body)))
4040
You can’t perform that action at this time.
0 commit comments