• Stars
    star
    1,306
  • Rank 34,813 (Top 0.8 %)
  • Language
    Emacs Lisp
  • License
    GNU General Publi...
  • Created about 12 years ago
  • Updated about 1 month ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Emacs mode for Haskell

Haskell Mode for Emacs

This is an Emacs mode for editing, developing and debugging Haskell programs. Home page.

Build Status Build Status Melpa Status Melpa Stable Status License GPL3 Twitter Follow

I just want to thank everybody involved in one way or another with the Haskell Emacs tooling. It is one of the best language experiences I had in Emacs. -- cocreature, 2015-03-01

I've been using it for a long time and love it. Great work on haskell-mode! Keep up the good work! -- LukeHoersten, 2015-04-02

This sounds wonderful. Does anything similar exist for Vim? -- earldouglas, 2015-07-02

Users manual: latest version, older versions: 13.12, 13.14, 13.16, 13.18, 13.20.

Quick Installation

Make sure you have this in your init file (usually ~/.emacs). If you already have custom-set-variables, merge its contents:

(require 'package)
(custom-set-variables
 ;; custom-set-variables was added by Custom.
 ;; If you edit it by hand, you could mess it up, so be careful.
 ;; Your init file should contain only one such instance.
 ;; If there is more than one, they won't work right.
 '(package-archives
   (quote
    (("gnu" . "https://elpa.gnu.org/packages/")
     ("melpa" . "https://melpa.org/packages/")))))
(package-initialize)

Then run emacs, and evaluate:

M-x package-refresh-contents

and then follow by

M-x package-install RET haskell-mode

Voilà! haskell-mode is installed! You should be able to edit Haskell source code in color now.

Haskell-mode has much much more to offer but the above should get you going!

Advanced configuration

For setup instructions, please consult the integrated haskell-mode Info manual which can be accessed after installation via M-x info-display-manual [RET] haskell-mode. Alternatively, you can also direct your browser to the the online haskell-mode manual for setup and user guide.

Installation - more information

haskell-mode supports GNU Emacs version 25.1 or later.

haskell-mode is available from MELPA Stable (releases) and MELPA (git snapshots). The latter will generally be considerably more up-to-date, and is recommended for most users.

Other means of obtaining haskell-mode include el-get, Emacs Prelude and Debian package.

Installation from git repository

Running haskell-mode directly from sources is easy but requires a little preparation:

  • git clone https://github.com/haskell/haskell-mode.git into a suitable directory, e.g. ~/lib/emacs/haskell-mode/ where ~ stands for your home directory.

  • Assuming you have unpacked the various haskell-mode modules (haskell-mode.el and the rest) in the directory ~/lib/emacs/haskell-mode/, you need to generate various files, the autoloads file (haskell-mode-autoloads.el) is one among them. Invoke:

make EMACS=/path/to/your/emacs

and then adding the following command to your .emacs:

(add-to-list 'load-path "~/lib/emacs/haskell-mode/")
(require 'haskell-mode-autoloads)
(add-to-list 'Info-default-directory-list "~/lib/emacs/haskell-mode/")

Installation from git repository on macOS

There are a couple of things to note if you want to install directly from git on macOS systems, as of version 10.13 High Sierra:

  • The version of makeinfo that is installed by default in /usr/bin is quite old and will cause the above make command to exit with an error. Installing the texinfo package using Homebrew will fix this. Be sure to follow the post-install instructions to add its bin directory to your shell's PATH variable.

  • If you are running an Emacs distribution packaged as a macOS application. such as the one available at https://emacsformacosx.com/, you'll need to add its executable to your PATH before the system's default Emacs version. That project's Tips and Tricks page has detailed instructions.

Contributing

If you followed the above you are just a couple of steps away from contributing to haskell-mode.

haskell-mode is actively seeking contributions from users of haskell-mode. For more information have a look at the wiki page on contributing.

More Repositories

1

haskell-language-server

Official haskell ide support via language server (LSP). Successor of ghcide & haskell-ide-engine.
Haskell
2,585
star
2

haskell-ide-engine

The engine for haskell ide-integration. Not an IDE
Haskell
2,383
star
3

cabal

Official upstream development repository for Cabal and cabal-install
Haskell
1,570
star
4

aeson

A fast Haskell JSON library
Haskell
1,229
star
5

stylish-haskell

Haskell code prettifier
Haskell
968
star
6

parsec

A monadic parser combinator library
Haskell
831
star
7

ghcide

A library for building Haskell IDE tooling
Haskell
588
star
8

vscode-haskell

VS Code extension for Haskell, powered by haskell-language-server
TypeScript
546
star
9

attoparsec

A fast Haskell library for parsing ByteStrings
Haskell
511
star
10

criterion

A powerful but simple library for measuring the performance of Haskell code.
Haskell
497
star
11

hackage-server

Hackage-Server: A Haskell Package Repository
Haskell
407
star
12

text

Haskell library for space- and time-efficient operations over Unicode text.
Haskell
397
star
13

haskell-platform

Distribution of Haskell with batteries included
Haskell
380
star
14

wreq

Haskell
377
star
15

haddock

Haskell Documentation Tool
HTML
362
star
16

vector

An efficient implementation of Int-indexed arrays (both mutable and immutable), with a powerful loop optimisation framework .
Haskell
361
star
17

mtl

The Monad Transformer Library
Haskell
357
star
18

lsp

Haskell library for the Microsoft Language Server Protocol
Haskell
354
star
19

network

Low-level networking interface
Haskell
318
star
20

containers

Assorted concrete container types
Haskell
312
star
21

statistics

A fast, high quality library for computing with statistics in Haskell.
Haskell
297
star
22

alex

A lexical analyser generator for Haskell
Haskell
292
star
23

bytestring

An efficient compact, immutable byte string type (both strict and lazy) suitable for binary or 8-bit character data.
Haskell
283
star
24

happy

The Happy parser generator for Haskell
Haskell
272
star
25

ghcup

DEPRECATED IN FAVOR OF haskell/ghcup-hs
Shell
264
star
26

ghcup-hs

Haskell
253
star
27

c2hs

c2hs is a pre-processor for Haskell FFI bindings to C libraries
Haskell
197
star
28

fgl

A Functional Graph Library for Haskell
Haskell
183
star
29

HTTP

Haskell HTTP package
Haskell
179
star
30

hie-bios

Set up a GHC API session for various Haskell Projects
Haskell
172
star
31

ThreadScope

A graphical tool for profiling parallel Haskell programs
Haskell
150
star
32

actions

Github actions for Haskell CI
TypeScript
147
star
33

critbit

A Haskell implementation of crit-bit trees.
Haskell
137
star
34

time

A time library
Haskell
118
star
35

primitive

This package provides various primitive memory-related operations.
Haskell
114
star
36

play-haskell

Haskell Playground
Haskell
113
star
37

unix

POSIX functionality
Haskell
108
star
38

rfcs

This repo is archived, consider using https://github.com/ghc-proposals/ghc-proposals instead
TeX
98
star
39

win32

Haskell support for the Win32 API
Haskell
96
star
40

core-libraries-committee

95
star
41

parallel

a library for parallel programming
Haskell
91
star
42

stm

Software Transactional Memory
Haskell
90
star
43

haskell-report

Haskell Language Report
TeX
89
star
44

process

Library for dealing with system processes
Haskell
85
star
45

error-messages

73
star
46

hoopl

Higher-order optimization library
Haskell
70
star
47

pretty

Haskell Pretty-printer library
Haskell
68
star
48

filepath

Haskell FilePath core library
Haskell
66
star
49

docker-haskell

Dockerfile
63
star
50

directory

Platform-independent library for basic file system operations
Haskell
57
star
51

hackage-security

Hackage security framework based on TUF (The Update Framework)
Haskell
56
star
52

mwc-random

A very fast Haskell library for generating high quality pseudo-random numbers.
Haskell
54
star
53

random

Random number library
Haskell
52
star
54

ecosystem-proposals

Proposals for the Haskell Ecosystem
51
star
55

text-icu

This package provides the Haskell Data.Text.ICU library, for performing complex manipulation of Unicode text.
Haskell
47
star
56

base64-bytestring

Fast base64 encoding and decoding for Haskell.
Haskell
45
star
57

security-advisories

Haskell
42
star
58

math-functions

Special mathematical functions
Haskell
40
star
59

deepseq

Deep evaluation of data structures
Haskell
39
star
60

tar

Reading, writing and manipulating ".tar" archive files.
Haskell
38
star
61

hsc2hs

Pre-processor for .hsc files
Haskell
38
star
62

pvp

Haskell Package Version Policy (PVP)
CSS
37
star
63

zlib

Compression and decompression in the gzip and zlib formats
C
35
star
64

ghc-events

Library and tool for parsing .eventlog files from GHC
Haskell
33
star
65

text-format

A Haskell text formatting library optimized for ease of use and high performance.
Haskell
32
star
66

ghcup-metadata

GHCup metadata repository
Haskell
31
star
67

cabal-userguide

A handy user guide for the Cabal build tool
Nix
29
star
68

base16-bytestring

Fast base16 (hexadecimal) encoding and decoding for Haskell bytestrings.
Haskell
27
star
69

network-uri

URI manipulation facilities
Haskell
24
star
70

entropy

Easy entropy source for Haskell users.
Haskell
23
star
71

winghci

Simple Windows GUI for GHCi.
C
17
star
72

double-conversion

A fast Haskell library for converting between double precision floating point numbers and text strings. It is implemented as a binding to the V8-derived C++ double-conversion library.
C++
15
star
73

xhtml

XHTML combinator library
Haskell
9
star
74

old-time

This package provides the old time library.
Haskell
7
star
75

meta

A place for discussing & documenting the github.com/haskell organization
7
star
76

ghc-builder

ghc builder bot
Haskell
6
star
77

array

This is just a mirror. See https://gitlab.haskell.org/ghc/packages/array/.
Haskell
6
star
78

cabal-website

The http://www.haskell.org/cabal/ website
HTML
4
star
79

network-bsd

POSIX network database (<netdb.h>) API
Haskell
4
star
80

haskell-wiki-configuration

Issue tracking for Haskell Wiki
PHP
4
star
81

clc-stackage

Meta-package to facilitate impact assessment for CLC proposals
Nix
3
star
82

hiw

Haskell Implementors Workshop
TeX
3
star
83

text-test-data

Test data for the Haskell text project
Text
3
star
84

old-locale

This package provides the ability to adapt to locale conventions such as date and time formats.
Haskell
3
star
85

tokenize

Simple tokenizer for English text
Haskell
3
star
86

bzlib

Compression and decompression in the bzip2 format
Haskell
2
star
87

hpc

1
star
88

os-string

Haskell
1
star