-
Notifications
You must be signed in to change notification settings - Fork 112
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify on show is kinda annoying #15
Comments
An alternative fix is to simplify both sides in scmutils simplifies on show, but this was kinda disappointing: 1 ]=> (= (+ 'x 1) (+ 'x 1))
#| #f |#
1 ]=> (eq? (+ 'x 1) (+ 'x 1))
#| #f |#
1 ]=> (eqv? (+ 'x 1) (+ 'x 1))
#| #f |#
1 ]=> (= (- (+ 'x 1) (+ 'x 1)) 0)
#| #f |#
1 ]=> (eq? (- (+ 'x 1) (+ 'x 1)) 0)
#| #f |#
1 ]=> (zero? (- (+ 'x 1) (+ 'x 1)))
#| #t |# |
Haha I found this in my old code: ;;; Utility to compare equality of two expressions
(define (expr-eq? a b)
(equal?
(write-to-string (simplify a))
(write-to-string (simplify b)))) |
Closing this since the printing is unsimplified in tests now. |
@shashi I feel that especially since this package is trying to be generic and more agnostic about the users' usecase, simplify in show is a bad idea. I think that one major problem is that PS: sorry I haven't had much time for this package lately. I'm hoping to get back into it soon! |
Ok sure, feel free to make the change by just changing the default value of simplified_show[] |
Currently, if I write
Because we simplify the output of
Base.show
, errors testsets tricky to debug. notice it saysEvaluated: ((a ^ 2) * b) == ((a ^ 2) * b)
One can use
showraw
to see what the actual representation is, but I think maybe we shouldn't be simplifying onshow
.The text was updated successfully, but these errors were encountered: