{"action":"created","issue":{"url":"https://api.github.com/repos/racket/typed-racket/issues/289","labels_url":"https://api.github.com/repos/racket/typed-racket/issues/289/labels{/name}","comments_url":"https://api.github.com/repos/racket/typed-racket/issues/289/comments","events_url":"https://api.github.com/repos/racket/typed-racket/issues/289/events","html_url":"https://github.com/racket/typed-racket/issues/289","id":126563956,"number":289,"title":"unsafe-provide does not always eliminate boundaries","user":{"login":"stamourv","id":854429,"avatar_url":"https://avatars.githubusercontent.com/u/854429?v=3","gravatar_id":"","url":"https://api.github.com/users/stamourv","html_url":"https://github.com/stamourv","followers_url":"https://api.github.com/users/stamourv/followers","following_url":"https://api.github.com/users/stamourv/following{/other_user}","gists_url":"https://api.github.com/users/stamourv/gists{/gist_id}","starred_url":"https://api.github.com/users/stamourv/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/stamourv/subscriptions","organizations_url":"https://api.github.com/users/stamourv/orgs","repos_url":"https://api.github.com/users/stamourv/repos","events_url":"https://api.github.com/users/stamourv/events{/privacy}","received_events_url":"https://api.github.com/users/stamourv/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-01-14T02:26:15Z","updated_at":"2016-01-14T02:35:15Z","closed_at":null,"body":"The following program spends ~45% of its time checking contracts, despite all the bindings it gets from typed code coming through `unsafe-provide`.\r\n```\r\n#lang racket\r\n\r\n(module m typed/racket\r\n  (require math/array typed/racket/unsafe)\r\n  (unsafe-provide for/array array-ref))\r\n\r\n(require 'm)\r\n\r\n(define a (for/array ([i (in-range 10000)]) (+ i 1)))\r\n\r\n(for ([i (in-range 10000)])\r\n  (array-ref a (vector i)))\r\n````"},"comment":{"url":"https://api.github.com/repos/racket/typed-racket/issues/comments/171512341","html_url":"https://github.com/racket/typed-racket/issues/289#issuecomment-171512341","issue_url":"https://api.github.com/repos/racket/typed-racket/issues/289","id":171512341,"user":{"login":"samth","id":244723,"avatar_url":"https://avatars.githubusercontent.com/u/244723?v=3","gravatar_id":"","url":"https://api.github.com/users/samth","html_url":"https://github.com/samth","followers_url":"https://api.github.com/users/samth/followers","following_url":"https://api.github.com/users/samth/following{/other_user}","gists_url":"https://api.github.com/users/samth/gists{/gist_id}","starred_url":"https://api.github.com/users/samth/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/samth/subscriptions","organizations_url":"https://api.github.com/users/samth/orgs","repos_url":"https://api.github.com/users/samth/repos","events_url":"https://api.github.com/users/samth/events{/privacy}","received_events_url":"https://api.github.com/users/samth/received_events","type":"User","site_admin":false},"created_at":"2016-01-14T02:35:15Z","updated_at":"2016-01-14T02:35:15Z","body":"There look to be two options here. One, the current behavior, where unsafe-provide is really like plain Racket's provide. Two, we change unsafe-provide to generate new runtime definitons, so that the reference to the array-ref identifier exported by math is not ever expanded in untyped code. The second doesn't seem like a great option, so maybe this should remain a documented limitation of unsafe-provide. But if you have an implementation idea that doesn't produce a new value level definition, then that seems like a better possibility."}}