Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [haskell-mode]

a major-mode for editing code written in the Haskell programming language.

0
votes
1answer
16 views

How to get flycheck to do a syntax check immediately after opening a file?

I can't get flycheck to do its thing immediately after opening a file. It will check/find errors if I save the file. And it will check/find errors if I execute the M-x flycheck-mode command twice (i.e....
0
votes
1answer
49 views

Haskell code execution in Org-mode give error but in .hs file the code is good and working

i have this code: qs [] = [] qs [x] = [x] qs (x:xs) = qs [a | a <- xs, a < x] ++ [x] ++ qs [b | b <- xs, b >= x] when i save it to some file .hs and load it to ghci i can execute ...
0
votes
0answers
18 views

Haskell-mode-hook help window keeps opening

I installed haskell-mode, but every time I press RET or TAB on a Haskell file it keeps opening that window Any idea on how to deactivate this ?
1
vote
1answer
155 views

How do I enable hlint for haskell linting?

I am trying to select hlint and use it as the default for haskell-mode. I recall accidentally finding the option for this once, but haven't been able to find it again. I am new to Emacs and do not ...
1
vote
0answers
46 views

How to set Haskell indentation with Prelude

I'm using Prelude and Haskell mode and trying to set the indentation. The default indentation gives me the following: main = do contents <- getContents print (sumFile contents) where sumFile ...
0
votes
1answer
429 views

Recent problems with Haskell mode

I just downloaded a fresh installation of the Haskell platform on Mac El Capitàn: brew cask install haskell-platform and a fresh installation of the Haskell layer for spacemacs: dotspacemacs-...
1
vote
1answer
407 views

how to get correct indentation after pressing 'o' in haskell-mode using evil-mode in spacemacs

When using haskell-mode (the Haskell layer) with evil-mode keybindings in spacemacs, the indentation created by pressing the o key is often incorrect. For instance, imagine I want to write the ...
1
vote
1answer
58 views

Flycheck-Haskell - “Opening Directory” “Not a directory”

I'm trying to get flycheck working in Haskell, however, when I try to do anything to do with flycheck, even running stuff like flycheck-verify-setup, I get an error "Not a directory". Does anyone ...
0
votes
0answers
52 views

Inline variable in Haskell

Is there any way to inline a top-level definition or let binding in Haskell? I can't find any built-in solutions in vanilla haskell mode, HaRe, or Intero.
1
vote
0answers
364 views

Format Haskell type signatures to be multi-line

I want to have the following functionality on a save hook. Given a buffer that has type signatures like this… add :: Integer -> Integer -> Integer add x y = x + y …I want to have them ...
2
votes
1answer
498 views

Clear ghci screen of haskell-mode

I want to clear the ghci screen of the haskell-mode, I used erase-buffer in emacs shell, and I works, but when I do so with ghci inside emacs, This message appears: Text is read-only
2
votes
2answers
3k views

How to configure spacemacs to work correctly with haskell Stack?

The Haskell stack build doesn't install ghc to the system, only for itself, and using spacemacs without a systemwide configured ghc have been a painful experience (to me). My question is, there is a ...
2
votes
1answer
229 views

`haskell-mode-hook` is nil?

The haskell-mode-hook customizable variable in haskell-mode has a default value of (haskell-indentation-mode interactive-haskell-mode). Yet, after starting Emacs, its value is nil; the "original ...
1
vote
1answer
251 views

Symbol documentation and implementation code in haskell-mode

I'm learning Haskell. One of first steps was to make pleasant development environment. I've already found haskell-mode, intero and some more useful packages but I miss offline/online documentation for ...
0
votes
2answers
280 views

Customize haddock comments color

How can I change the color of the comments starting with -- | in Haskell mode? When I write a comment in Haskell I get a grey face, but when the comment starts with -- |, as required by Haddock ...
6
votes
1answer
759 views

No “full service” Haskell org mode?

I'm guessing that since Haskell's ghci is not a full-fledged REPL, you can't really use it for defining functions in orgmode source blocks, i.e., #+begin_src haskell doubleMe x = x + x #+end_src ...
1
vote
2answers
397 views

Error with company-mode, using Haskell

I installed haskell-mode, and I follow this tutorial to install company here. But it only ran once; now when I launch Emacs I get this error: Warning (initialization): An error occurred while loading ...
2
votes
1answer
742 views

haskell-mode emacs not finding modules when using stack

Haskell mode doesn't seem to be resolving the modules in emacs when I use the stack command to build my project. Is there a file that I have to edit to tell haskell-mode where to find the packages ...
1
vote
0answers
104 views

ghc-mod template generation (M-t) not working

I've been following this Emacs+Haskell tutorial and I'm going through the Insertion Commands section. With Emacs 24.4.1, GHC 7.10.1 and ghc-mod master build, I've managed to get C-u M-t to work, so ...
1
vote
1answer
148 views

Avoid extra tabs when generating Haskell code with ghc-mod

I'm following the Haskell Emacs Tutorial here and Emacs is annoying me with the way it adds some extra TAB characters. E.g. When I have this code: data ExampleType = ExampleType Int Int instance Eq ...
16
votes
6answers
9k views

Emacs and command line $PATH disagreements on OSX

Having some issues with PATH settings on Emacs that are affecting my Haskell environment: I'm using ZSH, and when I go to the command line and call echo $PATH, it returns: /Users/g/Library/Haskell/...
1
vote
1answer
55 views

Install haskell-mode failed via el-get-install

el-get manage my other packages properly and easily, so I tried to install haskell-mode by el-get-install; however, it failed: sed -e 's/@@GIT_VERSION@@/13.10-301-g6e48791/g;s/@GIT_VERSION@/13.10-301-...
4
votes
1answer
2k views

Haskell Interactive Mode Setup - cabal unrecognised command: repl

I'm trying to set up haskell-mode following this instructions [0] https://github.com/haskell/haskell-mode/wiki/Haskell-Interactive-Mode-Setup [1] http://tim.dysinger.net/posts/2014-02-18-haskell-...
4
votes
1answer
244 views

Add more symbols to haskell `haskell-font-lock-symbols-alist`

I'm trying to add more symbols to haskell-mode's haskell-font-lock. The documentation for haskell-font-lock-symbols-alist says: Alist mapping Haskell symbols to chars. Each element has the form (...