-;; useful comint-shell mode commands. If not prefaced with *, it means it is not in the haskell custom repl
-;; *todo: setup haskell c-t toggle arrow keys
-;; tab completion
-;; C-q insert prev arg
-;; C-( history search
-;; c-m-left/right move to next/prev prompts
-;; *c-enter, multi-line input
-;; *s-delete, send input across windows. (i can implement this)
-;; *c-m-l clear screen
-;; *haskell-process-interrupt, c-cc terminate job (i can implement this maybe)
-
-;; nice bash/readline functions missing in comint:
-;; yank-nth-arg
-;; operate-get-next
-;; menu-complete
-
-;; usefull comint commands:
-;; c-cl : list historic command in temp buffer
-;; C-c C-o comint-delete-output
-;; comint-restore-input, todo: put this on a randomish c-c key
-
-
-
-;; todo:
-;; checkout haskell repl functions:
-;; c-cv haskell-check, hlint
-;; C-M-q prog-indent-sexp
-;; c-c. haskell-mode-format-imports
-;; C-c M-/ haskell-doc-check-active
-;; haskell-process-generate-tags
-;; haskell-process-cabal-build
-;; haskell-cabal-command.. or something
-;; haskell-process-restart
-;; C-h v haskell-process-log
-;; C-h v haskell-process-show-debug-tips
-
-;; various not immediately useful functions:
-;; haskell-process-add-dependency
-;; haskell-process-touch-buffer
-;; haskell-process-cd
-;; haskell-process-unignore
-;; haskell-process-reload-devel-main
-
-
-;; rebind
-;; home: C-a haskell-interactive-mode-beginning
-;; c-return: C-j haskell-interactive-mode-newline-indent
-;; up/down: <C-down> haskell-interactive-mode-history-next
-
-;; todo haskell mode better binds for:
-;; 'haskell-process-load-file
-;; 'haskell-process-do-type
-;; 'haskell-process-do-info
-;; 'inferior-haskell-send-decl
-
-
-;; commands which don't work in haskell-interactive-mode(hi) vs inferior-haskell-mode(ih, default)
-;; functions not in hi:
-;; inferior-haskell-find-definition, use tags instead
-;; inferior-haskell-find-haddock, todo, test if this works
-
-;; redefined ih to hi
-;; switch-to-haskell -> 'haskell-interactive-switch
-;; haskell-process-load-file -> inferior-haskell-load-file
-;; haskell-process-do-type -> inferior-haskell-type
-;; switch-to-haskell -> haskell-interactive-switch
-;; inferior-haskell-load-file -> 'haskell-process-load-file
-
-
-;; haskell-mode installation from source, based on its readme
-;; in the git directory,
-;; make all
-
-
-
-
-;; remove default option to not link the file
-(setq haskell-compile-command "ghc -Wall -ferror-spans -fforce-recomp %s")
-(add-hook 'haskell-indentation-mode-hook
- (lambda ()
- (define-key haskell-indentation-mode-map [?\C-d] nil)
- (define-key haskell-indentation-mode-map
- (kbd "<deletechar>")
- 'haskell-indentation-delete-char)))
-
-;;copied from haskell-mode docs in order to use the new, better, nondefault
-;;interactive mode.
-(eval-after-load "haskell-mode"
- '(progn
- (define-key haskell-mode-map (kbd "C-x C-d") nil)
- (define-key haskell-mode-map (kbd "C-c C-z") 'haskell-interactive-switch)
- (define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-file)
- (define-key haskell-mode-map (kbd "C-c C-b") 'haskell-interactive-switch)
- (define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
- (define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
- (define-key haskell-mode-map (kbd "C-c M-.") nil)
- (define-key haskell-mode-map (kbd "C-c C-d") nil)))
-
-;; ghc-mod install http://www.mew.org/~kazu/proj/ghc-mod/en/emacs.html
-;; todo, try this out
-;; (autoload 'ghc-init "ghc" nil t)
-;;(add-hook 'haskell-mode-hook (lambda () (ghc-init) (flymake-mode)))
-
-
-
-;; from the package readme for ghci-completion
-(require 'ghci-completion)
-(add-hook 'inferior-haskell-mode-hook 'turn-on-ghci-completion)
-
-
-;; disable some rebinds. they are set to appropriate keys in the keybinds section
-(eval-after-load "haskell-mode"
- '(progn
- (define-key haskell-mode-map (kbd "C-a") 'nil)
- (define-key haskell-mode-map (kbd "C-j") 'nil)))
-
-(eval-after-load "python-mode"
- '(progn
- (define-key python-mode-map (kbd "C-j") nil)))
-
-(defun pretty-lambdas-haskell ()
- (font-lock-add-keywords
- nil `((,(concat "(?\\(" (regexp-quote "\\") "\\)")
- (0 (progn (compose-region (match-beginning 1) (match-end 1)
- ,(make-char 'greek-iso8859-7 107))
- nil))))))
-;; from haskell-mode manual
-(add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
-(when (window-system)
- (add-hook 'haskell-mode-hook 'pretty-lambdas-haskell))
-
-;; added from haskell-mode website install instructions
+ ;; useful comint-shell mode commands. If not prefaced with *, it means it is not in the haskell custom repl
+ ;; *todo: setup haskell c-t toggle arrow keys
+ ;; tab completion
+ ;; C-q insert prev arg
+ ;; C-( history search
+ ;; c-m-left/right move to next/prev prompts
+ ;; *c-enter, multi-line input
+ ;; *s-delete, send input across windows. (i can implement this)
+ ;; *c-m-l clear screen
+ ;; *haskell-process-interrupt, c-cc terminate job (i can implement this maybe)
+
+ ;; nice bash/readline functions missing in comint:
+ ;; yank-nth-arg
+ ;; operate-get-next
+ ;; menu-complete
+
+ ;; usefull comint commands:
+ ;; c-cl : list historic command in temp buffer
+ ;; C-c C-o comint-delete-output
+ ;; comint-restore-input, todo: put this on a randomish c-c key
+
+
+
+ ;; todo:
+ ;; checkout haskell repl functions:
+ ;; c-cv haskell-check, hlint
+ ;; C-M-q prog-indent-sexp
+ ;; c-c. haskell-mode-format-imports
+ ;; C-c M-/ haskell-doc-check-active
+ ;; haskell-process-generate-tags
+ ;; haskell-process-cabal-build
+ ;; haskell-cabal-command.. or something
+ ;; haskell-process-restart
+ ;; C-h v haskell-process-log
+ ;; C-h v haskell-process-show-debug-tips
+
+ ;; various not immediately useful functions:
+ ;; haskell-process-add-dependency
+ ;; haskell-process-touch-buffer
+ ;; haskell-process-cd
+ ;; haskell-process-unignore
+ ;; haskell-process-reload-devel-main
+
+
+ ;; rebind
+ ;; home: C-a haskell-interactive-mode-beginning
+ ;; c-return: C-j haskell-interactive-mode-newline-indent
+ ;; up/down: <C-down> haskell-interactive-mode-history-next
+
+ ;; todo haskell mode better binds for:
+ ;; 'haskell-process-load-file
+ ;; 'haskell-process-do-type
+ ;; 'haskell-process-do-info
+ ;; 'inferior-haskell-send-decl
+
+
+ ;; commands which don't work in haskell-interactive-mode(hi) vs inferior-haskell-mode(ih, default)
+ ;; functions not in hi:
+ ;; inferior-haskell-find-definition, use tags instead
+ ;; inferior-haskell-find-haddock, todo, test if this works
+
+ ;; redefined ih to hi
+ ;; switch-to-haskell -> 'haskell-interactive-switch
+ ;; haskell-process-load-file -> inferior-haskell-load-file
+ ;; haskell-process-do-type -> inferior-haskell-type
+ ;; switch-to-haskell -> haskell-interactive-switch
+ ;; inferior-haskell-load-file -> 'haskell-process-load-file
+
+
+ ;; haskell-mode installation from source, based on its readme
+ ;; in the git directory,
+ ;; make all
+
+
+
+
+ ;; remove default option to not link the file
+ (setq haskell-compile-command "ghc -Wall -ferror-spans -fforce-recomp %s")
+ (add-hook 'haskell-indentation-mode-hook
+ (lambda ()
+ (define-key haskell-indentation-mode-map [?\C-d] nil)
+ (define-key haskell-indentation-mode-map
+ (kbd "<deletechar>")
+ 'haskell-indentation-delete-char)))
+
+ ;;copied from haskell-mode docs in order to use the new, better, nondefault
+ ;;interactive mode.
+ (eval-after-load "haskell-mode"
+ '(progn
+ (define-key haskell-mode-map (kbd "C-x C-d") nil)
+ (define-key haskell-mode-map (kbd "C-c C-z") 'haskell-interactive-switch)
+ (define-key haskell-mode-map (kbd "C-c C-l") 'haskell-process-load-file)
+ (define-key haskell-mode-map (kbd "C-c C-b") 'haskell-interactive-switch)
+ (define-key haskell-mode-map (kbd "C-c C-t") 'haskell-process-do-type)
+ (define-key haskell-mode-map (kbd "C-c C-i") 'haskell-process-do-info)
+ (define-key haskell-mode-map (kbd "C-c M-.") nil)
+ (define-key haskell-mode-map (kbd "C-c C-d") nil)))
+
+ ;; ghc-mod install http://www.mew.org/~kazu/proj/ghc-mod/en/emacs.html
+ ;; todo, try this out
+ ;; (autoload 'ghc-init "ghc" nil t)
+ ;;(add-hook 'haskell-mode-hook (lambda () (ghc-init) (flymake-mode)))
+
+
+
+ ;; from the package readme for ghci-completion
+ (add-hook 'inferior-haskell-mode-hook 'turn-on-ghci-completion)
+
+
+ ;; disable some rebinds. they are set to appropriate keys in the keybinds section
+ (eval-after-load "haskell-mode"
+ '(progn
+ (define-key haskell-mode-map (kbd "C-a") 'nil)
+ (define-key haskell-mode-map (kbd "C-j") 'nil)))
+
+ (eval-after-load "python-mode"
+ '(progn
+ (define-key python-mode-map (kbd "C-j") nil)))
+
+ (defun pretty-lambdas-haskell ()
+ (font-lock-add-keywords
+ nil `((,(concat "(?\\(" (regexp-quote "\\") "\\)")
+ (0 (progn (compose-region (match-beginning 1) (match-end 1)
+ ,(make-char 'greek-iso8859-7 107))
+ nil))))))
+ ;; from haskell-mode manual
+ (add-hook 'haskell-mode-hook 'turn-on-haskell-decl-scan)
+ (when (window-system)
+ (add-hook 'haskell-mode-hook 'pretty-lambdas-haskell))
+
+ ;; added from haskell-mode website install instructions