{"action":"closed","issue":{"url":"https://api.github.com/repos/racket/typed-racket/issues/621","repository_url":"https://api.github.com/repos/racket/typed-racket","labels_url":"https://api.github.com/repos/racket/typed-racket/issues/621/labels{/name}","comments_url":"https://api.github.com/repos/racket/typed-racket/issues/621/comments","events_url":"https://api.github.com/repos/racket/typed-racket/issues/621/events","html_url":"https://github.com/racket/typed-racket/issues/621","id":261940809,"number":621,"title":"handling of prefab structs is totally wrong","user":{"login":"pnwamk","id":3662058,"avatar_url":"https://avatars0.githubusercontent.com/u/3662058?v=4","gravatar_id":"","url":"https://api.github.com/users/pnwamk","html_url":"https://github.com/pnwamk","followers_url":"https://api.github.com/users/pnwamk/followers","following_url":"https://api.github.com/users/pnwamk/following{/other_user}","gists_url":"https://api.github.com/users/pnwamk/gists{/gist_id}","starred_url":"https://api.github.com/users/pnwamk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pnwamk/subscriptions","organizations_url":"https://api.github.com/users/pnwamk/orgs","repos_url":"https://api.github.com/users/pnwamk/repos","events_url":"https://api.github.com/users/pnwamk/events{/privacy}","received_events_url":"https://api.github.com/users/pnwamk/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2017-10-01T19:43:54Z","updated_at":"2018-05-20T03:55:46Z","closed_at":"2018-05-20T03:55:46Z","author_association":"MEMBER","body":"```racket\r\n#lang typed/racket/base\r\n \r\n(struct fubar ([id : Byte]) #:prefab)\r\n \r\n(define rval : Any (read (open-input-string \"#s(fubar NotANumber)\")))\r\n \r\n \r\n(when (fubar? rval)\r\n  (displayln (+ 1 (fubar-id rval))))\r\n```\r\n\r\nThe short of the issue, prefab structs are more like `cons` than they are standard non-prefab structs since it is impossible to guarantee only certain types will inhabit their fields. \r\n\r\nMy thoughts currently are we should treat prefabs like named polymorphic tuples. More discussion/thought on this probably required before a real solution can be attempted.\r\n\r\n"}}
{"actor":{"display_login":"pnwamk"}}