Skip to content

Instantly share code, notes, and snippets.

@stamourv
Created August 25, 2014 15:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save stamourv/42cb199bd3b2cc29eba5 to your computer and use it in GitHub Desktop.
Save stamourv/42cb199bd3b2cc29eba5 to your computer and use it in GitHub Desktop.
#!/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