Skip to content

Instantly share code, notes, and snippets.

@samth
Created October 21, 2011 16:00
Show Gist options
  • Save samth/1304207 to your computer and use it in GitHub Desktop.
Save samth/1304207 to your computer and use it in GitHub Desktop.
Programming with syntax in Typed Racket
#lang typed/racket
(: stx Syntax)
(define stx #'bar)
(syntax-case stx ()
[foo (identifier? #'foo) (symbol=? 'bar (syntax-e #'foo))]
[_ (error 'whoops)])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment