Skip to content

Instantly share code, notes, and snippets.

@fogus
Forked from samth/syntax.rkt
Created October 21, 2011 16:14
Show Gist options
  • Save fogus/1304239 to your computer and use it in GitHub Desktop.
Save fogus/1304239 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