Giter Club home page Giter Club logo

ide-haskell's Introduction

IDE-Haskell

Welcome to IDE-Haskell plugin for amazing Atom editor! This plugin is intended to help you with development in Haskell.

NOTE: You must install dependencies in addition to installing the package itself. Refer to documentation site https://atom-haskell.github.io/ for setup and usage instructions.

Features

Here is a brief and incomplete overview. Visit https://atom-haskell.github.io/ for more details.

Errors, warnings and linter

errors

Get type/info

typeinfo

Insert type

typeins

Code prettify/format

prettify

Build and test project

If you have ide-haskell-cabal or similar package installed, you can build, clean and test your project from ide-haskell (stack and cabal supported)

Autocompletion

autocompletion

API

Ide-haskell provides service-hub API with ide-haskell-upi service.

More information is available in lib/upi.coffee source file

TODO

  • Cabal project autodetection (via language-haskell)
  • Errors, warnings and linter (via haskell-ghc-mod)
  • Get type at point (via haskell-ghc-mod)
  • Autocompletion (via haskell-ghc-mod and autocomplete-haskell)
  • Code beautify
  • Cabal project management (with ide-haskell-cabal)
  • Jump to definition (since haskell-ghc-mod 1.3.0, or with ide-haskell-hasktags)
  • Interactive REPL (with ide-haskell-repl)
  • Stack project management (with ide-haskell-cabal)
  • Who calls and vice versa
  • Documentation support (alpha, with ide-haskell-hoogle)

Changelog

Changelog is available here.

License

Copyright © 2014 Alexander Chaika
Copyright © 2015 Atom-Haskell

Contributors (by number of commits):

  • Nikolay Yakimov
  • Alexander Chaika
  • John Quigley
  • Ondřej Janošík
  • Luka Horvat
  • Gabriel Gonzalez
  • Daniel Beskin
  • Gabor Greif
  • Daniel Gröber

See the LICENSE.md for details.

ide-haskell's People

Contributors

chaika2013 avatar danielg avatar gabriella439 avatar ggreif avatar gitter-badger avatar jmquigs avatar lierdakil avatar lukahorvat avatar ncreep avatar zlondrej avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

ide-haskell's Issues

tooltips.less wasn't found

Carried over from atom/settings-view#418 reported by @josgraham.

When enabling the ide-haskell package together with the Unity UI theme it throws this error:

Error compiling Less stylesheet: /Users/[user]/.atom/packages/ide-haskell/styles/ide-haskell.less
Line number: 9
'tooltips.less' wasn't found

The problem is that the Unity theme uses a tooltip.less filename (without the "s"), which then can't be found when trying to import it.

Something that might work instead:

  1. Remove the @import "tooltips";
  2. Change the markup to use the "default" tooltip classes. Maybe something like this:
<div class="tooltip ide-haskell-tooltip">
  <div class="tooltip-inner">Message</div>
</div>

That should style the tooltip with the "default" styles + override it with the custom styling from this package.

Let me know if you get stuck.

Better show type, show info

Would it be possible to implement "Show type" called via keyboard? Or even better - automatically show the type in status bar?

mousemove is fired even if mouse is standing still, causing type checking to blink

When I updated to all the newest versions of both ide-haskell and atom I had a really annoying flicker on the type checking.

I managed to track it down to
edditor-control.coffee where the mousemove event was being fired even if the mouse wasn't moving
i made a dirty but effective fix

# show expression type if mouse stopped somewhere
@lastpixelpos = {top:0, left:0}
@subscriber.subscribe @scroll, 'mousemove', (e) =>
  @newpixelpos = pixelPositionFromMouseEvent(@editor, e)
  if not (@lastpixelpos.top == @newpixelpos.top && @lastpixelpos.left == @newpixelpos.left)
    @lastpixelpos = @newpixelpos
    @clearExprTypeTimeout()
    @exprTypeTimeout = setTimeout (=>
      @showExpressionType e
    ), atom.config.get('ide-haskell.expressionTypeInterval')
@subscriber.subscribe @scroll, 'mouseout', (e) =>
  @clearExprTypeTimeout()

Uncaught TypeError: Cannot read property 'dispose' of null

Using ide-haskel 0.5.1 I get Uncaught TypeError: Cannot read property 'dispose' of null error when closing a tab.

The offending line is editor-control.coffee:154:

@tooltipMarkers.dispose()

Changing it to:

@tooltipMarkers?.dispose()

fixes the issue in my use case. But maybe there's a more serious issue with the life-cycle of the @tooltipMarkers property.

faied to activate package named 'ide-haskell' Error: spawn EACCES

Hi...I'm getting this error:

Failed to activate package named 'ide-haskell' Error: spawn EACCES
  at exports._errnoException (util.js:742:11)
  at ChildProcess.spawn (child_process.js:1160:11)
  at Object.exports.spawn (child_process.js:993:9)
  at new BufferedProcess (/opt/atom/resources/app/src/buffered-process.js:40:37)
  at run (/home/yo/.atom/packages/ide-haskell/lib/util-ghc-mod.coffee:14:14)
  at Object.flag (/home/yo/.atom/packages/ide-haskell/lib/util-ghc-mod.coffee:145:3)
  at PendingBackend.processPendingTask (/home/yo/.atom/packages/ide-haskell/lib/pending-backend.coffee:49:26)
  at PendingBackend.start (/home/yo/.atom/packages/ide-haskell/lib/pending-backend.coffee:24:6)
  at MainCompletionDatabase.rebuild (/home/yo/.atom/packages/ide-haskell/lib/completion-db.coffee:63:39)
  at new MainCompletionDatabase (/home/yo/.atom/packages/ide-haskell/lib/completion-db.coffee:46:6)
  at PluginManager.createCompletionDatabase (/home/yo/.atom/packages/ide-haskell/lib/plugin-manager.coffee:168:20)
  at new PluginManager (/home/yo/.atom/packages/ide-haskell/lib/plugin-manager.coffee:21:6)
  at Object.activate (/home/yo/.atom/packages/ide-haskell/lib/ide-haskell.coffee:23:24)
  at Package.module.exports.Package.activateNow (/opt/atom/resources/app/src/package.js:198:27)
  at /opt/atom/resources/app/src/package.js:184:28
  at Package.module.exports.Package.measure (/opt/atom/resources/app/src/package.js:130:15)
  at Package.module.exports.Package.activate (/opt/atom/resources/app/src/package.js:178:14)
  at PackageManager.module.exports.PackageManager.activatePackage (/opt/atom/resources/app/src/package-manager.js:404:21)
  at /opt/atom/resources/app/src/package-manager.js:295:19
  at /opt/atom/resources/app/src/config.js:135:18
  at Emitter.module.exports.Emitter.emit (/opt/atom/resources/app/node_modules/event-kit/lib/emitter.js:71:11)
  at Config.module.exports.Config.setRawValue (/opt/atom/resources/app/src/config.js:364:29)
  at Config.module.exports.Config.set (/opt/atom/resources/app/src/config.js:172:12)
  at Config.module.exports.Config.removeAtKeyPath (/opt/atom/resources/app/src/config.js:268:12)
  at Package.module.exports.Package.enable (/opt/atom/resources/app/src/package.js:115:26)
  at PackageManager.module.exports.PackageManager.enablePackage (/opt/atom/resources/app/src/package-manager.js:123:14)
  at HTMLButtonElement.<anonymous> (/opt/atom/resources/app/node_modules/settings-view/lib/installed-package-view.js:185:27)
  at HTMLButtonElement.jQuery.event.dispatch (/opt/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
  at HTMLButtonElement.elemData.handle (/opt/atom/resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
 /opt/atom/resources/app/src/package.js:203

maybe would be related to how ide-haskell communicate with ghc-mod, I've (recently) installed ghc-mod-5.1.1.0 ..do you know how fix it???....thanks....

Closing a file throws an error

tested with both 0.5.0 and 0.5.1

TypeError: Cannot read property 'dispose' of null
  at EditorControl.hideExpressionType (/home/creek/.atom/packages/ide-haskell/lib/editor-control.coffee:154:20)
  at EditorControl.clearExprTypeTimeout (/home/creek/.atom/packages/ide-haskell/lib/editor-control.coffee:80:6)
  at EditorControl.deactivate (/home/creek/.atom/packages/ide-haskell/lib/editor-control.coffee:69:6)
  at PluginManager.removeController (/home/creek/.atom/packages/ide-haskell/lib/plugin-manager.coffee:88:31)
  at /home/creek/.atom/packages/ide-haskell/lib/plugin-manager.coffee:85:10
  at Emitter.module.exports.Emitter.emit (/usr/share/atom/resources/app.asar/node_modules/event-kit/lib/emitter.js:82:11)
  at TextEditor.module.exports.TextEditor.destroyed (/usr/share/atom/resources/app.asar/src/text-editor.js:265:27)
  at TextEditor.module.exports.Model.destroy (/usr/share/atom/resources/app.asar/node_modules/theorist/lib/model.js:218:14)
  at Pane.module.exports.Pane.destroyItem (/usr/share/atom/resources/app.asar/src/pane.js:444:18)
  at Pane.module.exports.Pane.destroyActiveItem (/usr/share/atom/resources/app.asar/src/pane.js:419:12)
  at Workspace.module.exports.Workspace.destroyActivePaneItem (/usr/share/atom/resources/app.asar/src/workspace.js:593:35)
  at Workspace.module.exports.Workspace.destroyActivePaneItemOrEmptyPane (/usr/share/atom/resources/app.asar/src/workspace.js:632:21)
  at atom-workspace.atom.commands.add.core:close (/usr/share/atom/resources/app.asar/src/workspace-element.js:311:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:238:29)
  at /usr/share/atom/resources/app.asar/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:520:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app.asar/node_modules/atom-keymap/lib/keymap-manager.js:355:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app.asar/src/window-event-handler.js:178:20)

Can't install

I have Installed all dependencies running

sudo apt-get install haskell-platform
sudo apt-get install cabal-install
cabal update
cabal install stylish-haskell
cabal install ghc-mod

Then I attempted to run apm install ide-haskell which yielded

Installing ide-haskell to /home/arengorn/.atom/packages ✗

npm ERR! Failed resolving git HEAD (https://github.com/saschagehlich/autocomplete-plus.git) fatal: ambiguous argument 'feature/api': unknown revision or path not in the working tree.
npm ERR! Failed resolving git HEAD (https://github.com/saschagehlich/autocomplete-plus.git) Use '--' to separate paths from revisions, like this:
npm ERR! Failed resolving git HEAD (https://github.com/saschagehlich/autocomplete-plus.git) 'git <command> [<revision>...] -- [<file>...]'
npm ERR! Failed resolving git HEAD (https://github.com/saschagehlich/autocomplete-plus.git) 
npm ERR! Linux 3.13.0-45-generic
npm ERR! argv "/opt/atom/resources/app/apm/bin/node" "/opt/atom/resources/app/apm/node_modules/npm/bin/npm-cli.js" "--globalconfig" "/opt/atom/resources/app/apm/.apmrc" "--userconfig" "/home/arengorn/.atom/.apmrc" "install" "/tmp/d-11512-19491-1u6xu8s/package.tgz" "--target=0.20.0" "--arch=x64"
npm ERR! node v0.10.35
npm ERR! npm  v2.3.0
npm ERR! code 128

npm ERR! Command failed: fatal: ambiguous argument 'feature/api': unknown revision or path not in the working tree.
npm ERR! Use '--' to separate paths from revisions, like this:
npm ERR! 'git <command> [<revision>...] -- [<file>...]'
npm ERR! 
npm ERR! 
npm ERR! If you need help, you may report this error at:
npm ERR!     <http://github.com/npm/npm/issues>

npm ERR! Please include the following file with any support request:
npm ERR!     /tmp/apm-install-dir-11512-19491-210w5y/npm-debug.log

Cabal projects recognition while cabal sandboxes used

I cannot get auto detection of cabal project working out of the box on my MacOS Mavericks. (Used cabal sandbox init)

Every time I open or drag the cabal sandbox project into Atom, I also need to go to packages, search for Ide Haskell and afterwords disable&enable it. Doing so, I can benefit from almost all the features from this extension.

However I couldn't make the autocompletion working. I have autocomplete plus, but Ide Haskell is not reacting at all while I'm typing 'import' or '{-# LANGUAGES...

How is the list for autocompletion generated? Via ghc-mod list ?

Any ideas how I can track the errors/problems of it?

Failed to spawn command ghc-mod. Make sure ghc-mod is installed and on your PATH

Hello,

I have installed ghc-mod and changed the config file to this :

~ ~ ~

"*":
"exception-reporting":
userId: "ce46dcf7-b4e1-7b78-0f53-69a2b3d313b9"
welcome:
showOnStartup: false
core:
{}
editor:
invisibles:
{}

'ide-haskell':
'ghcModPath': 'home/roelof/cabal/bin/ghcmod'
'stylishHaskellPath': '/home/roelof/cabal/bin/stylish-haskell'

~ ~ ~

but still the above error message
What did I do wrong here ?

Roelof

[object Object].removeClassFromAllLines is deprecated.

Running on v0.124. Deprecation Cop produced this:

Use decorations instead: http://blog.atom.io/2014/07/24/decorations.html

[object Object].removeClassFromAllLines (/Applications/Atom.app/Contents/Resources/app/src/editor-view.js:95:13)
EditorControl.render (/Users/samuelainsworth/.atom/packages/ide-haskell/lib/editor-control.coffee:132:21)
HTMLDivElement.<anonymous> (/Users/samuelainsworth/.atom/packages/ide-haskell/lib/editor-control.coffee:31:24)
HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
Object.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594:12)
HTMLDivElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119:17)
Function.jQuery.extend.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590:23)
EditorView.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237:17)
EditorView.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118:15)
[object Object].componentDidUpdate (/Applications/Atom.app/Contents/Resources/app/src/editor-component.js:262:38)
CallbackQueue.notifyAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/CallbackQueue.js:75:22)
ReactReconcileTransaction.ON_DOM_READY_QUEUEING.close (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactReconcileTransaction.js:88:26)
ReactReconcileTransaction.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42)
ReactReconcileTransaction.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16)
ReactUpdatesFlushTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:141:20)
ReactUpdatesFlushTransaction.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:98:38)
flushBatchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:176:19)
ReactDefaultBatchingStrategyTransaction.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42)
ReactDefaultBatchingStrategyTransaction.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16)
Object.batchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactDefaultBatchingStrategy.js:70:19)
Object.enqueueUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:209:22)
[object Object].forceUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1232:18)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/editor-component.js:303:28)

console error for tooltip

Everytime the tooltip is supposed to show, the console catch an error (see screenshot). I'm running the windows version of Atom editor.
console_error

Uncaught TypeError: undefined is not a function

Whenever there's an attempt to get type at point, ide-haskell crashes (Atom is fine, but no ide-haskell operation works anymore).

The console pop with an error saying:
Uncaught TypeError: undefined is not a function - g:\Atom\resources\app\src\buffered-process.js:21

G:\Atom is where Atom is installed on my machine.
It is Atom 0.127.0, running on Windows 7 x64 SP1.
ghc-mod version 4.1.6 compiled by GHC 7.8.3.

If it's related, on startup there are tons (200 or so) warning messages polluting the Developer Tools console, all saying "got something strange from ghc-mod" from file "util-ghc-mod.coffee:169". Each message has an Array[1] inside, with function signatures for random functions (some from my file, some just from Prelude).

This doesn't seem to be related to my specific code, as it happens with every source file I've tried so far.

[object Object].removeClassFromAllLines is deprecated.

(sent directly from Atom)

Use decorations instead: http://blog.atom.io/2014/07/24/decorations.html

[object Object].removeClassFromAllLines (/Applications/Atom.app/Contents/Resources/app/src/editor-view.js:95:13)
EditorControl.render (/Users/ilau/.atom/packages/ide-haskell/lib/editor-control.coffee:132:21)
HTMLDivElement.<anonymous> (/Users/ilau/.atom/packages/ide-haskell/lib/editor-control.coffee:31:24)
HTMLDivElement.jQuery.event.dispatch (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4676:9)
HTMLDivElement.elemData.handle (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4360:46)
Object.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:4594:12)
HTMLDivElement.<anonymous> (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5119:17)
Function.jQuery.extend.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:590:23)
EditorView.each (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:237:17)
EditorView.trigger (/Applications/Atom.app/Contents/Resources/app/node_modules/space-pen/vendor/jquery.js:5118:15)
[object Object].componentDidUpdate (/Applications/Atom.app/Contents/Resources/app/src/editor-component.js:262:38)
CallbackQueue.notifyAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/CallbackQueue.js:75:22)
ReactReconcileTransaction.ON_DOM_READY_QUEUEING.close (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactReconcileTransaction.js:88:26)
ReactReconcileTransaction.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42)
ReactReconcileTransaction.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16)
ReactUpdatesFlushTransaction.Mixin.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:141:20)
ReactUpdatesFlushTransaction.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:98:38)
flushBatchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:176:19)
ReactDefaultBatchingStrategyTransaction.closeAll (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:214:42)
ReactDefaultBatchingStrategyTransaction.perform (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/Transaction.js:155:16)
Object.batchedUpdates (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactDefaultBatchingStrategy.js:70:19)
Object.enqueueUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactUpdates.js:209:22)
[object Object].forceUpdate (/Applications/Atom.app/Contents/Resources/app/node_modules/react-atom-fork/lib/ReactCompositeComponent.js:1232:18)
<unknown> (/Applications/Atom.app/Contents/Resources/app/src/editor-component.js:303:28)

Uncaught TypeError: Cannot read property 'on' of undefined

Hi folks, I just recently installed the latest version of ghc-mod. It works fine, I've tested it a few times. Just wondering what could cause this issue.

Atom Version: 0.198.0
System: linux 3.19.0-15-generic
Thrown From: ide-haskell package, v0.3.6

Stack Trace

Uncaught TypeError: Cannot read property 'on' of undefined

At /home/athan/.atom/packages/ide-haskell/lib/util-ghc-mod.coffee:26

TypeError: Cannot read property 'on' of undefined
  at run (/home/athan/.atom/packages/ide-haskell/lib/util-ghc-mod.coffee:26:15)
  at Object.check [as func] (/home/athan/.atom/packages/ide-haskell/lib/util-ghc-mod.coffee:37:3)
  at PendingBackend.processPendingTask (/home/athan/.atom/packages/ide-haskell/lib/pending-backend.coffee:49:26)
  at PendingBackend.start (/home/athan/.atom/packages/ide-haskell/lib/pending-backend.coffee:24:6)
  at PluginManager.checkOrLintFile (/home/athan/.atom/packages/ide-haskell/lib/plugin-manager.coffee:73:31)
  at PluginManager.checkFile (/home/athan/.atom/packages/ide-haskell/lib/plugin-manager.coffee:40:6)
  at atom-workspace._disposables.add.atom.commands.add.ide-haskell:check-file (/home/athan/.atom/packages/ide-haskell/lib/ide-haskell.coffee:50:22)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:238:29)
  at CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app.asar/src/command-registry.js:3:61)
  at CommandRegistry.module.exports.CommandRegistry.dispatch (/usr/share/atom/resources/app.asar/src/command-registry.js:153:19)
  at EventEmitter.<anonymous> (/usr/share/atom/resources/app.asar/src/window-event-handler.js:71:30)
  at emitOne (events.js:77:13)
  at EventEmitter.emit (events.js:166:7)

Commands

  2x -2:28.6.0 core:confirm (atom-text-editor.editor.mini.is-focused)
 10x -1:04.5.0 core:backspace (atom-text-editor.editor.mini.is-focused)
  2x -0:58.2.0 core:confirm (atom-text-editor.editor.mini.is-focused)
 10x -0:53.1.0 core:backspace (atom-text-editor.editor.mini.is-focused)
     -0:01.0 ide-haskell:check-file (atom-text-editor.editor.is-focused)

Config

{
  "core": {},
  "ide-haskell": {
    "ghcModPath": "/home/athan/lib/ghc-mod/.cabal-sandbox/bin"
  }
}

Installed Packages

# User
color-picker, v1.7.0
ide-haskell, v0.3.6
language-haskell, v1.0.0
linter, v0.12.2
linter-hlint, v0.3.4

# Dev
No dev packages

Empty menu item

After installing ide-haskell I have an empty menu item in the Atom main menu bar:

atom-haskell-ide

Warnings and Errors aren't shown inline

I'm not sure if I'm doing something wrong, but I've setup my paths to ghc-mod and stylish-haskell, and it seems that the typechecking works, but it doesn't display it inline

no ide-haskell section inside config.cson

Hi...I just downlaoded the extension but I can't found any section called ide-haskell in my config file, Need I add this by hand or this must be added automatically when the plugin install??..

by the way, there is a misspelling in the documentation, is config.cson not config.scon...

Failed to activate the ide-haskell package

Just try to load a cabal created haskel project.

Atom Version: 0.187.0
System: Mac OS X 10.10.2
Thrown From: ide-haskell package, v0.3.5

Stack Trace

Failed to activate the ide-haskell package

At spawn EACCES

Error: spawn EACCES
    at exports._errnoException (util.js:753:11)
    at ChildProcess.spawn (child_process.js:1160:11)
    at Object.exports.spawn (child_process.js:993:9)
    at new BufferedProcess (/Applications/Atom.app/Contents/Resources/app/src/buffered-process.js:51:37)
    at run (/Users/rchipman/.atom/packages/ide-haskell/lib/util-ghc-mod.coffee:24:12)
    at Object.flag (/Users/rchipman/.atom/packages/ide-haskell/lib/util-ghc-mod.coffee:226:12)
    at PendingBackend.processPendingTask (/Users/rchipman/.atom/packages/ide-haskell/lib/pending-backend.coffee:61:39)
    at PendingBackend.start (/Users/rchipman/.atom/packages/ide-haskell/lib/pending-backend.coffee:27:19)
    at MainCompletionDatabase.rebuild (/Users/rchipman/.atom/packages/ide-haskell/lib/completion-db.coffee:101:45)
    at new MainCompletionDatabase (/Users/rchipman/.atom/packages/ide-haskell/lib/completion-db.coffee:83:12)

Commands

Config

{
  "core": {
    "ignoredNames": [
      ".git",
      ".svn",
      ".DS_Store"
    ]
  },
  "ide-haskell": {
    "ghcModPath": "/Users/rchipman/Library/Haskell/bin",
    "stylishHaskellPath": "/Users/rchipman/Library/Haskell/bin"
  }
}

Installed Packages

# User
autocomplete-plus, v2.4.2
ide-haskell, v0.3.5
language-haskell, v1.0.0
wakatime, v4.0.1

# Dev
No dev packages

Errors and warnings location detection failed

After build my cabal test project, I see warning:

This binding for `x' shadows the existing binding
defined at E:\Haskell\OpenGL\main.hs:87:1

After click on it, new tab is created with Path: E:\Haskell\OpenGL\Haskell\OpenGL\main.hs where
Haskell\OpenGL\Haskell\OpenGL is duplicated

Folder structure
E
|---Haskell
|---|---OpenGL
|---|---|---shaders.cabal
|---|---|---main.hs

Enable ide-haskell on standalone .hs files

When I'm prototyping something in Haskell, I like doing it outside of a Cabal project so that I don't have to worry about managing the .cabal file while I'm trying out different libraries and moving code around a lot. Could you add a feature that if no Cabal project is detected, ide-haskell would treat the file as a standalone Haskell file and operate appropriately?

Use ghc-modi for performance

As has been noted in ghc-mod (DanielG/ghc-mod#253) and ghcmod-vim (eagletmt/ghcmod-vim#48), using ghc-modi rather than ghc-mod has the benefit that results are cached a la hdevtools.

It may be worthwhile to go the same route: start a ghc-modi process when a project is opened, pass queries to it while the project is open, parsing the results, and close the process when the project closes.

Installed OK but no functionality

Sorry I have probably done something wrong, but cant seem to get this to work.

I have followed the installation instructions and I have a directory with a Haskell file and a CABAL project. When I load the directory the ide-haskell menu pops up so I think it is recognising the project. However, there is no syntax highlighting and Haskell is not available as an option if I click on the plain text link at the bottom right.

The toggle panel option of the menu works but all the other options seem to do nothing. Not even displaying an error to say it can't find ghc-mod for example.

I am guessing I have made a stupid mistake, but can't see it.

Any ideas?

I am running on windows 7

TIA,

Graham

Uncaught type error

Uncaught TypeError: Cannot read property 'start' of null
/usr/share/atom/resources/app/src/workspace.js:614
Hide Stack Trace
TypeError: Cannot read property 'start' of null
  at CompletionDatabase._update (/home/isaac/.atom/packages/ide-haskell/lib/completion-db.coffee:35:38)
  at CompletionDatabase.update (/home/isaac/.atom/packages/ide-haskell/lib/completion-db.coffee:29:6)
  at CompleteProvider.buildCompletionList (/home/isaac/.atom/packages/ide-haskell/lib/complete-provider.coffee:296:18)
  at CompleteProvider.buildCompletionList (/home/isaac/.atom/packages/ide-haskell/lib/complete-provider.coffee:1:1)
  at CompleteProvider.onSaved (/home/isaac/.atom/packages/ide-haskell/lib/complete-provider.coffee:97:6)
  at /home/isaac/.atom/packages/ide-haskell/lib/complete-provider.coffee:1:1
  at TextBuffer.module.exports.Emitter.emit (/usr/share/atom/resources/app/node_modules/emissary/lib/emitter.js:118:15)
  at TextBuffer.module.exports.TextBuffer.saveAs (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:973:19)
  at TextBuffer.module.exports.TextBuffer.save (/usr/share/atom/resources/app/node_modules/text-buffer/lib/text-buffer.js:954:19)
  at TextEditor.module.exports.TextEditor.save (/usr/share/atom/resources/app/src/text-editor.js:585:26)
  at Pane.module.exports.Pane.saveItem (/usr/share/atom/resources/app/src/pane.js:511:16)
  at Pane.module.exports.Pane.saveActiveItem (/usr/share/atom/resources/app/src/pane.js:501:19)
  at Workspace.module.exports.Workspace.saveActivePaneItemAndReportErrors (/usr/share/atom/resources/app/src/workspace.js:603:44)
  at Workspace.module.exports.Workspace.saveActivePaneItem (/usr/share/atom/resources/app/src/workspace.js:593:19)
  at atom-workspace.atom.commands.add.core:save (/usr/share/atom/resources/app/src/workspace-element.js:295:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/usr/share/atom/resources/app/src/command-registry.js:243:29)
  at /usr/share/atom/resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:549:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/usr/share/atom/resources/app/node_modules/atom-keymap/lib/keymap-manager.js:391:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/usr/share/atom/resources/app/src/window-event-handler.js:167:20)

Checking and linting not working with Cabal 1.22.0.0

Precisely, what seems to matter is the version of Cabal which configured the project directory.

From a clean package base:

~/project$ cabal install cabal-install-1.20.0.6 -j
~/project$ cabal install ghc-mod-5.2.1.2 -j
~/project$ cabal clean && cabal configure
~/project$ atom

At this point, if I produce syntax errors in a source file, I get error messages as expected.

~/project$ cabal install cabal-install-1.22.0.0 -j
~/project$ atom

Behaviour remains functional as expected.

~/project$ cabal clean && cabal configure
~/project$ atom

Now it is impossible to produce error / warning / lint messages for this project.

Reverting back to cabal-install-1.20.0.6 and reconfiguring fixes the problem.

The bug occurs independently of the project, including on a minimal Hello World project.

Uncaught TypeError: undefined is not a function

Uncaught TypeError: undefined is not a function editor-control.coffee:118
EditorControl.showExpressionType editor-control.coffee:118
(anonymous function) editor-control.coffee:48

I'm on Atom version 0.124.

user error (ghc not found) when running ghc-mod

Interesting plugin. :)

Not sure if this is a bug, but I didn't find a mailing list for questions, so I thought I'd try here. I am getting the following issue:

got something strange from ghc-mod check: ["user error (ghc not found)", unique: function]0: "user error (ghc not found)"length: 1__proto__: Array[0]

got something strange from ghc-mod lint: ["user error (ghc not found)", unique: function]0: "user error (ghc not found)"length: 1__proto__: Array[0]

If I run the check command manually using the path I configured in the settings, no errors are returned:

➜  lm-notes-html-gen git:(master) ✗ /Users/ijuma/.cabal/bin/ghc-mod check Main.hs
➜  lm-notes-html-gen git:(master) ✗

Prettify works fine by the way. I am using Mac OS X Mavericks and GHC 7.8.3.

Any ideas?

Uncaught TypeError: Cannot read property '1' of null on Import

Typing import Data.List(g) causing the following error

Uncaught TypeError: Cannot read property '1' of null /Users/bilalh/.atom/packages/ide-haskell/lib/complete-provider.coffee:308

ide-haskell v0.3.0
Atom 0.129.0

OS X 10.9.4
GHC 7.8.3
ghc-mod version 4.1.6 compiled by GHC 7.8.3

Screenshot
screen shot 2014-09-20 at 01 23 46

Hover text wrap

Type signature tooltips are often too long to fit on one line, and overflow off the right side of the window, when hovering over tokens.

Ghc-mod issues: user error (ghc not found)

I have just installed Atom and the ide-haskell plugin but I cannot really make it work. I have to open my project folder twice in order to get the ide-haskell plugin start. And after that when I try to use the autocomplete feature e.g. typing imp then choosing import, as soon as I hit enter I got a bunch of warning messages like this:

got something strange from ghc-mod browse: Array[1]0: "user error (ghc not found)"length: 1__proto__: Array[0]

and at the end an error:

Uncaught Error: No screen line exists when converting buffer row to screen row

I have the following versions installed:
ghc 7.8.3
ghc-mod 5.1.0.2

And I have set the ghc-mod and stylish haskell paths in the settings to point to the correct files.

Uncaught TypeError: Cannot read property 'start' of null

I got the atom update and the ide-haskell about the same time so I'm not sure what did it, but any time I save now I get the Uncaught TypeError: Cannot read property 'start' of null. The generated error is below. It looks like @manager.pendingProcessController is null? If atom has it somewhere else now I'm not sure where it would be. Anyway:

Atom Version: 0.179.0
System: Mac OS X 10.10.2
Thrown From: ide-haskell package, v0.3.1

Stack Trace

Uncaught TypeError: Cannot read property 'start' of null

At /Applications/Atom.app/Contents/Resources/app/src/pane.js:782

TypeError: Cannot read property 'start' of null
  at CompletionDatabase._update (/Users/asaelh/.atom/packages/ide-haskell/lib/completion-db.coffee:35:38)
  at CompletionDatabase.update (/Users/asaelh/.atom/packages/ide-haskell/lib/completion-db.coffee:29:6)
  at CompleteProvider.buildCompletionList (/Users/asaelh/.atom/packages/ide-haskell/lib/complete-provider.coffee:292:5)
  at CompleteProvider.buildCompletionList (/Users/asaelh/.atom/packages/ide-haskell/lib/complete-provider.coffee:1:1)
  at CompleteProvider.onSaved (/Users/asaelh/.atom/packages/ide-haskell/lib/complete-provider.coffee:140:19)
  at /Users/asaelh/.atom/packages/ide-haskell/lib/complete-provider.coffee:1:1
  at TextBuffer.module.exports.Emitter.emit (/Applications/Atom.app/Contents/Resources/app/node_modules/emissary/lib/emitter.js:118:15)
  at TextBuffer.module.exports.TextBuffer.saveAs (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:977:19)
  at TextBuffer.module.exports.TextBuffer.save (/Applications/Atom.app/Contents/Resources/app/node_modules/text-buffer/lib/text-buffer.js:958:19)
  at TextEditor.module.exports.TextEditor.save (/Applications/Atom.app/Contents/Resources/app/src/text-editor.js:620:26)
  at Pane.module.exports.Pane.saveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:542:18)
  at Pane.module.exports.Pane.saveActiveItem (/Applications/Atom.app/Contents/Resources/app/src/pane.js:525:19)
  at Workspace.module.exports.Workspace.saveActivePaneItem (/Applications/Atom.app/Contents/Resources/app/src/workspace.js:679:35)
  at atom-workspace.atom.commands.add.core:save (/Applications/Atom.app/Contents/Resources/app/src/workspace-element.js:295:30)
  at CommandRegistry.module.exports.CommandRegistry.handleCommandEvent (/Applications/Atom.app/Contents/Resources/app/src/command-registry.js:243:29)
  at /Applications/Atom.app/Contents/Resources/app/src/command-registry.js:3:61
  at KeymapManager.module.exports.KeymapManager.dispatchCommandEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:558:16)
  at KeymapManager.module.exports.KeymapManager.handleKeyboardEvent (/Applications/Atom.app/Contents/Resources/app/node_modules/atom-keymap/lib/keymap-manager.js:396:22)
  at HTMLDocument.module.exports.WindowEventHandler.onKeydown (/Applications/Atom.app/Contents/Resources/app/src/window-event-handler.js:172:20)

Commands

  2x -2:54.2 core:save (atom-text-editor.editor.vim-mode.command-mode)

Config

{
  "core": {
    "followSymlinks": true,
    "themes": [
      "atom-dark-ui",
      "monokai"
    ]
  },
  "ide-haskell": {
    "ghcModPath": "/Users/asaelh/Dev/HTools/.cabal-sandbox/bin/ghc-mod",
    "stylishHaskellPath": "/Users/asaelh/Dev/HTools/.cabal-sandbox/bin/stylish-haskell"
  }
}

Installed Packages

# User
atom-beautify, v0.21.3
atom-color-highlight, v3.0.8
autocomplete-paths, v1.0.2
autocomplete-plus, v2.1.6
autocomplete-snippets, v1.0.1
color-picker, v1.4.4
file-icons, v1.4.10
ide-haskell, v0.3.1
javascript-snippets, v1.0.0
language-haskell, v1.0.0
language-jade, v0.3.0
linter, v0.11.1
monokai, v0.12.0
tabs-to-spaces, v0.8.1
tasks, v1.2.4
vim-mode, v0.31.0

# Dev
No dev packages

@editorView.screenPositionFromMouseEvent undefined

The popups don't seem to be working with v 0.123.0. For some reason the @editorView that comes in the constructor gives the error that screenPositionFromMouseEvent is undefined. I tried to figure out why, looked in the editor-view.js source in the Atom.app folder and it seems to be there. Haven't figured it out yet but I thought I'd let you know.

hover tooltip for gutter icons does not always work

Sometimes when you hover the mouse over a informational icon in the gutter, the tooltip will not appear.

Repro:

  1. Open a haskell file
  2. Close the file
  3. Reopen the same file, make a change and save to force recompilation
  4. Try to hover over a warning/lint icon
  5. Tooltip will not appear

The cause appears to be that the .gutter div is not immediately present when the file is reopened and the haskell-ide editor control is created. Delayed initialization of the gutter code appears to fix this. I'll create a PR for that for review. It seems like an atom bug though; the .gutter should be consistently available (or not) in the observeTextEditors callback.

Insert type signature

It would be cool to have a command to insert signatures for existing functions.
Before:

main = print "cool"

After:

main :: IO ()
main = print "cool"

It would help a lot, since top-level bindings has to be explicitly typed (at least in my code). I think that implementation shouldn't be too worrisome - just get type for expression and insert it

REPL

I wonder if there's any chance for an emacs like REPL?

Errors in using Haskell IDE on Linux + React enabled

If "Use React Editor" is enabled, installing the package on Atom 0.99 and 0.100, Arch Linux 64bit, causes Uncaught TypeError: Object #<ReactEditorView> has no method 'screenPositionFromMouseEvent' error as soon as cursor is moved over the editor area, which essentially makes work impossible due to constant console popups. Uninstalling the package "fixes" the problem.

Don`t work ide-haskell for atomeditor

I tried install https://atom.io/packages/ide-haskell . I go to Properties->packages and then find ide-haskell and then install them. But it doesn't work. On the main page of ide-haskell author wrote that in ~/.atom/config.scon should be section named "ide-haskell" , but i can't find it. What i missed? Whot i should do to run ide-haskell? my os Ubuntu 14.04

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.