Create a gist now

Instantly share code, notes, and snippets.

Why any-wrap/c is needed
#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