Emacs settings for Haskell Programming

Source: Internet
Author: User

 

 

 

Haskell is only available in a small scope, so it does not have good ide support. However, we are pleased that we only need to make a few settings for Emacs, emacs becomes a powerful Haskell ide. Because Emacs itself is a customizable Lisp compiler, its scalability is incomparable.

Emacs Haskell mode plug-in and Emacs folding mode plug-in can be found in emacswiki

 

 

First, you must modify folding. El and add the folding flag in the Haskell source code.

-- In folding. add the following lines to the marks-list in the El file <br/> (folding-add-to-marks-list 'haskell-mode "--{{{""--}}}" nil T)

 

Next, Set ~ /. Emacs file for Emacs Configuration:

; ;{{ Haskell programming style <br/>; interaction with inferior Haskell Interpreter: just hit c-Z or c-l <br/> ;; enable document mode <br/> (add-hook 'haskell-mode-hook' turn-on-Haskell-doc-mode) <br/> ;; enable semi-automatic alignment (Tab can get some alignment cues) <br/> (add-hook 'haskell-mode-call' turn-on-Haskell-indent) <br/>; Enable syntax highlighting <br/> (add-hook 'haskell-mode-hook' font-lock-mode) <br/> ;; add menu items <br/> (add-hook 'haskell-mode-hook' imenu-add-menubar-index) <br/>; enable the folding mode, follow the previous steps to add the folding mark in Haskell mode <br/> (add-hook 'haskell-mode-hook' folding-mode) <br/> ;; enable the function folding function of outline-minor-mode <br/>; the outline mode that comes with Emacs, haskell support not provided <br/> (add-hook 'haskell-mode-hook' outline-minor-mode) <br/> ;; therefore, a fold header tag is defined here. <br/>; Haskell supports nested functions, so here I can only provide a simple solution <br/> ;; set the folding tag for the signature of the outermost function <br/> (defun my-Haskell-mode-hook () <br/> (make-local-variable 'outline-Regexp) <br/> (setq outline-Regexp "^ // W + [^/n/R] *: [^/n/R] *") <br/> (add-hook 'haskell-mode-hook' my-Haskell-mode-hook) <br/>;}} Haskell style end <br/>

 

 

The following are some reference resources:

I. Basic configurations of Emacs, which I personally recommend very much: SAMs teach you Emacs in 24 hours. The html version of this book can be downloaded from Wang Yin's personal website. This book also has Wang Yin's website, which has played a significant role in my personal study of Emacs. Website address http://docs.huihoo.com/homepage/shredderyin/index.html.

2. Several free newsgroup servers are recommended. You can use the gnus plug-in of Emacs In the NNTP mode for rapid screening, browsing, and discussion. This speed is not comparable to that of general web browsing.

For usage and Setup of gnus, refer to the previous book and emacswiki.

 

Qualcomm reads, replies, and participates in the discussion

 

 

3. We recommend the Firefox keysnil plug-in to simulate Emacs by enabling the Firefox key bit. Easy to write web pages

 

 

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.