Skip to content

Instantly share code, notes, and snippets.

View deeglaze's full-sized avatar

Dionna Amalie Glaze deeglaze

View GitHub Profile
@deeglaze
deeglaze / compile-0cfa.rkt
Created October 4, 2012 17:24 — forked from dvanhorn/compile-0cfa.rkt
Compilation for 0CFA with lazy dereferencing
#lang racket
(require racket/trace
(for-syntax syntax/parse))
;; 0CFA in the AAM style on some hairy Church numeral churning
;; Soundness, but at what cost?
(define <- (case-lambda))
(begin-for-syntax
@deeglaze
deeglaze / gist:3707924
Created September 12, 2012 16:33
Problematic define
#lang racket
(define (f x) (cond [#f ;; or some other arbitrary computation that gives #f
(g x)]
[else x]))
(f 0)
(define (g x) x)
@deeglaze
deeglaze / gist:3499555
Created August 28, 2012 16:07
Switch hyphen and underscore for Coq editing in emacs
(defun switch-hyphen ()
(interactive)
(define-key coq-mode-map (kbd "-") '(lambda () (interactive) (insert "_")))
(define-key coq-mode-map (kbd "_") '(lambda () (interactive) (insert "-"))))
(add-hook 'coq-mode-hook 'switch-hyphen)