Skip to content

Instantly share code, notes, and snippets.

@takikawa
Created July 26, 2012 06:21
Show Gist options
  • Save takikawa/3180554 to your computer and use it in GitHub Desktop.
Save takikawa/3180554 to your computer and use it in GitHub Desktop.
lift a definition?
#lang racket
(module bar racket
(define-syntax (foo stx)
(syntax-case stx ()
[(_ x)
(begin (syntax-local-lift-module-end-declaration
#'(define/contract x integer? 5))
#'(void))]))
(foo x)
(provide x))
(require 'bar)
x
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment