Created
August 25, 2014 15:49
-
-
Save stamourv/42cb199bd3b2cc29eba5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
#| | |
exec racket -qu "$0" ${1+"$@"} | |
|# | |
#lang racket | |
(require (planet stamourv/sexp-diff)) | |
(define (read-and-expand file) | |
(with-input-from-string ;; read-syntax won't work with #lang | |
(with-output-to-string | |
(lambda () | |
(system (format "raco expand ~a" file)))) | |
read)) | |
(let ((old (vector-ref (current-command-line-arguments) 0)) | |
(new (vector-ref (current-command-line-arguments) 1))) | |
(pretty-print | |
(sexp-diff (read-and-expand old) | |
(read-and-expand new)))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment