Last active
May 24, 2017 20:43
-
-
Save wilbowma/76fab994605ac2d909277efacb6eefc1 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
;; fix indentation of inference rules with no hypothesis in Redex | |
(defun add-hyphens-as-racket-function (number-of-hyphens) | |
(when (> number-of-hyphens 1) | |
(put (intern (make-string number-of-hyphens ?-)) 'racket-indent-function | |
(lambda (state indent-point normal-indent) | |
(goto-char (elt state 1)) | |
(list (1+ (current-column)) (elt state 1)))) | |
(add-hyphens-as-racket-function (1- number-of-hyphens)))) | |
(add-hyphens-as-racket-function 102) | |
; Instead of getting a judgment rule formatted as: | |
; [--------------- "Rule-name" | |
; (judgment...)] | |
; get | |
; [--------------- "Rule-name" | |
; (judgment...)] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment