incud
incud

Reputation: 551

Cannot install set-monad package in brand new GHC installation

I just have installed GHC and Cabal. I'm getting stuck installing set-monad package. My setting is:

xxx:~$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 8.2.2

xxx:~$ cabal --version
cabal-install version 2.0.0.1
compiled using version 2.0.1.0 of the Cabal library 

xxx:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description:    Ubuntu 18.10
Release:    18.10
Codename:   cosmic

When I'm trying to install the package I get:

xxx:~$ cabal update
Downloading the latest package list from hackage.haskell.org

xxx:~$ cabal install set-monad
Resolving dependencies...
Configuring set-monad-0.3.0.0...
Building set-monad-0.3.0.0...
Failed to install set-monad-0.3.0.0
Build log ( /home/incud/.cabal/logs/ghc-8.2.2/set-monad-0.3.0.0-3UdszwszaTh17UtmYfmrwd.log ):
cabal: Entering directory '/tmp/cabal-tmp-12518/set-monad-0.3.0.0'
Configuring set-monad-0.3.0.0...
Preprocessing library for set-monad-0.3.0.0..
Building library for set-monad-0.3.0.0..
[1 of 1] Compiling Data.Set.Monad   ( Data/Set/Monad.hs, dist/build/Data/Set/Monad.o )

Data/Set/Monad.hs:210:10: error:
    Not in scope: type constructor or class ‘Semigroup’
    |
210 | instance Semigroup (Set a) where
    |          ^^^^^^^^^
cabal: Leaving directory '/tmp/cabal-tmp-12518/set-monad-0.3.0.0'
cabal: Error: some packages failed to install:
set-monad-0.3.0.0-3UdszwszaTh17UtmYfmrwd failed during the building phase. The
exception was:
ExitFailure 1

Am I missing something? There aren't any further information on hackage about installing the package.

Upvotes: 0

Views: 123

Answers (1)

leftaroundabout
leftaroundabout

Reputation: 120711

This was introduced in da3ee07, which changed the set-monad package from the old-style Monoid to current Semigroup. Unfortunately, that commit didn't think of keeping backwards compatibility as well, so that set-monad-0.2 works only with GHC<8.4 and set-monad-0.2 only with GHC>8.2. Worse, that wasn't made explicit in the version bounds.

This is already subject of a pull request, however it's never been merged.

Simple solution: install set-monad-0.2.

Upvotes: 1

Related Questions