Skip to main content
Share Your Experience: Take the 2024 Developer Survey

Questions tagged [haskell-mode]

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

Filter by
Sorted by
Tagged with
0 votes
0 answers
44 views

outline-minor-mode works for Haskell but not Python

I can use outline-minor-mode to fold Haddock-style headings in Haskell code. For instance, consider the following file: -- (haskell-mode) -- (outline-minor-mode) -- (setq-local outline-regexp "-- ...
Jeffrey Benjamin Brown's user avatar
1 vote
1 answer
474 views

haskell-mode not able to find GHC installation

I installed haskell-mode and I want to launch the REPL GHCi with the command C-c C-z. However, on typing C-c C-z, it shows error Could not find any installation of GHC. And when I use same command ...
gauss_is_king's user avatar
0 votes
0 answers
310 views

Emacs hangs on org-babel-execute-src-block for Haskell blocks

I have a minimal org file with a Haskell code block: #+begin_src haskell putStrLn "Hello World" #+end_src When I do M-x org-babel-execute-src-block, Emacs hangs with minibuffer saying: ...
Artem Pelenitsyn's user avatar
1 vote
1 answer
1k views

Haskell-mode in Doom emacs returns: 'Error running hook "lsp!" because (invalid-function lsp!)'

I am running Xmonad window manager together with Xmobar on ArchLinux 5.14.12-arch1-1. I have ghc, cabal, and stack installed. Suddenly Doom has started having a problem with Haskell files and is ...
KammO's user avatar
  • 21
1 vote
0 answers
143 views

Why does lsp-haskell format some projects and not others?

This is the message I get when I use lsp to format the current project: lsp-request: No plugin enabled for STextDocumentFormatting, available: [] And then on another project: LSP :: Applying 22 edits ...
dmvianna's user avatar
  • 392
2 votes
1 answer
629 views

How to Use Stack's GHCI when in Haskell Interactive Mode

I'm trying to maintain all of my package dependencies through Stack. However, when trying to use Haskell's Interactive Mode in Emacs, through haskell-mode, it won't find GHCI anymore, since it is only ...
psygo's user avatar
  • 157
0 votes
1 answer
575 views

File mode specification error: (void-variable lsp-csharp--action-client-find-references)

I'm using doom emacs. my ~/.doom.d/config.el is - (use-package! lsp-mode :hook (haskell-mode . lsp) :commands lsp) (use-package! lsp-ui :commands lsp-ui-mode) (use-package! lsp-haskell :after ...
Rajkumar Natarajan's user avatar
0 votes
0 answers
58 views

interactive-haskell-mode: Format specifier doesn't match argument type

Pressing C-c C-l (for a simple "Hello, world!" script) in interactive-haskell-mode gives me the error message Format specifier doesn't match argument type whereas I would have expected the ...
NicolasBourbaki's user avatar
0 votes
1 answer
55 views

Emacs keeps overwriting files in Haskell mode

I'm using emacs: GNU Emacs 26.3 Copyright (C) 2019 Free Software Foundation, Inc. GNU Emacs comes with ABSOLUTELY NO WARRANTY. You may redistribute copies of GNU Emacs under the terms of the GNU ...
Ashesh's user avatar
  • 121
2 votes
2 answers
256 views

How to disable stack with flycheck for Haskell?

I'm on nixos and due to stack's integration with Nix/Nixos the following command is very slow: time stack ghc ghc: no input files Usage: For basic information, try the `--help' option. stack ghc 1....
Chris Stryczynski's user avatar
0 votes
0 answers
57 views

Retouching syntax highlight of major mode

I am writing a minor mode to complement haskell-mode, and I am trying to color subwords in camelCased identifiers with slightly different shades of the same color. Perhaps this can be done by "...
Tássio's user avatar
  • 209
0 votes
2 answers
592 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....
dbanas's user avatar
  • 101
3 votes
1 answer
332 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 ...
Azriel's user avatar
  • 181
0 votes
0 answers
46 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 ?
m68k's user avatar
  • 1
2 votes
2 answers
971 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 ...
Paul's user avatar
  • 151
1 vote
0 answers
118 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 ...
jay's user avatar
  • 111
0 votes
1 answer
852 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-...
Reb.Cabin's user avatar
  • 721
4 votes
1 answer
1k 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 ...
illabout's user avatar
  • 285
1 vote
1 answer
75 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 ...
user7637341's user avatar
0 votes
0 answers
75 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.
Matthew Piziak's user avatar
1 vote
0 answers
458 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 ...
Matthew Piziak's user avatar
2 votes
1 answer
2k 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
T.Magdy's user avatar
  • 51
2 votes
2 answers
4k 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 ...
flavio's user avatar
  • 121
3 votes
1 answer
447 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 ...
Tianxiang Xiong's user avatar
1 vote
1 answer
496 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 ...
yujaiyu's user avatar
  • 896
2 votes
2 answers
534 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 ...
Mario Román's user avatar
8 votes
2 answers
1k 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 ...
147pm's user avatar
  • 2,969
1 vote
2 answers
815 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 ...
lolveley's user avatar
  • 111
3 votes
1 answer
2k 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 ...
aqui8's user avatar
  • 221
1 vote
0 answers
107 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 ...
Galder Zamarreño's user avatar
1 vote
1 answer
214 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 ...
Galder Zamarreño's user avatar
25 votes
7 answers
22k 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/...
Galder Zamarreño's user avatar
1 vote
1 answer
62 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-...
Nick's user avatar
  • 4,493
4 votes
1 answer
3k 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-...
Nicolas's user avatar
  • 41
4 votes
1 answer
335 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 (...
Renan Ranelli's user avatar