ghc-mod

Why does “cabal init” break “ghc-mod check”?

时光总嘲笑我的痴心妄想 提交于 2020-01-02 07:13:35
问题 ghc-mod works in a directory with just a haskell source file but if I run "cabal init" in that directory (/tmp/test), I get the following error: (p1)dave@peach:/tmp/test$ !ghc ghc-mod check Main.hs ghc-mod: /tmp/test/dist/setup-config: hGetContents: invalid argument (invalid byte sequence) What's going wrong here? I'm running ghc-mod 5.2.11, and cabal 1.21.1.0, on a 64 bit ubuntu 14.04 computer. the LANG environment variable is set to en_US.UTF-8 ( I saw responses to some other questions that

Is there a way to use Djinn to auto-generate Haskell code in Emacs?

。_饼干妹妹 提交于 2019-12-10 16:09:44
问题 Title pretty much says it all. I'm looking for something like this: f :: Int -> Bool -> Int f = _body Djinn can use theorem proving to generate code for such a function by proving that the type is inhabited. I'm wondering, is there an existing way to get this functionality from within Emacs? So instead of writing TemplateHaskell in my code, I just run a command on my code and it inserts the generated code? I have ghc-mod installed, but I'm not very familiar with it. 回答1: Quoting the relevant

Can not install GHC-Mod

╄→尐↘猪︶ㄣ 提交于 2019-12-02 02:25:50
问题 Hello guys i am trying to install ghc-mod for vscode and i am running into this issue: **$ stack install ghc-mod** Populated index cache. Error: While constructing the build plan, the following exceptions were encountered: In the dependencies for ghc-mod-5.8.0.0: Cabal-2.0.1.1 from stack configuration does not match >=1.18 && <1.25 (latest matching version is 1.24.2.0) base-4.10.1.0 from stack configuration does not match >=4.6.0.1 && <4.10 (latest matching version is 4.9.1.0) mcabal-helper

stack install ghc-mod fails with dependencies conflicts on OSX 10.13.4

时间秒杀一切 提交于 2019-12-01 04:49:48
When I try to install ghc-mod via stack I end up having these depencies conflicts Error: While constructing the build plan, the following exceptions were encountered: In the dependencies for ghc-mod-5.8.0.0: Cabal-2.0.1.1 from stack configuration does not match >=1.18 && <1.25 (latest matching version is 1.24.2.0) base-4.10.1.0 from stack configuration does not match >=4.6.0.1 && <4.10 (latest matching version is 4.9.1.0) cabal-helper must match <0.8 && >=0.7.3.0, but the stack configuration has no specified version (latest matching version is 0.7.3.0) extra-1.6.8 from stack configuration does

stack install ghc-mod fails with dependencies conflicts on OSX 10.13.4

感情迁移 提交于 2019-12-01 02:05:02
问题 When I try to install ghc-mod via stack I end up having these depencies conflicts Error: While constructing the build plan, the following exceptions were encountered: In the dependencies for ghc-mod-5.8.0.0: Cabal-2.0.1.1 from stack configuration does not match >=1.18 && <1.25 (latest matching version is 1.24.2.0) base-4.10.1.0 from stack configuration does not match >=4.6.0.1 && <4.10 (latest matching version is 4.9.1.0) cabal-helper must match <0.8 && >=0.7.3.0, but the stack configuration