{"action":"created","issue":{"url":"https://api.github.com/repos/brownplt/pyret-lang/issues/628","labels_url":"https://api.github.com/repos/brownplt/pyret-lang/issues/628/labels{/name}","comments_url":"https://api.github.com/repos/brownplt/pyret-lang/issues/628/comments","events_url":"https://api.github.com/repos/brownplt/pyret-lang/issues/628/events","html_url":"https://github.com/brownplt/pyret-lang/issues/628","id":127834966,"number":628,"title":"refinement in a-app is not run","user":{"login":"sorawee","id":9099577,"avatar_url":"https://avatars.githubusercontent.com/u/9099577?v=3","gravatar_id":"","url":"https://api.github.com/users/sorawee","html_url":"https://github.com/sorawee","followers_url":"https://api.github.com/users/sorawee/followers","following_url":"https://api.github.com/users/sorawee/following{/other_user}","gists_url":"https://api.github.com/users/sorawee/gists{/gist_id}","starred_url":"https://api.github.com/users/sorawee/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sorawee/subscriptions","organizations_url":"https://api.github.com/users/sorawee/orgs","repos_url":"https://api.github.com/users/sorawee/repos","events_url":"https://api.github.com/users/sorawee/events{/privacy}","received_events_url":"https://api.github.com/users/sorawee/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2016-01-21T03:04:22Z","updated_at":"2016-01-21T03:26:14Z","closed_at":null,"body":"```\r\nfun test(x):\r\n  false\r\nend\r\n\r\na :: List<Number%(test)> = [list: 1, 2, 3]\r\n```\r\n\r\nWe should either run the refinement, or consider this an invalid syntax."},"comment":{"url":"https://api.github.com/repos/brownplt/pyret-lang/issues/comments/173439404","html_url":"https://github.com/brownplt/pyret-lang/issues/628#issuecomment-173439404","issue_url":"https://api.github.com/repos/brownplt/pyret-lang/issues/628","id":173439404,"user":{"login":"blerner","id":918464,"avatar_url":"https://avatars.githubusercontent.com/u/918464?v=3","gravatar_id":"","url":"https://api.github.com/users/blerner","html_url":"https://github.com/blerner","followers_url":"https://api.github.com/users/blerner/followers","following_url":"https://api.github.com/users/blerner/following{/other_user}","gists_url":"https://api.github.com/users/blerner/gists{/gist_id}","starred_url":"https://api.github.com/users/blerner/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/blerner/subscriptions","organizations_url":"https://api.github.com/users/blerner/orgs","repos_url":"https://api.github.com/users/blerner/repos","events_url":"https://api.github.com/users/blerner/events{/privacy}","received_events_url":"https://api.github.com/users/blerner/received_events","type":"User","site_admin":false},"created_at":"2016-01-21T03:26:14Z","updated_at":"2016-01-21T03:26:14Z","body":"It's not guaranteed that we will, and likely that we won't...at least not dynamically.  Consider a lazy list\r\n```\r\ndata LazyList<T>:\r\n  | l-empty\r\n  | l-cons(l-first :: () -> T, l-rest :: () -> LazyList<T>)\r\nend\r\n```\r\n\r\nIf you instantiate `LazyList<Number%(is-even)>`, there's no possible way to check that it's true without forcing the lazy list.  And since lazy lists can easily build cyclic or infinite structures...that would be bad.\r\n\r\nIn general, we don't know how to reliably, safely, efficiently, correctly, etc. check the use of a type parameter in a generic type, other than by statically approximating it with a static type checker."}}