Questions tagged [ghc-mod]

ghc-mod is a command to enrich Haskell programming on editors

ghc-mod is both an executable and a Haskell library. It is used to provide warnings, errors and type information in the context of Haskell programming. The official description is as follows:

Happy Haskell Programming

The ghc-mod command and ghc-modi command are backend commands to enrich Haskell programming on editors including Emacs, Vim, and Sublime. ghc-mod and ghc-modi are based on the ghc-mod library which is a wrapper of GHC API and Cabal.

ghc-mod gets used in vim, emacs, Sublime Text, and other editors.

See also:

External resources

57 questions
2
votes
1 answer

Does ghc-mod support ghcjs?

As of May 2016, does ghc-mod support projects compiled with ghcjs? I realise that in a lot of cases, the source is the same, but this is not the case when working with ghcjs-dom library. I currently have 2 project folders, configured with stack.…
OllieB
  • 1,431
  • 9
  • 14
2
votes
0 answers

configure ghc-mod for atom on ubuntu

If I install ghc-mod with cabal install ghc-mod I get: $ ghc-mod --version ghc-mod version 5.5.0.0 compiled by GHC 7.6.3 However, atom complains Haskell-ghc-mod: ghc-mod failed to launch it is probably missing or misconfigured Error: spawnSync…
NoIdeaHowToFixThis
  • 4,484
  • 2
  • 34
  • 69
1
vote
0 answers

stack install ghc-mod fails to construct build plan

I've been trying to install ghc-mod locally within a Stack project. However, whenever I try to stack build ghc-mod, I get a build plan failure like the following: Error: While constructing the build plan, the following exceptions were…
Venantius
  • 2,471
  • 2
  • 28
  • 36
1
vote
0 answers

Haskell GHC mod error in Atom

I'm trying to set up a Haskell IDE with Atom on mac. I install the binaries with stack and make sure the right paths are under "Additional Path Directories", but get the following errors from GHC mod: I also tried using cabal instead of stack, with…
jorgen
  • 3,425
  • 4
  • 31
  • 53
1
vote
1 answer

Problems installing Haskell with Atom on a Mac

I want to program in Haskell using Atom on a Mac. Therefore I installed the following packages in Atom: haskell-ghc-mod ide-haskell ide-haskell-cabal language-haskell After that I installed the Haskell Platform 8.2.1 from…
mrCarnivore
  • 4,638
  • 2
  • 12
  • 29
1
vote
1 answer

Proper Way To Pass hlint Arguments to ghc-mod?

I'm trying to lint a file with ghc-mod. I know ghc-mod uses hlint for this and I know that hlint accepts arguments to modify the suggestions it reports. For instance, this works just fine: eric@linux-epth:total-beginner-haskell$ hlint…
ericky
  • 1,641
  • 2
  • 14
  • 16
1
vote
1 answer

Haskell cabal: C compiler cannot create executables

I'm trying to install ghc-mod for GHC 8.0.1 on windows/x64. When I try to install ghc-mod via cabal install ghc-mod I get an error saying my C compiler isn't working (it is using the c-compiler bundled with ghc). Here is the output (of the second…
Cooki3Tube
  • 107
  • 1
  • 10
1
vote
1 answer

switching component for ghc-mod

I have a project whose main cabal component is a library library hs-source-dirs: src ... and which also defines executable todo if !flag(example) Buildable: False ghc-options: -Wall cpp-options: -DGHCJS_BROWSER …
nicolas
  • 9,549
  • 3
  • 39
  • 83
1
vote
1 answer

ghc-mod under stack complaining about hidden main package

I have following problem with ghc-mod which prevents me from using ide for some files in a yesod app project. I install template app as follows: /tmp$ stack new demo yesod-sqlite && cd demo /tmp/demo$ stack setup && stack build && stack install…
Cthulhu
  • 1,379
  • 1
  • 13
  • 25
1
vote
0 answers

Installing ghc-mod on Windows 7 freezes forever

I want to enable Frege, basically Haskell on JVM (https://github.com/Frege) in IntelliJ IDEA. It requires path to ghc-mod and ghc-modi. Therefore, I installed Haskell Platform for Windows 64 bit. Since Cabal is already part of the Platform, I…
user2039784
  • 199
  • 9
1
vote
0 answers

ghc-mod tries to execute cabal for a stack project (even though no dist/ dir is present)

I'm using ghc-mod installed using stack on OSX: $ ghc-mod --version ghc-mod version 5.4.0.0 compiled by GHC 7.10.3 However, when I try to use it in spacemacs or from the command line with a stack project which does not have a dist/ dir, it keeps…
daj
  • 6,962
  • 9
  • 45
  • 79
1
vote
1 answer

why does ghc-mod powered neco-ghc only works on project root directory?

I'm new to haskell so I don't have deep understanding about how ghc-mod works and how cabal-install-like build tools of haskell worlds move under the hood. But I somehow found vim haskell plugins from github, including neco-ghc auto completion…
June
  • 2,107
  • 4
  • 22
  • 33
1
vote
0 answers

Ghc mod: change default target

Is there a way to change ghc-mod's target? I have a cabal file with two sections: a library target, and a tests target. Ghc detects modules for packages in the library target correctly. However, if I add a package only to the tests target (such as…
Leo
  • 21
  • 1
1
vote
1 answer

ghc-modi and cabal version

(Haskell newbie here) I'm trying to configure HaskForce plugin into IntelliJ IDEA, configured "ghc-mod" with "legacy-interactive" in "GHC Modi" Flags. The root problem seems to be related to cabal version, although when I try autocompleting on any…
LetMeSOThat4U
  • 6,470
  • 10
  • 53
  • 93
0
votes
1 answer

Install the ghc-mod fails on Osx 10.15.3(already try with lts-8.24)

I am new to haskell and want to deploy haskell on vs code. When I try to install ghc-mod by using "stack install ghc-mod --resolver lts-8.24". The action fails. If anyone could help me, it would be so appreciated! The erro log is as follow: happy …
Erick li
  • 1
  • 1