4

I'm trying to use the Ide-Haskell package for atom, but for some reason, it's not working.

First, I have ghc-mod and stylish haskell installed in sandboxes under ~/lib/. Here is what my config.cson file looks like:

athan@THETA ~> cat ~/.atom/config.cson
'global':
  'exception-reporting':
    'userId': '3b5a8a6c-7778-b310-6a5f-d8ecc314b30f'
  'welcome':
    'showOnStartup': false
  'core':
    'themes': [
      'atom-dark-ui'
      'seti-syntax'
    ]
  'ide-haskell':
    'ghcModPath': '/home/athan/lib/ghc-mod-5.2.1.1/.cabal-sandbox/bin/ghc-mod'
    'stylishHaskellPath': '/home/athan/lib/stylish-haskell-0.5.11.0/.cabal-sandbox/bin/stylish-haskell'
  'editor':
    'fontSize': 14
    'showIndentGuide': true
    'showInvisibles': true
    'softWrapAtPreferredLineLength': true
    'invisibles': {}

I've tested those paths, and they're correct - I can call command --help, etc.

I'm also currently running linux, not Mac, so I had to add some keymappings:

athan@THETA ~> cat ~/.atom/keymap.cson
'.workspace':
  'ctrl-alt-o': 'ide-haskell:toggle-output'
'.editor':
  'ctrl-alt-s': 'ide-haskell:prettify-file'

These register just fine, and are visible in the ide-haskell's package settings. However, issuing the keystroke doesn't do anything (It used to open a file and save-as, respectively).

Where am I most likely to have screwed up? I installed ide-haskell before finishing the ghc-mod installation, but that shouldn't really matter... the links are correct. If anyone could help with this, I would be ecstatic :)

Athan Clark
  • 3,886
  • 2
  • 21
  • 39
  • 1
    I can't help with your situation but my good & apparently narcissistic heart wants me to inform you that I've used Atom with ide-haskell for a while and the similar Sublime Haskell for even longer, and then I stumbled to EclipseFP and found it's way way way more superior to it, so if you can forgive yourself for running Java, I recommend you try it out, and either way best of luck. – MasterMastic Dec 24 '14 at 16:09

2 Answers2

6

You need to create a cabal project in the directory you're working in. Just run cabal init and answer the questions. Then open atom in the current directory. The Haskell IDE menu should appear.

machunter
  • 967
  • 1
  • 11
  • 27
4

I know this is old but I want to mention that if you are using stack then you can run stack exec atom to run atom within your configured Haskell environment. That works great for me on Windows.

jrk
  • 656
  • 6
  • 16