When I try to build the latest leksah (using these instructions), I get this error:
src/IDE/TextEditor/CodeMirror.hs:225:38-56:
Couldn't match type ‘Graphics.UI.Gtk.WebKit.JavaScriptCore.JSBase.OpaqueJSContext’
with ‘webkit-javascriptcore-0.13.1.1:Graphics.UI.Gtk.WebKit.JavaScriptCore.JSBase.OpaqueJSContext’
NB: ‘Graphics.UI.Gtk.WebKit.JavaScriptCore.JSBase.OpaqueJSContext’
is defined in ‘Graphics.UI.Gtk.WebKit.JavaScriptCore.JSBase’
in package ‘webkitgtk3-javascriptcore-0.13.1.0’
‘webkit-javascriptcore-0.13.1.1:Graphics.UI.Gtk.WebKit.JavaScriptCore.JSBase.OpaqueJSContext’
is defined in ‘Graphics.UI.Gtk.WebKit.JavaScriptCore.JSBase’
in package ‘webkit-javascriptcore-0.13.1.1’
Expected type: JSContextRef
Actual type: Graphics.UI.Gtk.WebKit.JavaScriptCore.JSBase.JSGlobalContextRef
In the ‘cmContext’ field of a record
In the second argument of ‘($)’, namely ‘CodeMirrorState {..}’
cabal: Error: some packages failed to install:
leksah-0.15.2.0 failed during the building phase. The exception was:
ExitFailure 1
Does anyone know how to fix this?
Related
I'm trying to follow the steps for installation for derivation of software product lines called hephaestus-pl. However, at the time of performing the installation steps, according to the tutorial, there is an error when executing the cabal install command on all cloned repositories. The erros is:
$ sudo cabal install
Resolving dependencies...
Notice: installing into a sandbox located at
/home/notebook/workspace/hephaestus/hephaestus-sb
Configuring funsat-0.6.2...
Building funsat-0.6.2...
Failed to install funsat-0.6.2
Build log ( /home/notebook/workspace/hephaestus/hephaestus-sb/logs/funsat-0.6.2.log ):
cabal: Entering directory '.'
Configuring funsat-0.6.2...
Building funsat-0.6.2...
Preprocessing library funsat-0.6.2...
[ 4 of 10] Compiling Funsat.Monad ( src/Funsat/Monad.hs, dist/dist-sandbox-cf02e0bc/build/Funsat/Monad.o )
src/Funsat/Monad.hs:64:10: error:
• No instance for (Applicative (SSTErrMonad e st s))
arising from the superclasses of an instance declaration
• In the instance declaration for ‘Monad (SSTErrMonad e st s)’
src/Funsat/Monad.hs:88:10: error:
• Could not deduce (GHC.Base.Alternative (SSTErrMonad e st s))
arising from the superclasses of an instance declaration
from the context: Error e
bound by the instance declaration at src/Funsat/Monad.hs:88:10-52
• In the instance declaration for ‘MonadPlus (SSTErrMonad e st s)’
cabal: Leaving directory '.'
cabal: Error: some packages failed to install:
funsat-0.6.2 failed during the building phase. The exception was:
ExitFailure 1
I'm using the following version of ghci, which came installed along with the haskell-platform:
$ ghci
GHCi, version 8.0.1: http://www.haskell.org/ghc/ :? for help
The cabal version is:
$ cabal --version
cabal-install version 1.24.0.1
compiled using version 1.24.1.0 of the Cabal library
My operating system is debian 9.2.
This is failing to compile due to the Functor/Applicative/Monad proposal implemented in more recent versions of GHC. The code would originally have compiled just fine, but in recent versions of GHC, you cannot declare something as Monad without first declaring it as Functor and Applicative. You used to be able to, but now you cannot.
The library authors need to update the library's code to fix this new restriction.
I've had nothing but trouble using cabal, not sure if it's due to a lack of understanding, or a faulty mental model, but things have been tough.
At the moment I'm just trying to get ghc-mod to work for my vim plugins. It usually works for a day or two and then starts failing for seemingly no reason with an error, the error I receive seems to change from time to time, right now I'm getting this one:
$ ghc-mod check Main.hs
ghc-mod: /Users/chris/.stack/snapshots/x86_64-osx/lts-6.15/7.10.3/pkgdb/package.cache:
GHC.PackageDb.readPackageDb: inappropriate type (Not a valid Unicode code point!)
Any ideas about how to fix this sort of thing? I've tried installing it again, but I get this (I think my cabal packages are all screwed up but don't know how to fix it):
$ cabal install ghc-mod
Resolving dependencies...
Downloading haskell-src-exts-1.17.1...
Configuring haskell-src-exts-1.17.1...
Failed to install haskell-src-exts-1.17.1
Build log ( /Users/chris/.cabal/logs/haskell-src-exts-1.17.1.log ):
cabal: Entering directory '/var/folders/6l/rdh2g5wn41s8vxchngkt02_c0000gn/T/cabal-tmp-45583/haskell-src-exts-1.17.1'
Configuring haskell-src-exts-1.17.1...
cabal: The program 'happy' version >=1.19 is required but it could not be
found.
cabal: Leaving directory '/var/folders/6l/rdh2g5wn41s8vxchngkt02_c0000gn/T/cabal-tmp-45583/haskell-src-exts-1.17.1'
cabal: Error: some packages failed to install:
ghc-mod-5.6.0.0 depends on haskell-src-exts-1.17.1 which failed to install.
haskell-src-exts-1.17.1 failed during the configure step. The exception was:
ExitFailure 1
hlint-1.9.35 depends on haskell-src-exts-1.17.1 which failed to install.
Edit:
Looked away for a second and tried again, now I'm getting this error, getting kinda sick of cabal changing its mind all the time:
$ ghc-mod check Main.hs
[1 of 5] Compiling CabalHelper.Common ( CabalHelper/Common.hs, /Users/chris/.ghc-mod/cabal-helper/CabalHelper/Common.o )
[2 of 5] Compiling CabalHelper.Licenses ( CabalHelper/Licenses.hs, /Users/chris/.ghc-mod/cabal-helper/CabalHelper/Licenses.o )
CabalHelper/Licenses.hs:53:18: error:
Ambiguous occurrence ‘lookupInstalledPackageId’
It could refer to either ‘Distribution.Simple.PackageIndex.lookupInstalledPackageId’,
imported from ‘Distribution.Simple.PackageIndex’ at CabalHelper/Licenses.hs:24:1-39
or ‘CabalHelper.Licenses.lookupInstalledPackageId’,
defined at CabalHelper/Licenses.hs:38:1
CabalHelper/Licenses.hs:74:10: error:
Ambiguous occurrence ‘lookupInstalledPackageId’
It could refer to either ‘Distribution.Simple.PackageIndex.lookupInstalledPackageId’,
imported from ‘Distribution.Simple.PackageIndex’ at CabalHelper/Licenses.hs:24:1-39
or ‘CabalHelper.Licenses.lookupInstalledPackageId’,
defined at CabalHelper/Licenses.hs:38:1
ghc-mod: readCreateProcess: /Users/chris/.stack/snapshots/x86_64-osx/lts-6.15/7.10.3/libexec/cabal-helper-wrapper "--with-ghc=/usr/local/bin/ghc" "--with-ghc-pkg=/usr/local/bin/ghc-pkg" "--with-cabal=cabal" "/Users/chris/dev/formatter" "/Users/chris/dev/formatter/.stack-work/dist/x86_64-osx/Cabal-1.24.0.0" "package-db-stack" "entrypoints" "source-dirs" "ghc-options" "ghc-src-options" "ghc-pkg-options" "ghc-merged-pkg-options" "ghc-lang-options" "licenses" "flags" "config-flags" "non-default-config-flags" "compiler-version" (exit 1): failed
This error was caused by having a mismatch between my local stack ghc version and the global ghc-mod ghc version, I updated the ghc version in the stack project to latest and everything is working fine.
According to the iHaskell page it should be possible to install from Hackage
cabal install ihaskell
However, when I do so it fails to install certain packages:
...
[ 7 of 44] Compiling HsColour ( src/HsColour.hs, dist/build/HsColour.o )
src/HsColour.hs:25:16:
Couldn't match type `Int' with `[Char]'
Expected type: String -> String
Actual type: Int -> String -> String
In the return type of a call of `CSS.hscolour'
Probable cause: `CSS.hscolour' is applied to too few arguments
In the expression: CSS.hscolour False
In an equation for `hsColourHTML':
hsColourHTML = CSS.hscolour False
Failed to install hlint-1.9.10
cabal: Error: some packages failed to install:
hlint-1.9.10 failed during the building phase. The exception was:
ExitFailure 1
ihaskell-0.5.0.0 depends on hlint-1.9.10 which failed to install.
Suggesting something about hlint-1.9.10. However, hlint-1.9.17 is in fact present.
ubuntu:~$ hlint -V
HLint v1.9.17, (C) Neil Mitchell 2006-2015
I'm working on a Linux machine with GHC 7.8.2 and cabal 1.20.0.1.
I'm trying to install semigroups and whenever I do, I get the dreaded error message about missing dyn_hi files.
/home/me/.cabal/lib/x86_64-linux-ghc-7.8.2/semigroups-0.14
setup-Simple-Cabal-1.18.1.3-x86_64-linux-ghc-7.8.2: Error: Could not find
module: Data.Semigroup with any suffix: ["dyn_hi"] in the search path:
["dist/build"]
cabal: Error: some packages failed to install:
semigroups-0.14 failed during the final install step. The exception was:
I've tried following the advice given here and here. I've removed .cabal/config, .ghc, added shared : True and followed each step.But after multiple repetitions of these instructions I'm still getting the same errors.
Is there any other way to diagnose and fix these errors?
So i'm trying to install the llvm-3.4.2.2 haskell bindings through cabal. But it fails with the following output
Curtiss-MacBook-Air:TestImages Curtis$ sudo cabal install llvm-general
Password:
Resolving dependencies...
[1 of 1] Compiling Main ( /tmp/llvm-general-3.4.2.2-7647/llvm-general-3.4.2.2/Setup.hs, /tmp/llvm-general-3.4.2.2-7647/llvm-general-3.4.2.2/dist/setup/Main.o )
Linking /tmp/llvm-general-3.4.2.2-7647/llvm-general-3.4.2.2/dist/setup/setup ...
Configuring llvm-general-3.4.2.2...
Building llvm-general-3.4.2.2...
Preprocessing library llvm-general-3.4.2.2...
dyld: Library not loaded: /Users/ian/zz64/ghc-7.6.3/libffi/build/inst/lib/libffi.6.dylib
Referenced from: /private/tmp/llvm-general-3.4.2.2-7647/llvm-general-3.4.2.2/dist/build/LLVM/General/Internal/LibraryFunction_hsc_make
Reason: image not found
running dist/build/LLVM/General/Internal/LibraryFunction_hsc_make failed (exit code 5)
command was: dist/build/LLVM/General/Internal/LibraryFunction_hsc_make >dist/build/LLVM/General/Internal/LibraryFunction.hs
Failed to install llvm-general-3.4.2.2
cabal: Error: some packages failed to install:
llvm-general-3.4.2.2 failed during the building phase. The exception was:
ExitFailure 1
It appears to fail because someone hardcoded the path /Users/ian/zz64/ghc-7.6.3/libffi/build/inst/lib/libffi.6.dylib in LibraryFunction_hsc_make. I've found people who have run into similar problems with this path but no viable solutions to my problem