PasteRack.org
Paste # 16888
2016-07-18 16:51:37

Fork as a new paste.

Paste viewed 259 times.


Embed:

  1. #lang racket
  2.  
  3. (require syntax/location)
  4.  
  5. (module foo typed/racket
  6.   (: f (-> Byte Integer))
  7.   (define (f x)
  8.     (+ x 1))
  9.  
  10.   (set! f (λ ([x : Byte])
  11.             (+ x 2)))
  12.   (f 3))
  13.  
  14. (require 'foo)
  15. (displayln ((eval 'f (module->namespace (quote-module-path foo))) "world"))

=>

5

#<bad-value>