{"action":"created","comment":{"url":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/comments/238202237","pull_request_review_id":180683680,"id":238202237,"node_id":"MDI0OlB1bGxSZXF1ZXN0UmV2aWV3Q29tbWVudDIzODIwMjIzNw==","diff_hunk":"@@ -176,86 +171,189 @@ pub fn run(opts: Opts) -> Result<(), Error> {\n     Ok(())\n }\n \n-fn eval_print(pikelet: &mut Driver, filemap: &FileMap) -> Result<ControlFlow, Vec<Diagnostic>> {\n+#[derive(Clone)]\n+enum ControlFlow {\n+    Break,\n+    Continue,\n+}\n+\n+/// Commands entered in the REPL\n+#[derive(Debug, Clone)]\n+pub enum ReplCommand {\n+    /// Evaluate a term\n+    ///\n+    /// ```text\n+    /// <term>\n+    /// ```\n+    Eval(String),\n+    /// Show the core representation of a term\n+    ///\n+    /// ```text\n+    /// :core <term>\n+    /// ```\n+    Core(String),\n+    /// Print some help about using the REPL\n+    ///\n+    /// ```text\n+    /// :?\n+    /// :h\n+    /// :help\n+    /// ```\n+    Help,\n+    /// Add a declaration to the REPL environment\n+    ///\n+    /// ```text\n+    /// :let <name> = <term>\n+    /// ```\n+    Let(String, String),\n+    ///  No command\n+    NoOp,\n+    /// Quit the REPL\n+    ///\n+    /// ```text\n+    /// :q\n+    /// :quit\n+    /// ```\n+    Quit,\n+    /// Print the type of the term\n+    ///\n+    /// ```text\n+    /// :t <term>\n+    /// :type <term>\n+    /// ```\n+    TypeOf(String),\n+}\n+\n+impl FromStr for ReplCommand {\n+    type Err = Vec<Diagnostic>;\n+\n+    fn from_str(src: &str) -> Result<ReplCommand, Vec<Diagnostic>> {\n+        use combine::char::*;\n+        use combine::*;\n+\n+        let anys1 = || many1(any());\n+        let spaces = || skip_many(space());\n+        let spaces1 = || skip_many1(space());\n+        let ident = || {\n+            value(())","path":"crates/pikelet-repl/src/lib.rs","position":180,"original_position":180,"commit_id":"b04fc68de6b8a388e6a3b5f3aa702b1344942e16","original_commit_id":"b04fc68de6b8a388e6a3b5f3aa702b1344942e16","user":{"login":"brendanzab","id":695077,"node_id":"MDQ6VXNlcjY5NTA3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/695077?v=4","gravatar_id":"","url":"https://api.github.com/users/brendanzab","html_url":"https://github.com/brendanzab","followers_url":"https://api.github.com/users/brendanzab/followers","following_url":"https://api.github.com/users/brendanzab/following{/other_user}","gists_url":"https://api.github.com/users/brendanzab/gists{/gist_id}","starred_url":"https://api.github.com/users/brendanzab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendanzab/subscriptions","organizations_url":"https://api.github.com/users/brendanzab/orgs","repos_url":"https://api.github.com/users/brendanzab/repos","events_url":"https://api.github.com/users/brendanzab/events{/privacy}","received_events_url":"https://api.github.com/users/brendanzab/received_events","type":"User","site_admin":false},"body":"Yeah, this was mainly for formatting purposes. Like when [using `succeed identity` in an Elm parser](https://github.com/brendanzab/elm-stlc/blob/770b3bae89315c24d3cc7d80ee4449b0fd94cbab/src/Main.elm#L274-L279).","created_at":"2018-12-03T09:54:43Z","updated_at":"2018-12-03T09:54:43Z","html_url":"https://github.com/pikelet-lang/pikelet/pull/182#discussion_r238202237","pull_request_url":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/182","author_association":"MEMBER","_links":{"self":{"href":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/comments/238202237"},"html":{"href":"https://github.com/pikelet-lang/pikelet/pull/182#discussion_r238202237"},"pull_request":{"href":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/182"}},"in_reply_to_id":238195341},"pull_request":{"url":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/182","id":231911602,"node_id":"MDExOlB1bGxSZXF1ZXN0MjMxOTExNjAy","html_url":"https://github.com/pikelet-lang/pikelet/pull/182","diff_url":"https://github.com/pikelet-lang/pikelet/pull/182.diff","patch_url":"https://github.com/pikelet-lang/pikelet/pull/182.patch","issue_url":"https://api.github.com/repos/pikelet-lang/pikelet/issues/182","number":182,"state":"open","locked":false,"title":"[WIP] Driver API cleanups","user":{"login":"brendanzab","id":695077,"node_id":"MDQ6VXNlcjY5NTA3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/695077?v=4","gravatar_id":"","url":"https://api.github.com/users/brendanzab","html_url":"https://github.com/brendanzab","followers_url":"https://api.github.com/users/brendanzab/followers","following_url":"https://api.github.com/users/brendanzab/following{/other_user}","gists_url":"https://api.github.com/users/brendanzab/gists{/gist_id}","starred_url":"https://api.github.com/users/brendanzab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendanzab/subscriptions","organizations_url":"https://api.github.com/users/brendanzab/orgs","repos_url":"https://api.github.com/users/brendanzab/repos","events_url":"https://api.github.com/users/brendanzab/events{/privacy}","received_events_url":"https://api.github.com/users/brendanzab/received_events","type":"User","site_admin":false},"body":"Working towards #175 \r\n\r\n## TODO\r\n\r\n- [x] Clean up existing driver API\r\n- [ ] Move intrinsic registration to driver API\r\n- [ ] API docs for driver API\r\n- [ ] Move REPL command parsing out of the main parser","created_at":"2018-11-19T09:55:54Z","updated_at":"2018-12-03T09:54:43Z","closed_at":null,"merged_at":null,"merge_commit_sha":"8046f3f32c84df8cec464353f2e58aeee2a600b5","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/182/commits","review_comments_url":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/182/comments","review_comment_url":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pikelet-lang/pikelet/issues/182/comments","statuses_url":"https://api.github.com/repos/pikelet-lang/pikelet/statuses/b04fc68de6b8a388e6a3b5f3aa702b1344942e16","head":{"label":"brendanzab:driver-api-refresh","ref":"driver-api-refresh","sha":"b04fc68de6b8a388e6a3b5f3aa702b1344942e16","user":{"login":"brendanzab","id":695077,"node_id":"MDQ6VXNlcjY5NTA3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/695077?v=4","gravatar_id":"","url":"https://api.github.com/users/brendanzab","html_url":"https://github.com/brendanzab","followers_url":"https://api.github.com/users/brendanzab/followers","following_url":"https://api.github.com/users/brendanzab/following{/other_user}","gists_url":"https://api.github.com/users/brendanzab/gists{/gist_id}","starred_url":"https://api.github.com/users/brendanzab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendanzab/subscriptions","organizations_url":"https://api.github.com/users/brendanzab/orgs","repos_url":"https://api.github.com/users/brendanzab/repos","events_url":"https://api.github.com/users/brendanzab/events{/privacy}","received_events_url":"https://api.github.com/users/brendanzab/received_events","type":"User","site_admin":false},"repo":{"id":139324521,"node_id":"MDEwOlJlcG9zaXRvcnkxMzkzMjQ1MjE=","name":"pikelet","full_name":"brendanzab/pikelet","private":false,"owner":{"login":"brendanzab","id":695077,"node_id":"MDQ6VXNlcjY5NTA3Nw==","avatar_url":"https://avatars3.githubusercontent.com/u/695077?v=4","gravatar_id":"","url":"https://api.github.com/users/brendanzab","html_url":"https://github.com/brendanzab","followers_url":"https://api.github.com/users/brendanzab/followers","following_url":"https://api.github.com/users/brendanzab/following{/other_user}","gists_url":"https://api.github.com/users/brendanzab/gists{/gist_id}","starred_url":"https://api.github.com/users/brendanzab/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/brendanzab/subscriptions","organizations_url":"https://api.github.com/users/brendanzab/orgs","repos_url":"https://api.github.com/users/brendanzab/repos","events_url":"https://api.github.com/users/brendanzab/events{/privacy}","received_events_url":"https://api.github.com/users/brendanzab/received_events","type":"User","site_admin":false},"html_url":"https://github.com/brendanzab/pikelet","description":"🥞 (Please don’t repost, this is still a WIP) A friendly little systems language with first-class types.","fork":true,"url":"https://api.github.com/repos/brendanzab/pikelet","forks_url":"https://api.github.com/repos/brendanzab/pikelet/forks","keys_url":"https://api.github.com/repos/brendanzab/pikelet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/brendanzab/pikelet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/brendanzab/pikelet/teams","hooks_url":"https://api.github.com/repos/brendanzab/pikelet/hooks","issue_events_url":"https://api.github.com/repos/brendanzab/pikelet/issues/events{/number}","events_url":"https://api.github.com/repos/brendanzab/pikelet/events","assignees_url":"https://api.github.com/repos/brendanzab/pikelet/assignees{/user}","branches_url":"https://api.github.com/repos/brendanzab/pikelet/branches{/branch}","tags_url":"https://api.github.com/repos/brendanzab/pikelet/tags","blobs_url":"https://api.github.com/repos/brendanzab/pikelet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/brendanzab/pikelet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/brendanzab/pikelet/git/refs{/sha}","trees_url":"https://api.github.com/repos/brendanzab/pikelet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/brendanzab/pikelet/statuses/{sha}","languages_url":"https://api.github.com/repos/brendanzab/pikelet/languages","stargazers_url":"https://api.github.com/repos/brendanzab/pikelet/stargazers","contributors_url":"https://api.github.com/repos/brendanzab/pikelet/contributors","subscribers_url":"https://api.github.com/repos/brendanzab/pikelet/subscribers","subscription_url":"https://api.github.com/repos/brendanzab/pikelet/subscription","commits_url":"https://api.github.com/repos/brendanzab/pikelet/commits{/sha}","git_commits_url":"https://api.github.com/repos/brendanzab/pikelet/git/commits{/sha}","comments_url":"https://api.github.com/repos/brendanzab/pikelet/comments{/number}","issue_comment_url":"https://api.github.com/repos/brendanzab/pikelet/issues/comments{/number}","contents_url":"https://api.github.com/repos/brendanzab/pikelet/contents/{+path}","compare_url":"https://api.github.com/repos/brendanzab/pikelet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/brendanzab/pikelet/merges","archive_url":"https://api.github.com/repos/brendanzab/pikelet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/brendanzab/pikelet/downloads","issues_url":"https://api.github.com/repos/brendanzab/pikelet/issues{/number}","pulls_url":"https://api.github.com/repos/brendanzab/pikelet/pulls{/number}","milestones_url":"https://api.github.com/repos/brendanzab/pikelet/milestones{/number}","notifications_url":"https://api.github.com/repos/brendanzab/pikelet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/brendanzab/pikelet/labels{/name}","releases_url":"https://api.github.com/repos/brendanzab/pikelet/releases{/id}","deployments_url":"https://api.github.com/repos/brendanzab/pikelet/deployments","created_at":"2018-07-01T11:44:48Z","updated_at":"2018-09-04T12:08:56Z","pushed_at":"2018-12-03T08:07:49Z","git_url":"git://github.com/brendanzab/pikelet.git","ssh_url":"git@github.com:brendanzab/pikelet.git","clone_url":"https://github.com/brendanzab/pikelet.git","svn_url":"https://github.com/brendanzab/pikelet","homepage":"https://pikelet-lang.github.io/pikelet/","size":1691,"stargazers_count":1,"watchers_count":1,"language":"Rust","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":0,"open_issues":0,"watchers":1,"default_branch":"master"}},"base":{"label":"pikelet-lang:master","ref":"master","sha":"5c63a09f9c9808a48992843c15b2f23d57a4b242","user":{"login":"pikelet-lang","id":40169168,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMTY5MTY4","avatar_url":"https://avatars0.githubusercontent.com/u/40169168?v=4","gravatar_id":"","url":"https://api.github.com/users/pikelet-lang","html_url":"https://github.com/pikelet-lang","followers_url":"https://api.github.com/users/pikelet-lang/followers","following_url":"https://api.github.com/users/pikelet-lang/following{/other_user}","gists_url":"https://api.github.com/users/pikelet-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/pikelet-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pikelet-lang/subscriptions","organizations_url":"https://api.github.com/users/pikelet-lang/orgs","repos_url":"https://api.github.com/users/pikelet-lang/repos","events_url":"https://api.github.com/users/pikelet-lang/events{/privacy}","received_events_url":"https://api.github.com/users/pikelet-lang/received_events","type":"Organization","site_admin":false},"repo":{"id":114722008,"node_id":"MDEwOlJlcG9zaXRvcnkxMTQ3MjIwMDg=","name":"pikelet","full_name":"pikelet-lang/pikelet","private":false,"owner":{"login":"pikelet-lang","id":40169168,"node_id":"MDEyOk9yZ2FuaXphdGlvbjQwMTY5MTY4","avatar_url":"https://avatars0.githubusercontent.com/u/40169168?v=4","gravatar_id":"","url":"https://api.github.com/users/pikelet-lang","html_url":"https://github.com/pikelet-lang","followers_url":"https://api.github.com/users/pikelet-lang/followers","following_url":"https://api.github.com/users/pikelet-lang/following{/other_user}","gists_url":"https://api.github.com/users/pikelet-lang/gists{/gist_id}","starred_url":"https://api.github.com/users/pikelet-lang/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pikelet-lang/subscriptions","organizations_url":"https://api.github.com/users/pikelet-lang/orgs","repos_url":"https://api.github.com/users/pikelet-lang/repos","events_url":"https://api.github.com/users/pikelet-lang/events{/privacy}","received_events_url":"https://api.github.com/users/pikelet-lang/received_events","type":"Organization","site_admin":false},"html_url":"https://github.com/pikelet-lang/pikelet","description":"(Please don’t repost, this is still a WIP) A friendly little systems language with first-class types and unboxed data.","fork":false,"url":"https://api.github.com/repos/pikelet-lang/pikelet","forks_url":"https://api.github.com/repos/pikelet-lang/pikelet/forks","keys_url":"https://api.github.com/repos/pikelet-lang/pikelet/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pikelet-lang/pikelet/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pikelet-lang/pikelet/teams","hooks_url":"https://api.github.com/repos/pikelet-lang/pikelet/hooks","issue_events_url":"https://api.github.com/repos/pikelet-lang/pikelet/issues/events{/number}","events_url":"https://api.github.com/repos/pikelet-lang/pikelet/events","assignees_url":"https://api.github.com/repos/pikelet-lang/pikelet/assignees{/user}","branches_url":"https://api.github.com/repos/pikelet-lang/pikelet/branches{/branch}","tags_url":"https://api.github.com/repos/pikelet-lang/pikelet/tags","blobs_url":"https://api.github.com/repos/pikelet-lang/pikelet/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pikelet-lang/pikelet/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pikelet-lang/pikelet/git/refs{/sha}","trees_url":"https://api.github.com/repos/pikelet-lang/pikelet/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pikelet-lang/pikelet/statuses/{sha}","languages_url":"https://api.github.com/repos/pikelet-lang/pikelet/languages","stargazers_url":"https://api.github.com/repos/pikelet-lang/pikelet/stargazers","contributors_url":"https://api.github.com/repos/pikelet-lang/pikelet/contributors","subscribers_url":"https://api.github.com/repos/pikelet-lang/pikelet/subscribers","subscription_url":"https://api.github.com/repos/pikelet-lang/pikelet/subscription","commits_url":"https://api.github.com/repos/pikelet-lang/pikelet/commits{/sha}","git_commits_url":"https://api.github.com/repos/pikelet-lang/pikelet/git/commits{/sha}","comments_url":"https://api.github.com/repos/pikelet-lang/pikelet/comments{/number}","issue_comment_url":"https://api.github.com/repos/pikelet-lang/pikelet/issues/comments{/number}","contents_url":"https://api.github.com/repos/pikelet-lang/pikelet/contents/{+path}","compare_url":"https://api.github.com/repos/pikelet-lang/pikelet/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pikelet-lang/pikelet/merges","archive_url":"https://api.github.com/repos/pikelet-lang/pikelet/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pikelet-lang/pikelet/downloads","issues_url":"https://api.github.com/repos/pikelet-lang/pikelet/issues{/number}","pulls_url":"https://api.github.com/repos/pikelet-lang/pikelet/pulls{/number}","milestones_url":"https://api.github.com/repos/pikelet-lang/pikelet/milestones{/number}","notifications_url":"https://api.github.com/repos/pikelet-lang/pikelet/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pikelet-lang/pikelet/labels{/name}","releases_url":"https://api.github.com/repos/pikelet-lang/pikelet/releases{/id}","deployments_url":"https://api.github.com/repos/pikelet-lang/pikelet/deployments","created_at":"2017-12-19T05:15:40Z","updated_at":"2018-12-02T04:02:29Z","pushed_at":"2018-12-03T08:07:51Z","git_url":"git://github.com/pikelet-lang/pikelet.git","ssh_url":"git@github.com:pikelet-lang/pikelet.git","clone_url":"https://github.com/pikelet-lang/pikelet.git","svn_url":"https://github.com/pikelet-lang/pikelet","homepage":"https://pikelet-lang.github.io/pikelet/","size":4654,"stargazers_count":226,"watchers_count":226,"language":"Rust","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":15,"mirror_url":null,"archived":false,"open_issues_count":41,"license":{"key":"apache-2.0","name":"Apache License 2.0","spdx_id":"Apache-2.0","url":"https://api.github.com/licenses/apache-2.0","node_id":"MDc6TGljZW5zZTI="},"forks":15,"open_issues":41,"watchers":226,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/182"},"html":{"href":"https://github.com/pikelet-lang/pikelet/pull/182"},"issue":{"href":"https://api.github.com/repos/pikelet-lang/pikelet/issues/182"},"comments":{"href":"https://api.github.com/repos/pikelet-lang/pikelet/issues/182/comments"},"review_comments":{"href":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/182/comments"},"review_comment":{"href":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pikelet-lang/pikelet/pulls/182/commits"},"statuses":{"href":"https://api.github.com/repos/pikelet-lang/pikelet/statuses/b04fc68de6b8a388e6a3b5f3aa702b1344942e16"}},"author_association":"MEMBER"}}
{"actor":{"display_login":"brendanzab"}}