Questions tagged [haskell-mode]

The haskell-mode package is a set of major modes for Emacs for writing Haskell code and working with Haskell projects.

The haskell-mode package is a set of major modes for Emacs for writing Haskell code and working with Haskell projects.

See https://github.com/haskell/haskell-mode

62 questions
3
votes
1 answer

How to run a haskell application in emacs - haskell mode?

Code in helloworld.hs : main = do putStrLn "Hello, what's your name?" name <- getLine putStrLn ("Hey " ++ name ++ ", you rock!") Application tested in Terminal: optimight@optimight:~$ ghc --make helloworld [1 of 1] Compiling Main …
Optimight
  • 2,989
  • 6
  • 30
  • 48
2
votes
1 answer

emacs haskell-mode: does not work for if/then/else within do

I'm programming Haskell (GHC 9.2.8) in Emacs 29.1 with haskell-mode 17.4 on Arch Linux, which works fine; including the REPL. However, I recently got frustrated a bit when working with effects, i.e. I'm trying to type in this dummy program: getCmd…
Patrick Bucher
  • 1,302
  • 2
  • 14
  • 36
2
votes
1 answer

How does cabal work out what directory it is in and look for targets?

I'm getting a strange error in emacs haskell-mode on. When emacs calls the cabal process via: (call-process shell-file-name nil output nil shell-command-switch "cabal build") the build fails as if cabal is in the wrong directory: cabal.exe: No…
frabrooks
  • 155
  • 8
2
votes
1 answer

Haskell Emacs haskell-mode: Run 'C-h f haskell-mode' for instruction how to setup a Haskell interaction mode

I am following the tutorial in https://learnhaskell.blogspot.com/2007/09/lesson-1-hello-world.html I followed all the instructions but on emacs when I type in C-c C-l, I get Run 'C-h f haskell-mode' for instruction how to setup a Haskell interaction…
Mochan
  • 1,329
  • 1
  • 13
  • 27
2
votes
1 answer

Update Intero flycheck after changing cabal file

I am using Intero under emacs to edit my new Haskell project. I added an import to a third-party library to my code to see if Intero would automatically add the necessary dependency, but it didn't. So I edited the .cabal file manually to add the…
Robin Green
  • 32,079
  • 16
  • 104
  • 187
2
votes
0 answers

Can't RET in emacs Interactive-Haskell-mode

I have emacs 24.4, and have installed the latest Haskell platform (10.11) for mac. I have installed haskell-mode through emacs package-install, and followed the Haskell-mode tutorial…
ams034
  • 21
  • 2
2
votes
2 answers

Haskell and Emacs

I'm trying to learn Haskell. I have configured Emacs for Haskell development, I followed this blog post: http://tim.dysinger.net/posts/2014-02-18-haskell-with-emacs.html The system works but I always get this error: Error (el-get): while…
anquegi
  • 11,125
  • 4
  • 51
  • 67
2
votes
1 answer

How do I make haskell-mode package work with Emacs on Nixos?

I am using configuration.nix to install both emacs and haskellMode package in a way: environment.systemPackages = with pkgs; [ (haskellPackages.ghcWithPackages (self : [ self.cabalInstall self.happy self.alex self.ghcMod ])) …
Alexey Raga
  • 7,457
  • 1
  • 31
  • 40
2
votes
1 answer

haskell-mode with sandboxes

I have tried the following: cabal sandbox init Then making the following cabal file. -- Initial hsource.cabal generated by cabal init. For further -- documentation, see http://haskell.org/cabal/users-guide/ name: hsource version: …
user3139545
  • 6,882
  • 13
  • 44
  • 87
2
votes
3 answers

What to do if I cannot find my emacs init file?

I am trying to add haskell-mode to emacs by following these instructions: http://doc.gnu-darwin.org/haskell-mode/installation-guide.html This involves that I add some code to my ~/.emacs init file. However, my issue is that I cannot locate my emacs…
buydadip
  • 8,890
  • 22
  • 79
  • 154
2
votes
2 answers

Switch haskell-process-type between cabal-repl and ghci

Can I switch the haskell-process-type on during an alive haskell session or when starting a new session?
ase
  • 13,231
  • 4
  • 34
  • 46
2
votes
2 answers

emacs haskell-unicode-input-method in haskell-mode convert unicode back to ascii

I just started using haskell-mode for emacs and am using turn-on-haskell-unicode-input-method, a function that converts various expressions to unicode equivalents in the haskell-mode buffers. I was surprised to find that the ascii values are…
Rorschach
  • 31,301
  • 5
  • 78
  • 129
2
votes
1 answer

font-lock-mode in haskell-mode seems to ruin the width of single spaces in emacs

I find that font-lock-mode are doing something wrong with the width of single spaces no matter what monospace font I'm using. Here are some screenshots: Using DejaVu Sans Mono: font-lock-mode on: font-lock-mode off: Using Luculent: font-lock-mode…
Javran
  • 3,394
  • 2
  • 23
  • 40
2
votes
1 answer

ELisp Syntax Table Comments for Haskell style comments

I am attempting to set up Haskell style comments using ELisp Syntax-Table-Comments but I can't quite get it. In Haskell, there are 2 basic types of comments -- denotes a single line comment ending with \n {- denotes a multi line comment ending with…
Joe
  • 1,534
  • 9
  • 19
2
votes
1 answer

Emacs hangs when typing in haskell-mode

I have been using haskell-mode for some time now with no problems. Recently emacs has started to hang for quite a while whenever I type in something in haskell-mode, say 10-15 seconds, and then returns to "normal". I can navigate around and switch…
altschuler
  • 3,694
  • 2
  • 28
  • 55