Skip to content

Commit

Permalink
Use pretty-write instead of pretty-print in print-forms
Browse files Browse the repository at this point in the history
Using an example from the Rosette documentation, compare the output of
pretty-print (with print-as-expression set to #t):

(list
 'define
 '(bvmul2_bitfast x)
 (list 'bvadd 'x (list 'bvxor 'x (bv #x00 8))))

With the output of pretty-write:

(define (bvmul2_bitfast x) (bvadd x (bvxor x (bv #x00 8))))

The latter is properly formatted as Racket code and matches what is
shown in the Rosette guide.

Partially reverts 8fabaa8 ("Cleanup.").
  • Loading branch information
lukenels committed Mar 8, 2022
1 parent c53aff6 commit bc90edd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion rosette/lib/synthax.rkt
Original file line number Diff line number Diff line change
Expand Up @@ -296,4 +296,4 @@
(define (print-forms sol)
(for ([f (generate-forms sol)])
(printf "~a:~a:~a\n" (syntax-source f) (syntax-line f) (syntax-column f))
(pretty-print (syntax->datum f))))
(pretty-write (syntax->datum f))))

0 comments on commit bc90edd

Please sign in to comment.