This file contains hidden or 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
{-# LANGUAGE RankNTypes #-} | |
newtype BST k v = Roll | |
{ unroll :: forall r. r -> (k -> v -> r -> r -> r) -> r | |
} | |
-- Two constructors | |
leave :: BST k v | |
leave = Roll const |
This file contains hidden or 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
(defun isml () | |
"If sml repl exists, then restart it else create a new repl." | |
(interactive) | |
(when (get-buffer "*sml*") | |
(with-current-buffer "*sml*" | |
(when (process-live-p "sml") | |
(comint-send-eof))) | |
(sleep-for 0.2)) | |
(sml-run "sml" "")) |