Haskell how to resolve this error: Unsupported extension: MultiWayIf - haskell

while trying to install the friday package, I got the error
Preprocessing library friday-0.2.2.0...
src/Vision/Detector/Edge.hs:3:14: Unsupported extension: MultiWayIf
cabal: Error: some packages failed to install:
friday-0.2.2.0 failed during the building phase. The exception was:
ExitFailure 1
How to resolve this error?
I am using ghc version 7.4.1 and
cabal-install version 0.14.0
using version 1.14.0 of the Cabal library

MultiWayIf was introduced in the 7.6 branch of GHC. You're going to have to upgrade the compiler or patch the library.

Related

ghc.exe could not execute ld.exe while installing zlib

Im using
Windows 10
cabal-install version 3.2.0.0
GHC version 8.10.2
While trying to install zlib via
cabal install zlib
I get:
Building library for zlib-0.6.2.2..
[1 of 5] Compiling Codec.Compression.Zlib.Stream ( dist\build\Codec\Compression\Zlib\Stream.hs, dist\build\Codec\Compression\Zlib\Stream.o )
ghc.exe: could not execute: C:/GitLabRunner/builds/2WeHDSFP/0/ghc/ghc/inplace/mingw/bin/ld.exe
As the comments discuss, that version of ghc is known broken on windows. (cf https://gitlab.haskell.org/ghc/ghc/-/issues/18550). I suggest upgrading to ghc 8.10.5

Haskell: Trouble updating/detecting cabal

I have both ghci versions 7.10 and 8 installed on my Ubuntu 16.04. I want to install something based on cabal. I already have cabal installed as the command
cabal --version
yields
cabal-install version 1.22.6.0
using version 1.22.5.0 of the Cabal library
But when I go to update with
cabal update
I get
Downloading the latest package list from hackage.haskell.org
cabal: does not exist
So I am not sure what is going on or how to resolve this. I hope to afterwards install gloss which is based on cabal. But
cabal install gloss-examples
yields
Resolving dependencies...
Downloading bindings-DSL-1.0.23...
Downloading bmp-1.2.6.3...
Failed to install bmp-1.2.6.3
Downloading vector-0.10.12.3...
Build log ( /home/username/.cabal/logs/bmp-1.2.6.3.log ):
cabal: /home/username/.cabal/logs/bmp-1.2.6.3.log: does not exist
EDIT: I originally installed ghci 7.10. Then later installed ghci 8. Could this have any effect?
EDIT2: After installing
cabal install Cabal cabal-install
I still get the same error with
cabal update
Also I still cannot
cabal install gloss-examples
But I get a different error this time
Resolving dependencies...
Downloading bindings-DSL-1.0.23...
Downloading bmp-1.2.6.3...
Failed to install bindings-DSL-1.0.23
Downloading vector-0.10.12.3...
Build log ( /home/aa/.cabal/logs/bindings-DSL-1.0.23.log ):
cabal: /home/aa/.cabal/logs/bindings-DSL-1.0.23.log: does not exist
EDIT3: When I installed Cabal, it says that I installed
Installed cabal-install-1.24.0.2
But when I check with
cabal --version
I am still stuck at
cabal-install version 1.22.6.0
which tells me somehow they are not linked.

pkg-config version of sdl2 is too low

I'm currently trying to get SDL2 for Haskell to work on Ubuntu but while trying to install SDL2 with cabal I get the following error
cabal: The pkg-config package sdl2 version >=2.0.3 is required but the version
installed on the system is version 2.0.2
Failed to install sdl2-1.2.0
cabal: Error: some packages failed to install:
sdl2-1.2.0 failed during the configure step. The exception was:
ExitFailure 1
So it seems I do have pkg-config and I do have sdl2 but I seem to have downloaded the wrong version of libsdl-dev? I have the latest version, so is there a way for me to upgrade the pkg-config file?

Happstack dependency failure on Mac OS X 10.10 Yosemite

I am trying to install Happstack using the following command:
cabal install happstack
Specifications:
Mac OS X 10.10 (Yosemite)
GHC 7.8.3
cabal 1.20.0.2
Error Messages:
ld: library not found for -lHSstm-2.4.3-ghc7.8.3
clang: error: linker command failed with exit code 1 (use -v to see invocation)
Failed to install threads-0.5.1.2
cabal: Error: some packages failed to install:
happstack-7.0.2 depends on threads-0.5.1.2 which failed to install.
happstack-server-7.3.9 depends on threads-0.5.1.2 which failed to install.
system-filepath-0.4.12 failed during the building phase. The exception was:
ExitFailure 1
threads-0.5.1.2 failed during the building phase. The exception was:
ExitFailure 1

Some haskell dynamic library missing

This error message failing my installation of haskell-src-exts-1.15.0.1
ld: library not found for -lHScpphs-1.18.5-ghc7.8.2
So I guess my cpphs is missing. When I tried to install cpphs, however
$ cabal install cpphs
Resolving dependencies...
All the requested packages are already installed:
cpphs-1.18.5
Use --reinstall if you want to reinstall anyway.
The similar error happens for text-1.1.1.3.
I have tried erasing everything and reinstalling haskell-platform but it doesnt work.
I use haskell-platform installed from homebrew, but I had already had the latest version of cabal and ghc
λ ~/cabal --version
cabal-install version 1.20.0.3
using version 1.20.0.1 of the Cabal library
λ ~/ghc --version
The Glorious Glasgow Haskell Compilation System, version 7.8.2
find ing the *.dylib gives no result.

Resources