(module simplifier mzscheme
(provide ec-simplify)
(define-syntax ec-simplify
(syntax-rules ()
[(_ . (more)) more]))
(require-for-syntax (lib "stx.ss" "syntax"))
(define-syntax (ec-simplify stx)
(syntax-case* stx (if not let begin #%top #%app) module-or-top-identifier=?
((ec-simplify (if #t consequent))
#'consequent )
((ec-simplify (if #f consequent))
#'(if #f #f) )
((ec-simplify (if #t consequent alternate))
#'consequent )
((ec-simplify (if #f consequent alternate))
#'alternate )
((ec-simplify (if (not (not test)) consequent))
#'(ec-simplify (if test consequent)) )
((ec-simplify (if (#%app not (not test)) consequent))
#'(ec-simplify (if test consequent)) )
((ec-simplify (if (not (#%app not test)) consequent))
#'(ec-simplify (if test consequent)) )
((ec-simplify (if (#%app not (#%app not test)) consequent))
#'(ec-simplify (if test consequent)) )
((ec-simplify (if (not (not test)) consequent alternate))
#'(ec-simplify (if test consequent alternate)) )
((ec-simplify (if (#%app not (not test)) consequent alternate))
#'(ec-simplify (if test consequent alternate)) )
((ec-simplify (if (not (#%app not test)) consequent alternate))
#'(ec-simplify (if test consequent alternate)) )
((ec-simplify (if (#%app not (#%app not test)) consequent alternate))
#'(ec-simplify (if test consequent alternate)) )
((ec-simplify (let () command ...))
#'(ec-simplify (begin command ...)) )
((ec-simplify (begin command ...))
#'(ec-simplify 1 () (command ...)) )
((ec-simplify 1 done ((begin to-do1 ...) to-do2 ...))
#'(ec-simplify 1 done (to-do1 ... to-do2 ...)) )
((ec-simplify 1 (done ...) (to-do1 to-do ...))
#'(ec-simplify 1 (done ... to-do1) (to-do ...)) )
((ec-simplify 1 () ())
#'(if #f #f) )
((ec-simplify 1 (command) ())
#'command )
((ec-simplify 1 (command1 command ...) ())
#'(begin command1 command ...) )
((ec-simplify expression)
#'expression ))))