{"action":"created","comment":{"url":"https://api.github.com/repos/input-output-hk/plutus/pulls/comments/238063317","pull_request_review_id":180523866,"id":238063317,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODA2MzMxNw==","diff_hunk":"@@ -21,23 +24,31 @@ newtype TypeEnv tyname = TypeEnv\n     { unTypeEnv :: IntMap (NormalizedType tyname ())\n     }\n \n-type NormalizeTypeM tyname = ReaderT (TypeEnv tyname) Quote\n+type NormalizeTypeM tyname a = StateT (Maybe Natural) (ReaderT (TypeEnv tyname) (ExceptT (TypeError a) Quote))\n+\n+normalizeTypeStep :: NormalizeTypeM tyname a ()\n+normalizeTypeStep = do\n+    st <- get\n+    case st of\n+        Just 0  -> throwError OutOfGas\n+        Just _  -> modify (fmap (subtract 1))\n+        Nothing -> pure ()\n \n -- | Run a 'NormalizeTypeM' computation.\n-runNormalizeTypeM :: MonadQuote m => NormalizeTypeM tyname a -> m a\n-runNormalizeTypeM a = liftQuote $ runReaderT a (TypeEnv mempty)\n+runNormalizeTypeM :: (MonadQuote m, AsTypeError e a, MonadError e m) => Maybe Natural -> NormalizeTypeM tyname a b -> m b\n+runNormalizeTypeM mn a = throwingEither _TypeError =<< (liftQuote $ runExceptT $ runReaderT (evalStateT a mn) (TypeEnv mempty))\n \n -- | Locally extend a 'TypeEnv' in a 'NormalizeTypeM' computation.\n withExtendedTypeEnv\n     :: HasUnique (tyname ()) TypeUnique\n-    => tyname () -> NormalizedType tyname () -> NormalizeTypeM tyname a -> NormalizeTypeM tyname a\n+    => tyname () -> NormalizedType tyname () -> NormalizeTypeM tyname a b -> NormalizeTypeM tyname a b","path":"language-plutus-core/src/Language/PlutusCore/Normalize.hs","position":48,"original_position":43,"commit_id":"d56f8678850c90207ab5c8ae7fddd37b63e55383","original_commit_id":"fc1c41eddbb19b564fd3eb9ef9932efac3d4352f","user":{"login":"effectfully","id":10480926,"node_id":"MDQ6VXNlcjEwNDgwOTI2","avatar_url":"https://avatars1.githubusercontent.com/u/10480926?v=4","gravatar_id":"","url":"https://api.github.com/users/effectfully","html_url":"https://github.com/effectfully","followers_url":"https://api.github.com/users/effectfully/followers","following_url":"https://api.github.com/users/effectfully/following{/other_user}","gists_url":"https://api.github.com/users/effectfully/gists{/gist_id}","starred_url":"https://api.github.com/users/effectfully/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/effectfully/subscriptions","organizations_url":"https://api.github.com/users/effectfully/orgs","repos_url":"https://api.github.com/users/effectfully/repos","events_url":"https://api.github.com/users/effectfully/events{/privacy}","received_events_url":"https://api.github.com/users/effectfully/received_events","type":"User","site_admin":false},"body":"It matters for me.","created_at":"2018-12-01T13:18:40Z","updated_at":"2018-12-01T13:18:40Z","html_url":"https://github.com/input-output-hk/plutus/pull/300#discussion_r238063317","pull_request_url":"https://api.github.com/repos/input-output-hk/plutus/pulls/300","author_association":"CONTRIBUTOR","_links":{"self":{"href":"https://api.github.com/repos/input-output-hk/plutus/pulls/comments/238063317"},"html":{"href":"https://github.com/input-output-hk/plutus/pull/300#discussion_r238063317"},"pull_request":{"href":"https://api.github.com/repos/input-output-hk/plutus/pulls/300"}},"in_reply_to_id":233900492},"pull_request":{"url":"https://api.github.com/repos/input-output-hk/plutus/pulls/300","id":230853656,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMwODUzNjU2","html_url":"https://github.com/input-output-hk/plutus/pull/300","diff_url":"https://github.com/input-output-hk/plutus/pull/300.diff","patch_url":"https://github.com/input-output-hk/plutus/pull/300.patch","issue_url":"https://api.github.com/repos/input-output-hk/plutus/issues/300","number":300,"state":"open","locked":false,"title":"Don't run out of gas in unlimited mode","user":{"login":"vmchale","id":13259982,"node_id":"MDQ6VXNlcjEzMjU5OTgy","avatar_url":"https://avatars1.githubusercontent.com/u/13259982?v=4","gravatar_id":"","url":"https://api.github.com/users/vmchale","html_url":"https://github.com/vmchale","followers_url":"https://api.github.com/users/vmchale/followers","following_url":"https://api.github.com/users/vmchale/following{/other_user}","gists_url":"https://api.github.com/users/vmchale/gists{/gist_id}","starred_url":"https://api.github.com/users/vmchale/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vmchale/subscriptions","organizations_url":"https://api.github.com/users/vmchale/orgs","repos_url":"https://api.github.com/users/vmchale/repos","events_url":"https://api.github.com/users/vmchale/events{/privacy}","received_events_url":"https://api.github.com/users/vmchale/received_events","type":"User","site_admin":false},"body":"This PR alters the typechecker such that it will not run out of gas in unlimited mode. ","created_at":"2018-11-14T14:25:06Z","updated_at":"2018-12-01T13:18:40Z","closed_at":null,"merged_at":null,"merge_commit_sha":"0500d0932fa6441128efb0bcf2c055ff83008070","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/input-output-hk/plutus/pulls/300/commits","review_comments_url":"https://api.github.com/repos/input-output-hk/plutus/pulls/300/comments","review_comment_url":"https://api.github.com/repos/input-output-hk/plutus/pulls/comments{/number}","comments_url":"https://api.github.com/repos/input-output-hk/plutus/issues/300/comments","statuses_url":"https://api.github.com/repos/input-output-hk/plutus/statuses/d56f8678850c90207ab5c8ae7fddd37b63e55383","head":{"label":"input-output-hk:plutus-core/add-unlimited-mode","ref":"plutus-core/add-unlimited-mode","sha":"d56f8678850c90207ab5c8ae7fddd37b63e55383","user":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"repo":{"id":73861563,"node_id":"MDEwOlJlcG9zaXRvcnk3Mzg2MTU2Mw==","name":"plutus","full_name":"input-output-hk/plutus","private":false,"owner":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/input-output-hk/plutus","description":"The Plutus language reference implementation and tools","fork":false,"url":"https://api.github.com/repos/input-output-hk/plutus","forks_url":"https://api.github.com/repos/input-output-hk/plutus/forks","keys_url":"https://api.github.com/repos/input-output-hk/plutus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/input-output-hk/plutus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/input-output-hk/plutus/teams","hooks_url":"https://api.github.com/repos/input-output-hk/plutus/hooks","issue_events_url":"https://api.github.com/repos/input-output-hk/plutus/issues/events{/number}","events_url":"https://api.github.com/repos/input-output-hk/plutus/events","assignees_url":"https://api.github.com/repos/input-output-hk/plutus/assignees{/user}","branches_url":"https://api.github.com/repos/input-output-hk/plutus/branches{/branch}","tags_url":"https://api.github.com/repos/input-output-hk/plutus/tags","blobs_url":"https://api.github.com/repos/input-output-hk/plutus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/input-output-hk/plutus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/input-output-hk/plutus/git/refs{/sha}","trees_url":"https://api.github.com/repos/input-output-hk/plutus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/input-output-hk/plutus/statuses/{sha}","languages_url":"https://api.github.com/repos/input-output-hk/plutus/languages","stargazers_url":"https://api.github.com/repos/input-output-hk/plutus/stargazers","contributors_url":"https://api.github.com/repos/input-output-hk/plutus/contributors","subscribers_url":"https://api.github.com/repos/input-output-hk/plutus/subscribers","subscription_url":"https://api.github.com/repos/input-output-hk/plutus/subscription","commits_url":"https://api.github.com/repos/input-output-hk/plutus/commits{/sha}","git_commits_url":"https://api.github.com/repos/input-output-hk/plutus/git/commits{/sha}","comments_url":"https://api.github.com/repos/input-output-hk/plutus/comments{/number}","issue_comment_url":"https://api.github.com/repos/input-output-hk/plutus/issues/comments{/number}","contents_url":"https://api.github.com/repos/input-output-hk/plutus/contents/{+path}","compare_url":"https://api.github.com/repos/input-output-hk/plutus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/input-output-hk/plutus/merges","archive_url":"https://api.github.com/repos/input-output-hk/plutus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/input-output-hk/plutus/downloads","issues_url":"https://api.github.com/repos/input-output-hk/plutus/issues{/number}","pulls_url":"https://api.github.com/repos/input-output-hk/plutus/pulls{/number}","milestones_url":"https://api.github.com/repos/input-output-hk/plutus/milestones{/number}","notifications_url":"https://api.github.com/repos/input-output-hk/plutus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/input-output-hk/plutus/labels{/name}","releases_url":"https://api.github.com/repos/input-output-hk/plutus/releases{/id}","deployments_url":"https://api.github.com/repos/input-output-hk/plutus/deployments","created_at":"2016-11-15T22:38:43Z","updated_at":"2018-11-30T15:53:32Z","pushed_at":"2018-11-30T18:14:51Z","git_url":"git://github.com/input-output-hk/plutus.git","ssh_url":"git@github.com:input-output-hk/plutus.git","clone_url":"https://github.com/input-output-hk/plutus.git","svn_url":"https://github.com/input-output-hk/plutus","homepage":"","size":12722,"stargazers_count":149,"watchers_count":149,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":26,"open_issues":15,"watchers":149,"default_branch":"master"}},"base":{"label":"input-output-hk:master","ref":"master","sha":"a51f2e8bbfad1ce22b3769b1bac9a0b054cadbfd","user":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"repo":{"id":73861563,"node_id":"MDEwOlJlcG9zaXRvcnk3Mzg2MTU2Mw==","name":"plutus","full_name":"input-output-hk/plutus","private":false,"owner":{"login":"input-output-hk","id":12909177,"node_id":"MDEyOk9yZ2FuaXphdGlvbjEyOTA5MTc3","avatar_url":"https://avatars3.githubusercontent.com/u/12909177?v=4","gravatar_id":"","url":"https://api.github.com/users/input-output-hk","html_url":"https://github.com/input-output-hk","followers_url":"https://api.github.com/users/input-output-hk/followers","following_url":"https://api.github.com/users/input-output-hk/following{/other_user}","gists_url":"https://api.github.com/users/input-output-hk/gists{/gist_id}","starred_url":"https://api.github.com/users/input-output-hk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/input-output-hk/subscriptions","organizations_url":"https://api.github.com/users/input-output-hk/orgs","repos_url":"https://api.github.com/users/input-output-hk/repos","events_url":"https://api.github.com/users/input-output-hk/events{/privacy}","received_events_url":"https://api.github.com/users/input-output-hk/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/input-output-hk/plutus","description":"The Plutus language reference implementation and tools","fork":false,"url":"https://api.github.com/repos/input-output-hk/plutus","forks_url":"https://api.github.com/repos/input-output-hk/plutus/forks","keys_url":"https://api.github.com/repos/input-output-hk/plutus/keys{/key_id}","collaborators_url":"https://api.github.com/repos/input-output-hk/plutus/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/input-output-hk/plutus/teams","hooks_url":"https://api.github.com/repos/input-output-hk/plutus/hooks","issue_events_url":"https://api.github.com/repos/input-output-hk/plutus/issues/events{/number}","events_url":"https://api.github.com/repos/input-output-hk/plutus/events","assignees_url":"https://api.github.com/repos/input-output-hk/plutus/assignees{/user}","branches_url":"https://api.github.com/repos/input-output-hk/plutus/branches{/branch}","tags_url":"https://api.github.com/repos/input-output-hk/plutus/tags","blobs_url":"https://api.github.com/repos/input-output-hk/plutus/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/input-output-hk/plutus/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/input-output-hk/plutus/git/refs{/sha}","trees_url":"https://api.github.com/repos/input-output-hk/plutus/git/trees{/sha}","statuses_url":"https://api.github.com/repos/input-output-hk/plutus/statuses/{sha}","languages_url":"https://api.github.com/repos/input-output-hk/plutus/languages","stargazers_url":"https://api.github.com/repos/input-output-hk/plutus/stargazers","contributors_url":"https://api.github.com/repos/input-output-hk/plutus/contributors","subscribers_url":"https://api.github.com/repos/input-output-hk/plutus/subscribers","subscription_url":"https://api.github.com/repos/input-output-hk/plutus/subscription","commits_url":"https://api.github.com/repos/input-output-hk/plutus/commits{/sha}","git_commits_url":"https://api.github.com/repos/input-output-hk/plutus/git/commits{/sha}","comments_url":"https://api.github.com/repos/input-output-hk/plutus/comments{/number}","issue_comment_url":"https://api.github.com/repos/input-output-hk/plutus/issues/comments{/number}","contents_url":"https://api.github.com/repos/input-output-hk/plutus/contents/{+path}","compare_url":"https://api.github.com/repos/input-output-hk/plutus/compare/{base}...{head}","merges_url":"https://api.github.com/repos/input-output-hk/plutus/merges","archive_url":"https://api.github.com/repos/input-output-hk/plutus/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/input-output-hk/plutus/downloads","issues_url":"https://api.github.com/repos/input-output-hk/plutus/issues{/number}","pulls_url":"https://api.github.com/repos/input-output-hk/plutus/pulls{/number}","milestones_url":"https://api.github.com/repos/input-output-hk/plutus/milestones{/number}","notifications_url":"https://api.github.com/repos/input-output-hk/plutus/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/input-output-hk/plutus/labels{/name}","releases_url":"https://api.github.com/repos/input-output-hk/plutus/releases{/id}","deployments_url":"https://api.github.com/repos/input-output-hk/plutus/deployments","created_at":"2016-11-15T22:38:43Z","updated_at":"2018-11-30T15:53:32Z","pushed_at":"2018-11-30T18:14:51Z","git_url":"git://github.com/input-output-hk/plutus.git","ssh_url":"git@github.com:input-output-hk/plutus.git","clone_url":"https://github.com/input-output-hk/plutus.git","svn_url":"https://github.com/input-output-hk/plutus","homepage":"","size":12722,"stargazers_count":149,"watchers_count":149,"language":"Haskell","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":26,"mirror_url":null,"archived":false,"open_issues_count":15,"license":{"key":"mit","name":"MIT License","spdx_id":"MIT","url":"https://api.github.com/licenses/mit","node_id":"MDc6TGljZW5zZTEz"},"forks":26,"open_issues":15,"watchers":149,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/input-output-hk/plutus/pulls/300"},"html":{"href":"https://github.com/input-output-hk/plutus/pull/300"},"issue":{"href":"https://api.github.com/repos/input-output-hk/plutus/issues/300"},"comments":{"href":"https://api.github.com/repos/input-output-hk/plutus/issues/300/comments"},"review_comments":{"href":"https://api.github.com/repos/input-output-hk/plutus/pulls/300/comments"},"review_comment":{"href":"https://api.github.com/repos/input-output-hk/plutus/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/input-output-hk/plutus/pulls/300/commits"},"statuses":{"href":"https://api.github.com/repos/input-output-hk/plutus/statuses/d56f8678850c90207ab5c8ae7fddd37b63e55383"}},"author_association":"CONTRIBUTOR"}}
{"actor":{"display_login":"effectfully"}}