Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

静岡のHaskellerはEmacsを使う

5,576 views

Published on

  • Be the first to comment

静岡のHaskellerはEmacsを使う

  1. 1. 静岡のHaskellerはEmacsを使う @kzfm
  2. 2. Haskell Platform & Emacs24 インストール済みですね?
  3. 3. まだのヒトは今すぐ入れま しょう!   Haskell Platform 2012.4.0 !   http://www.haskell.org/platform/!   Emacs 24 !   http://www.gnu.org/software/ emacs/ !   OSXでコンパイルする場合 !   http://sakito.jp/emacs/emacs24.html
  4. 4. Haskell環境の設定 !   仮想環境(依存関係で悩まないために) !   シンタックスチェッカー(快適なコーディング)cabal install virthualenv hlint ghc-mod
  5. 5. Emacs !   Flymakeでリアルタイム文法チェック !   Emacs内でのghci実行 !   自動補完M-x list-packagesiで選んでxで実行(flymake,flymake-cursor,haskell-mode,ghc,auto-complete)
  6. 6. .emacs.d/init.el(autoload ghc-init "ghc" nil t)(add-hook haskell-mode-hook (lambda () (ghc-init) (local-set-key "C-j" (lambda () (interactive)(insert " -> "))) (local-set-key "M-j" (lambda () (interactive)(insert " => "))) (local-set-key "C-l" (lambda ()(interactive)(insert " <- "))) ))(defadvice inferior-haskell-load-file (after change-focus-after-load) "Change focus to GHCi window after C-c C-l command" (other-window 1))(ad-activate inferior-haskell-load-file);; auto-complete(require auto-complete)(global-auto-complete-mode t)(define-key ac-complete-mode-map "C-n" ac-next)(define-key ac-complete-mode-map "C-p" ac-previous);; http://d.hatena.ne.jp/TakashiHattori/20120629/1340942555(add-hook emacs-startup-hook (function (lambda () (require auto-complete-config) (ac-config-default))))
  7. 7. ACによる自動補完
  8. 8. ghc-mod+Flymake
  9. 9. C-c C-cでhlint
  10. 10. C-c C-lでghci
  11. 11. Let s Enjoy !神はλに似せて静岡県をつくられた 天地創造(静岡版)より

×