{"action":"created","comment":{"url":"https://api.github.com/repos/ambiata/icicle/pulls/comments/32703270","id":32703270,"diff_hunk":"@@ -44,14 +45,28 @@ prop_prefixlet =\n \n -- Constant evaluates to constant. How quaint.\n -- =====================\n+\n prop_const i =\n  eval0 evalPrim (constI i :: X.Exp Var) == Right (VBase $ VInt i)\n \n -- And likewise, putting anything that typechecks before the constant still evalutes fine\n -- =====================\n+\n prop_constprefix i =\n  withTypedExp $ \\x _ -> eval0 evalPrim (XLet (fresh 0) x (constI i)) == Right (VBase $ VInt i)\n \n+-- Applying small-step dynamics should eventually get to the same result as\n+-- applying big-step.\n+-- =====================\n+\n+prop_small_transition =\n+ withTypedExp $ \\x _ -> iterateEval x == hush (eval0 evalPrim x)\n+ where iterateEval x\n+         | Right z  <- ES.eval evalPrim x, z /= x = iterateEval z\n+         | XValue{} <- x = hush $ eval0 evalPrim x\n+         | otherwise = Nothing\n+       hush (Left _)  = Nothing\n+       hush (Right x) = Just x","path":"test/Icicle/Test/Core/Exp/Eval.hs","position":60,"original_position":60,"commit_id":"ba1367d2aeb67377f5699775c96dc1264ca506e0","original_commit_id":"ba1367d2aeb67377f5699775c96dc1264ca506e0","user":{"login":"charleso","id":31059,"avatar_url":"https://avatars.githubusercontent.com/u/31059?v=3","gravatar_id":"","url":"https://api.github.com/users/charleso","html_url":"https://github.com/charleso","followers_url":"https://api.github.com/users/charleso/followers","following_url":"https://api.github.com/users/charleso/following{/other_user}","gists_url":"https://api.github.com/users/charleso/gists{/gist_id}","starred_url":"https://api.github.com/users/charleso/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/charleso/subscriptions","organizations_url":"https://api.github.com/users/charleso/orgs","repos_url":"https://api.github.com/users/charleso/repos","events_url":"https://api.github.com/users/charleso/events{/privacy}","received_events_url":"https://api.github.com/users/charleso/received_events","type":"User","site_admin":false},"body":"We have our own [rightToMaybe](https://github.com/ambiata/p/blob/265cd5c3d5a91a332aedfd950d80bc1f9e9fc5f2/src/P/Either.hs#L17) if you prefer. :)","created_at":"2015-06-18T06:59:16Z","updated_at":"2015-06-18T06:59:16Z","html_url":"https://github.com/ambiata/icicle/pull/33#discussion_r32703270","pull_request_url":"https://api.github.com/repos/ambiata/icicle/pulls/33","_links":{"self":{"href":"https://api.github.com/repos/ambiata/icicle/pulls/comments/32703270"},"html":{"href":"https://github.com/ambiata/icicle/pull/33#discussion_r32703270"},"pull_request":{"href":"https://api.github.com/repos/ambiata/icicle/pulls/33"}}},"pull_request":{"url":"https://api.github.com/repos/ambiata/icicle/pulls/33","id":37976224,"html_url":"https://github.com/ambiata/icicle/pull/33","diff_url":"https://github.com/ambiata/icicle/pull/33.diff","patch_url":"https://github.com/ambiata/icicle/pull/33.patch","issue_url":"https://api.github.com/repos/ambiata/icicle/issues/33","number":33,"state":"open","locked":false,"title":"WIP - small step evaluator","user":{"login":"tranma","id":235039,"avatar_url":"https://avatars.githubusercontent.com/u/235039?v=3","gravatar_id":"","url":"https://api.github.com/users/tranma","html_url":"https://github.com/tranma","followers_url":"https://api.github.com/users/tranma/followers","following_url":"https://api.github.com/users/tranma/following{/other_user}","gists_url":"https://api.github.com/users/tranma/gists{/gist_id}","starred_url":"https://api.github.com/users/tranma/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tranma/subscriptions","organizations_url":"https://api.github.com/users/tranma/orgs","repos_url":"https://api.github.com/users/tranma/repos","events_url":"https://api.github.com/users/tranma/events{/privacy}","received_events_url":"https://api.github.com/users/tranma/received_events","type":"User","site_admin":false},"body":"small step dynamics for Core\r\n\r\n  * still fully evaluates primitives, but we need to pass the return type along\r\n  * otherwise, standard call-by-value","created_at":"2015-06-18T06:51:27Z","updated_at":"2015-06-18T06:59:16Z","closed_at":null,"merged_at":null,"merge_commit_sha":"58abbb62dce0817a2a76e31b719f17acbe745091","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/ambiata/icicle/pulls/33/commits","review_comments_url":"https://api.github.com/repos/ambiata/icicle/pulls/33/comments","review_comment_url":"https://api.github.com/repos/ambiata/icicle/pulls/comments{/number}","comments_url":"https://api.github.com/repos/ambiata/icicle/issues/33/comments","statuses_url":"https://api.github.com/repos/ambiata/icicle/statuses/ba1367d2aeb67377f5699775c96dc1264ca506e0","head":{"label":"ambiata:topic/small-step","ref":"topic/small-step","sha":"ba1367d2aeb67377f5699775c96dc1264ca506e0","user":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=3","gravatar_id":"","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"repo":{"id":33146693,"name":"icicle","full_name":"ambiata/icicle","owner":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=3","gravatar_id":"","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ambiata/icicle","description":"A streaming query language.","fork":false,"url":"https://api.github.com/repos/ambiata/icicle","forks_url":"https://api.github.com/repos/ambiata/icicle/forks","keys_url":"https://api.github.com/repos/ambiata/icicle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ambiata/icicle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ambiata/icicle/teams","hooks_url":"https://api.github.com/repos/ambiata/icicle/hooks","issue_events_url":"https://api.github.com/repos/ambiata/icicle/issues/events{/number}","events_url":"https://api.github.com/repos/ambiata/icicle/events","assignees_url":"https://api.github.com/repos/ambiata/icicle/assignees{/user}","branches_url":"https://api.github.com/repos/ambiata/icicle/branches{/branch}","tags_url":"https://api.github.com/repos/ambiata/icicle/tags","blobs_url":"https://api.github.com/repos/ambiata/icicle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ambiata/icicle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ambiata/icicle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ambiata/icicle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ambiata/icicle/statuses/{sha}","languages_url":"https://api.github.com/repos/ambiata/icicle/languages","stargazers_url":"https://api.github.com/repos/ambiata/icicle/stargazers","contributors_url":"https://api.github.com/repos/ambiata/icicle/contributors","subscribers_url":"https://api.github.com/repos/ambiata/icicle/subscribers","subscription_url":"https://api.github.com/repos/ambiata/icicle/subscription","commits_url":"https://api.github.com/repos/ambiata/icicle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ambiata/icicle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ambiata/icicle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ambiata/icicle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ambiata/icicle/contents/{+path}","compare_url":"https://api.github.com/repos/ambiata/icicle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ambiata/icicle/merges","archive_url":"https://api.github.com/repos/ambiata/icicle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ambiata/icicle/downloads","issues_url":"https://api.github.com/repos/ambiata/icicle/issues{/number}","pulls_url":"https://api.github.com/repos/ambiata/icicle/pulls{/number}","milestones_url":"https://api.github.com/repos/ambiata/icicle/milestones{/number}","notifications_url":"https://api.github.com/repos/ambiata/icicle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ambiata/icicle/labels{/name}","releases_url":"https://api.github.com/repos/ambiata/icicle/releases{/id}","created_at":"2015-03-30T20:37:02Z","updated_at":"2015-06-17T00:48:42Z","pushed_at":"2015-06-18T06:51:27Z","git_url":"git://github.com/ambiata/icicle.git","ssh_url":"git@github.com:ambiata/icicle.git","clone_url":"https://github.com/ambiata/icicle.git","svn_url":"https://github.com/ambiata/icicle","homepage":null,"size":821,"stargazers_count":3,"watchers_count":3,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":3,"default_branch":"master"}},"base":{"label":"ambiata:topic/icicle-initial","ref":"topic/icicle-initial","sha":"39fe07409e320cf9b49c4f226646b30047b8bea4","user":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=3","gravatar_id":"","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"repo":{"id":33146693,"name":"icicle","full_name":"ambiata/icicle","owner":{"login":"ambiata","id":1691023,"avatar_url":"https://avatars.githubusercontent.com/u/1691023?v=3","gravatar_id":"","url":"https://api.github.com/users/ambiata","html_url":"https://github.com/ambiata","followers_url":"https://api.github.com/users/ambiata/followers","following_url":"https://api.github.com/users/ambiata/following{/other_user}","gists_url":"https://api.github.com/users/ambiata/gists{/gist_id}","starred_url":"https://api.github.com/users/ambiata/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ambiata/subscriptions","organizations_url":"https://api.github.com/users/ambiata/orgs","repos_url":"https://api.github.com/users/ambiata/repos","events_url":"https://api.github.com/users/ambiata/events{/privacy}","received_events_url":"https://api.github.com/users/ambiata/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/ambiata/icicle","description":"A streaming query language.","fork":false,"url":"https://api.github.com/repos/ambiata/icicle","forks_url":"https://api.github.com/repos/ambiata/icicle/forks","keys_url":"https://api.github.com/repos/ambiata/icicle/keys{/key_id}","collaborators_url":"https://api.github.com/repos/ambiata/icicle/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/ambiata/icicle/teams","hooks_url":"https://api.github.com/repos/ambiata/icicle/hooks","issue_events_url":"https://api.github.com/repos/ambiata/icicle/issues/events{/number}","events_url":"https://api.github.com/repos/ambiata/icicle/events","assignees_url":"https://api.github.com/repos/ambiata/icicle/assignees{/user}","branches_url":"https://api.github.com/repos/ambiata/icicle/branches{/branch}","tags_url":"https://api.github.com/repos/ambiata/icicle/tags","blobs_url":"https://api.github.com/repos/ambiata/icicle/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/ambiata/icicle/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/ambiata/icicle/git/refs{/sha}","trees_url":"https://api.github.com/repos/ambiata/icicle/git/trees{/sha}","statuses_url":"https://api.github.com/repos/ambiata/icicle/statuses/{sha}","languages_url":"https://api.github.com/repos/ambiata/icicle/languages","stargazers_url":"https://api.github.com/repos/ambiata/icicle/stargazers","contributors_url":"https://api.github.com/repos/ambiata/icicle/contributors","subscribers_url":"https://api.github.com/repos/ambiata/icicle/subscribers","subscription_url":"https://api.github.com/repos/ambiata/icicle/subscription","commits_url":"https://api.github.com/repos/ambiata/icicle/commits{/sha}","git_commits_url":"https://api.github.com/repos/ambiata/icicle/git/commits{/sha}","comments_url":"https://api.github.com/repos/ambiata/icicle/comments{/number}","issue_comment_url":"https://api.github.com/repos/ambiata/icicle/issues/comments{/number}","contents_url":"https://api.github.com/repos/ambiata/icicle/contents/{+path}","compare_url":"https://api.github.com/repos/ambiata/icicle/compare/{base}...{head}","merges_url":"https://api.github.com/repos/ambiata/icicle/merges","archive_url":"https://api.github.com/repos/ambiata/icicle/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/ambiata/icicle/downloads","issues_url":"https://api.github.com/repos/ambiata/icicle/issues{/number}","pulls_url":"https://api.github.com/repos/ambiata/icicle/pulls{/number}","milestones_url":"https://api.github.com/repos/ambiata/icicle/milestones{/number}","notifications_url":"https://api.github.com/repos/ambiata/icicle/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/ambiata/icicle/labels{/name}","releases_url":"https://api.github.com/repos/ambiata/icicle/releases{/id}","created_at":"2015-03-30T20:37:02Z","updated_at":"2015-06-17T00:48:42Z","pushed_at":"2015-06-18T06:51:27Z","git_url":"git://github.com/ambiata/icicle.git","ssh_url":"git@github.com:ambiata/icicle.git","clone_url":"https://github.com/ambiata/icicle.git","svn_url":"https://github.com/ambiata/icicle","homepage":null,"size":821,"stargazers_count":3,"watchers_count":3,"language":"Haskell","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":12,"forks":0,"open_issues":12,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/ambiata/icicle/pulls/33"},"html":{"href":"https://github.com/ambiata/icicle/pull/33"},"issue":{"href":"https://api.github.com/repos/ambiata/icicle/issues/33"},"comments":{"href":"https://api.github.com/repos/ambiata/icicle/issues/33/comments"},"review_comments":{"href":"https://api.github.com/repos/ambiata/icicle/pulls/33/comments"},"review_comment":{"href":"https://api.github.com/repos/ambiata/icicle/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/ambiata/icicle/pulls/33/commits"},"statuses":{"href":"https://api.github.com/repos/ambiata/icicle/statuses/ba1367d2aeb67377f5699775c96dc1264ca506e0"}}}}