src.nth.io/

summaryrefslogtreecommitdiff
path: root/elisp
diff options
context:
space:
mode:
authorLuke Hoersten <[email protected]>2016-01-21 13:54:22 -0600
committerLuke Hoersten <[email protected]>2016-01-21 13:54:22 -0600
commit5e89d4f3817036db65058988f46265329152b3b3 (patch)
treebed83b4f684e669309e6eec90c968e7c249ec58e /elisp
parent31754230f601f8f7053c90f4e2c7f10d1824cd29 (diff)
Fixed package-require error. Moved to ghc-mod for haskell.
Diffstat (limited to 'elisp')
-rw-r--r--elisp/haskell-init.el28
-rw-r--r--elisp/package-require.el5
2 files changed, 15 insertions, 18 deletions
diff --git a/elisp/haskell-init.el b/elisp/haskell-init.el
index 77ee582..1003376 100644
--- a/elisp/haskell-init.el
+++ b/elisp/haskell-init.el
@@ -1,27 +1,25 @@
;; ~/.emacs.d/elisp/haskell-init.el
;; Luke Hoersten <[email protected]>
+;;; Code:
+
;; Require packages
(require 'package-require)
-(package-require '(haskell-mode yasnippet haskell-snippets flycheck))
-
-(add-to-list 'load-path "~/.emacs.d/elisp/stack-mode")
+(package-require '(haskell-mode ghc yasnippet haskell-snippets flycheck company company-ghc))
-;; Load haskell-mode from source
-;; (add-to-list 'load-path "~/Code/elisp/haskell-mode/")
-;; (require 'haskell-mode-autoloads)
-
-;; company-mode stack-ide integration
-(add-to-list 'load-path "~/Code/elisp/company-stack-ide/")
-(require 'company-stack-ide)
-(add-to-list 'company-backends 'company-stack-ide)
-(add-hook 'stack-mode 'company-mode)
+;; flycheck-haskell
(require 'haskell)
(require 'haskell-mode)
-(require 'stack-mode)
(require 'haskell-interactive-mode)
(require 'haskell-snippets)
+(require 'company)
+
+(add-to-list 'company-backends 'company-ghc)
+(autoload 'ghc-init "ghc" nil t)
+(autoload 'ghc-debug "ghc" nil t)
+(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
+;; (add-hook 'flycheck-mode-hook #'flycheck-haskell-setup)
(defun haskell-who-calls (&optional prompt)
"Grep the codebase to see who uses the symbol at point."
@@ -45,13 +43,9 @@
'haskell-mode-hook
(lambda ()
(flycheck-mode t)
- (flycheck-disable-checker 'haskell-ghc)
- (flycheck-disable-checker 'haskell-stack-ghc)
- (flycheck-clear t)
(imenu-add-menubar-index)
(haskell-indentation-mode t)
(projectile-mode t)
- (stack-mode t)
(subword-mode t)
(capitalized-words-mode t)
;; (interactive-haskell-mode t)
diff --git a/elisp/package-require.el b/elisp/package-require.el
index 0f0faab..b33805c 100644
--- a/elisp/package-require.el
+++ b/elisp/package-require.el
@@ -1,11 +1,14 @@
;; ~/.emacs.d/elisp/package-require.el
;; Luke Hoersten <[email protected]>
-(package-initialize)
+(require 'package)
(add-to-list 'package-archives '("melpa" . "http://melpa.milkbox.net/packages/") t)
;; (add-to-list 'package-archives '("melpa-stable" . "http://stable.melpa.org/packages/") t)
(add-to-list 'package-archives '("marmalade" . "http://marmalade-repo.org/packages/") t)
+(package-initialize)
+(package-refresh-contents)
+
(defun package-require (packages)
"Ensure that a given package is installed"
(mapc (lambda (package)