Created
August 24, 2012 11:51
-
-
Save samth/3449728 to your computer and use it in GitHub Desktop.
Why any-wrap/c is needed
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#lang racket/load | |
(module m1 typed/racket | |
(: f : Integer -> Integer) | |
(define (f x) (add1 x)) | |
(define: g : Any f) ;; safe by subtyping | |
(provide g)) | |
(module m2 racket | |
(require 'm1) | |
(g "not a number")) ;; fails at runtime |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment