Questions tagged [haskell-mode]

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

38 questions
25
votes
7 answers

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:…
Galder Zamarreño
  • 1,527
  • 2
  • 12
  • 21
8
votes
2 answers

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 isn't allowed in the ghci. But then #+begin_src…
147pm
  • 2,907
  • 1
  • 18
  • 39
4
votes
1 answer

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 following Haskell file: module Foo where foo :: Int foo…
illabout
  • 285
  • 2
  • 14
4
votes
1 answer

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-with-emacs.html but when I try to bring the REPL in a…
Nicolas
  • 41
  • 1
  • 3
4
votes
1 answer

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 (STRING . CHAR) or (STRING CHAR PREDICATE). STRING…
Renan Ranelli
  • 1,379
  • 10
  • 17
3
votes
1 answer

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 qs with a list of numbers without a problem. but in Org-mode it…
Azriel
  • 181
  • 4
3
votes
1 answer

`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 value" is given as (haskell-indentation-mode…
Tianxiang Xiong
  • 3,848
  • 16
  • 27
3
votes
1 answer

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 that stack installs from stackage?
aqui8
  • 221
  • 1
  • 6
2
votes
1 answer

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 exposed through Stack now. How do I go around…
2
votes
2 answers

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.14s user 0.13s system 95% cpu 1.324 total This…
2
votes
2 answers

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 know what to look for.
Paul
  • 151
  • 5
2
votes
1 answer

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
  • 51
  • 6
2
votes
2 answers

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 correct way of configuring emacs/spacemacs for…
flavio
  • 121
  • 1
  • 3
1
vote
1 answer

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 returning with: 'Error (haskell-mode-vars-hook): Error…
KammO
  • 21
  • 3
1
vote
0 answers

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 to `Telemetry.hs' ... Applying 22 edits to…
dmvianna
  • 370
  • 4
  • 21
1
2 3