From 6792d1debd55d875a6078cc15824473a0582efaa Mon Sep 17 00:00:00 2001
From: Ramakrishnan Muthukrishnan <ram@leastauthority.com>
Date: Sat, 1 Nov 2014 11:27:37 +0530
Subject: [PATCH] merge ocaml mode changes + other haskell local changes

---
 init.el | 18 ++++++++++++++----
 1 file changed, 14 insertions(+), 4 deletions(-)

diff --git a/init.el b/init.el
index 2f8f57d..1d969f1 100644
--- a/init.el
+++ b/init.el
@@ -16,10 +16,12 @@
 (custom-set-variables
  '(initial-frame-alist (quote ((fullscreen . maximized)))))
 ;; Who use the bar to scroll?
-(scroll-bar-mode 0)
+(when (display-graphic-p)
+  (progn
+    (scroll-bar-mode 0)
 
-(tool-bar-mode 0)
-(menu-bar-mode 0)
+    (tool-bar-mode 0)
+    (menu-bar-mode 0)))
 
 ; my-packages.el
 (require 'package)
@@ -34,7 +36,7 @@
   (package-refresh-contents))
 
 ;; make sure my list of packages are installed
-(setq package-list '(rust-mode haskell-mode monokai-theme racket-mode clojure-mode cider paredit go-mode))
+(setq package-list '(rust-mode haskell-mode monokai-theme ghc))
 
 ; install the missing packages
 (dolist (package package-list)
@@ -71,6 +73,8 @@
 (global-set-key (kbd "C-c e") 'start-erc) ;; ERC
 
 ;; haskell mode
+(setenv "PATH" (concat "~/.cabal/bin:" (getenv "PATH")))
+(add-to-list 'exec-path "~/.cabal/bin")
 (add-hook 'haskell-mode-hook 'turn-on-haskell-indentation)
 
 ;; ocaml
@@ -93,3 +97,9 @@
 ;; ocp-indent
 ;; (add-to-list 'load-path "/Users/ramakrishnanm/.opam/4.02.1/share/emacs/site-lisp")
 ;; (require 'ocp-indent)
+
+;; ghc-mod
+(autoload 'ghc-init "ghc" nil t)
+(autoload 'ghc-debug "ghc" nil t)
+(add-hook 'haskell-mode-hook (lambda () (ghc-init)))
+
-- 
2.45.2