Fixed package-require error. Moved to ghc-mod for haskell.
--- a/elisp/haskell-init.el Tue Dec 29 17:55:49 2015 -0600
+++ b/elisp/haskell-init.el Thu Jan 21 13:54:22 2016 -0600
@@ -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)
--- a/elisp/package-require.el Tue Dec 29 17:55:49 2015 -0600
+++ b/elisp/package-require.el Thu Jan 21 13:54:22 2016 -0600
@@ -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)
--- a/init.el Tue Dec 29 17:55:49 2015 -0600
+++ b/init.el Thu Jan 21 13:54:22 2016 -0600
@@ -62,7 +62,7 @@
;;;; Packages ;;;;
(require 'package-require)
-(package-require '(company exec-path-from-shell expand-region
+(package-require '(company exec-path-from-shell expand-region flx-ido
smex markdown-mode markdown-mode+ ix hgignore-mode move-text paredit
rainbow-delimiters rainbow-mode json-mode json-reformat flycheck
solarized-theme terraform-mode visual-regexp yasnippet yaml-mode