{"action":"created","issue":{"url":"https://api.github.com/repos/idris-hackers/atom-language-idris/issues/51","labels_url":"https://api.github.com/repos/idris-hackers/atom-language-idris/issues/51/labels{/name}","comments_url":"https://api.github.com/repos/idris-hackers/atom-language-idris/issues/51/comments","events_url":"https://api.github.com/repos/idris-hackers/atom-language-idris/issues/51/events","html_url":"https://github.com/idris-hackers/atom-language-idris/issues/51","id":100434080,"number":51,"title":"Uncaught Error: This socket has been ended by the other party","user":{"login":"jeremy-w","id":29010,"avatar_url":"https://avatars.githubusercontent.com/u/29010?v=3","gravatar_id":"","url":"https://api.github.com/users/jeremy-w","html_url":"https://github.com/jeremy-w","followers_url":"https://api.github.com/users/jeremy-w/followers","following_url":"https://api.github.com/users/jeremy-w/following{/other_user}","gists_url":"https://api.github.com/users/jeremy-w/gists{/gist_id}","starred_url":"https://api.github.com/users/jeremy-w/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jeremy-w/subscriptions","organizations_url":"https://api.github.com/users/jeremy-w/orgs","repos_url":"https://api.github.com/users/jeremy-w/repos","events_url":"https://api.github.com/users/jeremy-w/events{/privacy}","received_events_url":"https://api.github.com/users/jeremy-w/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/idris-hackers/atom-language-idris/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-08-11T23:30:21Z","updated_at":"2015-08-12T20:19:04Z","closed_at":null,"body":"I'm not finding any crash report for the idris executable.\r\n\r\n1. Enter this code (I'm working on the \"Well-Typed Interpreter\" example):\r\n```idris\r\nimport Data.Vect\r\n\r\n-- Start by representing our universe as a product type.\r\ndata Ty = TyInt | TyBool | TyFun Ty Ty\r\n\r\ninterpret : Ty -> Type\r\ninterpret TyInt = Int\r\ninterpret TyBool = Bool\r\ninterpret (TyFun A T) = interpret A -> interpret T\r\n\r\n-- G represents our expression environment.\r\nlet Env = Vect n Ty\r\nusing (G: Env)\r\n    data Expr : Env -> Ty -> Type\r\n```\r\n\r\n2. Try to typecheck it. You'll see a \"process crashed\" message about the idris process exiting with code 1.\r\n4. Try to typecheck it again. This and each further attempt gives this error about writing to a socket whose other end is closed. This error seems to recur each time I try to typecheck.\r\n\r\nI have no idea how to try to restart the connection short of relaunching the entire editor. Suggestions:\r\n\r\n- Add a \"relaunch idris\" command\r\n- Relaunch and reconnect to it automatically (at least a couple times, to avoid spinning on repeated crashers) when it's detected as having exited, since much of the package functionality relies on it\r\n\r\n**Atom Version**: 1.0.5\r\n**System**: Mac OS X 10.10.4\r\n**Thrown From**: [language-idris](https://github.com/idris-hackers/atom-language-idris) package, v0.2.4\r\n\r\n\r\n### Stack Trace\r\n\r\nUncaught Error: This socket has been ended by the other party\r\n\r\n```\r\nAt events.js:141\r\n\r\nError: This socket has been ended by the other party\r\n  at Socket.writeAfterFIN [as write] (net.js:275:12)\r\n  at IdrisIdeMode.send (/Users/jeremy/.atom/packages/language-idris/lib/idris-ide-mode.coffee:24:20)\r\n  at IdrisModel.prepareCommand (/Users/jeremy/.atom/packages/language-idris/lib/idris-model.coffee:64:16)\r\n  at IdrisModel.load (/Users/jeremy/.atom/packages/language-idris/lib/idris-model.coffee:68:6)\r\n  at IdrisController.typecheckFile (/Users/jeremy/.atom/packages/language-idris/lib/idris-controller.coffee:70:8)\r\n  at /Users/jeremy/.atom/packages/language-idris/lib/idris-controller.coffee:1:1\r\n  at atom-text-editor.<anonymous> (/Users/jeremy/.atom/packages/language-idris/lib/idris-controller.coffee:51:7)\r\n  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/homebrew-cask/Caskroom/atom/1.0.5/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)\r\n  at /opt/homebrew-cask/Caskroom/atom/1.0.5/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61\r\n  at CommandPaletteView.module.exports.CommandPaletteView.confirmed (/opt/homebrew-cask/Caskroom/atom/1.0.5/Atom.app/Contents/Resources/app.asar/node_modules/command-palette/lib/command-palette-view.js:159:32)\r\n  at CommandPaletteView.module.exports.SelectListView.confirmSelection (/opt/homebrew-cask/Caskroom/atom/1.0.5/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:338:21)\r\n  at space-pen-div.atom.commands.add.core:confirm (/opt/homebrew-cask/Caskroom/atom/1.0.5/Atom.app/Contents/Resources/app.asar/node_modules/atom-space-pen-views/lib/select-list-view.js:109:19)\r\n  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/opt/homebrew-cask/Caskroom/atom/1.0.5/Atom.app/Contents/Resources/app.asar/src/command-registry.js:241:29)\r\n  at /opt/homebrew-cask/Caskroom/atom/1.0.5/Atom.app/Contents/Resources/app.asar/src/command-registry.js:3:61\r\n  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/opt/homebrew-cask/Caskroom/atom/1.0.5/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:524:16)\r\n  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/opt/homebrew-cask/Caskroom/atom/1.0.5/Atom.app/Contents/Resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:347:22)\r\n  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/opt/homebrew-cask/Caskroom/atom/1.0.5/Atom.app/Contents/Resources/app.asar/src/window-event-handler.js:177:20)\r\n\r\n```\r\n\r\n### Commands\r\n\r\n```\r\n     -0:47.6.0 core:move-right (atom-text-editor.editor.is-focused)\r\n  3x -0:47.4.0 editor:select-to-beginning-of-word (atom-text-editor.editor.is-focused)\r\n     -0:45.9.0 core:save (atom-text-editor.editor.is-focused.autocomplete-active)\r\n     -0:45.7.0 core:move-down (atom-text-editor.editor.is-focused)\r\n  4x -0:45.4.0 editor:move-to-end-of-word (atom-text-editor.editor.is-focused)\r\n  3x -0:44.2.0 editor:select-to-beginning-of-word (atom-text-editor.editor.is-focused)\r\n     -0:42.7.0 core:save (atom-text-editor.editor.is-focused.autocomplete-active)\r\n     -0:25 editor:move-to-end-of-screen-line (atom-text-editor.editor.is-focused)\r\n     -0:23.1.0 core:save (atom-text-editor.editor.is-focused)\r\n  2x -0:15 language-idris:typecheck (atom-text-editor.editor.is-focused)\r\n     -0:08.5.0 editor:consolidate-selections (atom-text-editor.editor.is-focused)\r\n     -0:08.5.0 core:cancel (atom-text-editor.editor.is-focused)\r\n     -0:06.1.0 command-palette:toggle (atom-text-editor.editor.is-focused)\r\n     -0:04.7.0 core:backspace (atom-text-editor.editor.mini.is-focused)\r\n     -0:01.1.0 core:confirm (atom-text-editor.editor.mini.is-focused)\r\n     -0:01.1.0 language-idris:typecheck (atom-text-editor.editor)\r\n```\r\n\r\n### Config\r\n\r\n```json\r\n{\r\n  \"core\": {\r\n    \"themes\": [\r\n      \"atom-material-ui\",\r\n      \"atom-material-syntax\"\r\n    ]\r\n  },\r\n  \"language-idris\": {\r\n    \"pathToIdris\": \"/usr/local/bin/idris\"\r\n  }\r\n}\r\n```\r\n\r\n### Installed Packages\r\n\r\n```coffee\r\n# User\r\natom-material-syntax, v0.2.2\r\natom-material-ui, v0.5.13\r\nautocomplete-haskell, v0.4.5\r\nhaskell-ghc-mod, v0.8.9\r\nide-haskell, v0.7.1\r\nlanguage-haskell, v1.3.1\r\nlanguage-idris, v0.2.4\r\n\r\n# Dev\r\nNo dev packages\r\n```\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/idris-hackers/atom-language-idris/issues/comments/130433739","html_url":"https://github.com/idris-hackers/atom-language-idris/issues/51#issuecomment-130433739","issue_url":"https://api.github.com/repos/idris-hackers/atom-language-idris/issues/51","id":130433739,"user":{"login":"david-christiansen","id":115330,"avatar_url":"https://avatars.githubusercontent.com/u/115330?v=3","gravatar_id":"","url":"https://api.github.com/users/david-christiansen","html_url":"https://github.com/david-christiansen","followers_url":"https://api.github.com/users/david-christiansen/followers","following_url":"https://api.github.com/users/david-christiansen/following{/other_user}","gists_url":"https://api.github.com/users/david-christiansen/gists{/gist_id}","starred_url":"https://api.github.com/users/david-christiansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/david-christiansen/subscriptions","organizations_url":"https://api.github.com/users/david-christiansen/orgs","repos_url":"https://api.github.com/users/david-christiansen/repos","events_url":"https://api.github.com/users/david-christiansen/events{/privacy}","received_events_url":"https://api.github.com/users/david-christiansen/received_events","type":"User","site_admin":false},"created_at":"2015-08-12T20:19:04Z","updated_at":"2015-08-12T20:19:04Z","body":"In the Emacs mode, Idris is always started as a side effect of a user-issued command, such as \"case split this\" or \"type check this\". If it fails to start, or crashes, then the command fails and gives the user an error message. If Idris has crashed, then the next command will attempt to restart it, but it won't get stuck in a loop of repeatedly starting Idris."}}