Having issue in running Haskell code in Atom

Hello All, I have started learning Haskell couple of days ago. I was looking for an IDE and found Atom as one of them. When I started using it I installed multiple packages and tried running creating Haskell files and saving it. This IDE always gives me following error. Please help to debug this: [Enter steps to reproduce below:] 1. ... 2. ... **Atom Version**: 1.7.4 **System**: Microsoft Windows 10 Pro **Thrown From**: [haskell-ghc-mod]( https://github.com/atom-haskell/haskell-ghc-mod) package, v1.14.5 ### Stack Trace Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT ``` At Error: spawn ghc-mod ENOENT PATH: undefined path: undefined Path: C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\ATI Technologies\ATI.ACE\Core-Static;C:\Users\Balraj Singh\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL Server\120\Tools\Binn\;C:\Program Files (x86)\Windows Kits\10\Windows Performance Toolkit\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files (x86)\Java\jdk1.7.0_71\lib;C:\Program Files (x86)\Java\jre7\lib;C:\Program Files (x86)\Java\jdk1.7.0_71\bin;C:\Program Files (x86)\Java\jre7\bin;C:\Program Files\Git\cmd;C:\Program Files (x86)\WinMerge;C:\ghc-8.0.1\bin;C:\Users\Balraj Singh\AppData\Local\atom\bin Error at file:///C:/Users/Balraj Singh/.atom/packages/haskell-ghc-mod/lib/util.coffee:60:26 at exithandler (child_process.js:232:5) at ChildProcess.errorhandler (child_process.js:244:5) at emitOne (events.js:77:13) at ChildProcess.emit (events.js:169:7) at Process.ChildProcess._handle.onexit (internal/child_process.js:198:12) at onErrorNT (internal/child_process.js:344:16) at doNTCallback2 (node.js:465:9) at process._tickCallback (node.js:379:17) ``` ### Commands ``` -8:25.4.0 core:backspace (atom-text-editor.editor.is-focused) 3x -8:22 core:save (atom-text-editor.editor.is-focused) -8:00.7.0 tabs:open-in-new-window (li.texteditor.tab.sortable.active.right-clicked) -7:50.5.0 tree-view:show-in-file-manager (span.name.icon.icon-file-text) -3:30.1.0 core:save (atom-text-editor.editor.is-focused) -3:22.2.0 haskell-ghc-mod:go-to-declaration (atom-text-editor.editor.is-focused) 2x -2:53 ide-haskell:prettify-file (atom-text-editor.editor.is-focused) -2:39.2.0 ide-haskell:toggle-output (atom-text-editor.editor.is-focused) -2:34.6.0 ide-haskell-cabal:build (atom-text-editor.editor.is-focused) -2:24.8.0 ide-haskell-cabal:test (atom-text-editor.editor.is-focused) -2:18.5.0 haskell-ghc-mod:check-file (atom-text-editor.editor.is-focused) -2:14.6.0 haskell-ghc-mod:lint-file (atom-text-editor.editor.is-focused) -2:03.4.0 ide-haskell:prettify-file (atom-text-editor.editor.is-focused) -1:53.1.0 haskell-ghc-mod:lint-file (atom-text-editor.editor.is-focused) 2x -0:59.2.0 haskell-ghc-mod:check-file (atom-text-editor.editor.is-focused) -0:03.8.0 haskell-ghc-mod:shutdown-backend (atom-text-editor.editor.is-focused) ``` ### Config ```json {} ``` ### Installed Packages ```coffee # User haskell-ghc-mod, v1.14.5 ide-haskell, v1.6.5 ide-haskell-cabal, v1.4.0 ide-haskell-repl, v0.0.23 language-haskell, v1.7.16 # Dev No dev packages ``` Regards, Balraj Singh

Hello All,
I have started learning Haskell couple of days ago. I was looking for an IDE and found Atom as one of them. When I started using it I installed multiple packages and tried running creating Haskell files and saving it. This IDE always gives me following error. Please help to debug this:
Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT
A quick guess here--ghc-mod is either not installed or is not in your execution path. Try adding it's path to your "Path" variable and try again.

I read the following configuration needs to be set:-
[image: Inline image 1]
But i don't have any .cabal folder. I have .atom folder. Am i missing
something?
Plus you may see i have installed *ide-haskell-cabal, v1.4.0 * in the above
error message.
On Mon, Jun 6, 2016 at 2:30 AM, Sean Gillespie
Hello All,
I have started learning Haskell couple of days ago. I was looking for an IDE and found Atom as one of them. When I started using it I installed multiple packages and tried running creating Haskell files and saving it. This IDE always gives me following error. Please help to debug this:
Haskell-ghc-mod: ghc-mod failed to launch. It is probably missing or misconfigured. ENOENT
A quick guess here--ghc-mod is either not installed or is not in your execution path. Try adding it's path to your "Path" variable and try again.

First you need the Haskell Platform (I would asume you already have it installed?) Run 'cabal install ghc-mod'. If you have cabal, it should now have installed ghc-mod. Now, if you run 'which ghc-mod' (or 'where ghc-mod', or 'whereis ghc-mod', depending on your system) you will get a path to put in ghcModPath.

Hi,
I did try to follow your steps to install ghc-mod via cabal in Windows. But
i believe cabal package that i installed within atom ide is not working
fine. When so ever i am trying to install a dependency using cabal within
atom ide it gives the following error:
[Enter steps to reproduce below:]
1. ...
2. ...
**Atom Version**: 1.7.4
**System**: Microsoft Windows 10 Pro
**Thrown From**: [cabal](https://github.com/edsko/atom-cabal) package,
v0.0.17
### Stack Trace
Uncaught TypeError: path must be a string
```
At fs.js:856
TypeError: path must be a string
at TypeError (native)
at Object.fs.readdirSync (fs.js:856:18)
at Object.fs.readdirSync (ATOM_SHELL_ASAR.js:497:28)
at containsCabalFile (file:///C:/Users/Balraj
Singh/.atom/packages/cabal/lib/cabal.coffee:263:17)
at findCabalFile (file:///C:/Users/Balraj
Singh/.atom/packages/cabal/lib/cabal.coffee:248:13)
at Object.module.exports.Cabal.cabalInstallDeps
(file:///C:/Users/Balraj Singh/.atom/packages/cabal/lib/cabal.coffee:97:30)
at
atom-workspace.subscriptions.add.atom.commands.add.cabal:install-dependencies
(file:///C:/Users/Balraj Singh/.atom/packages/cabal/lib/cabal.coffee:39:8)
at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent
(C:\Users\Balraj
Singh\AppData\Local\atom\app-1.7.4\resources\app.asar\src\command-registry.js:260:29)
at CommandRegistry.handleCommandEvent (C:\Users\Balraj
Singh\AppData\Local\atom\app-1.7.4\resources\app.asar\src\command-registry.js:3:61)
at CommandRegistry.module.exports.CommandRegistry.dispatch
(C:\Users\Balraj
Singh\AppData\Local\atom\app-1.7.4\resources\app.asar\src\command-registry.js:160:19)
at
AtomEnvironment.module.exports.AtomEnvironment.dispatchApplicationMenuCommand
(C:\Users\Balraj
Singh\AppData\Local\atom\app-1.7.4\resources\app.asar\src\atom-environment.js:1100:28)
at EventEmitter.outerCallback (C:\Users\Balraj
Singh\AppData\Local\atom\app-1.7.4\resources\app.asar\src\application-delegate.js:314:25)
at emitTwo (events.js:87:13)
at EventEmitter.emit (events.js:172:7)
```
### Commands
```
-9:33.3.0 cabal:install-dependencies
(atom-text-editor.editor.is-focused)
-8:30.9.0 cabal:build-and-install (atom-text-editor.editor.is-focused)
2x -7:50.9.0 cabal:install-dependencies
(atom-text-editor.editor.is-focused)
-4:40.6.0 command-palette:toggle (atom-text-editor.editor.is-focused)
-4:13.5.0 core:select-all (atom-text-editor.editor.mini.is-focused)
-4:12.6.0 core:paste (atom-text-editor.editor.mini.is-focused)
-4:11 core:confirm (atom-text-editor.editor.mini.is-focused)
-0:08.6.0 cabal:install-dependencies
(atom-text-editor.editor.is-focused)
```
### Config
```json
{}
```
### Installed Packages
```coffee
# User
cabal, v0.0.17
# Dev
No dev packages
```
On Mon, Jun 6, 2016 at 2:59 AM, Jonne Ransijn
First you need the Haskell Platform (I would asume you already have it installed?)
Run 'cabal install ghc-mod'.
If you have cabal, it should now have installed ghc-mod. Now, if you run 'which ghc-mod' (or 'where ghc-mod', or 'whereis ghc-mod', depending on your system) you will get a path to put in ghcModPath.

Try to run the commands from the command line and make sure the Haskell Platform is installed. The cabal package in atom provides a minimal replacement, not the full Haskell Platform.

EDIT: You seem to have https://atom.io/packages/cabal installed, which is deprecated in favor of the ide-haskell-cabal package. Please uninstall this package (and any other packages related to Haskell) and install the ide-haskell-* packages.

On 6/5/16 1:21 PM, Balraj Singh wrote:
I have started learning Haskell couple of days ago. I was looking for an IDE and found Atom as one of them. When I started using it I installed multiple packages and tried running creating Haskell files and saving it. This IDE always gives me following error. Please help to debug this:
Here's an Atom setup how-to: http://github.com/simonmichael/haskell-atom-setup The #haskell-ide IRC channel is also available for troubleshooting.
participants (4)
-
Balraj Singh
-
Jonne Ransijn
-
Sean Gillespie
-
Simon Michael