Skip to content

SmartCheck not compiling with GHC 8.0.2 or QuickCheck 2.10.* #9

@rudymatela

Description

@rudymatela

Hello,

I think SmartCheck-0.2.2 does not compile under GHC 8.0.2 or with QuickCheck 2.10.*. Though this may be just my system misbehaving. I have tried the following.

Starting from a fresh home directory, I did:

$ cabal update
Downloading the latest package list from hackage.haskell.org
$ cabal install smartcheck
Resolving dependencies...
Downloading smartcheck-0.2.2...
Configuring smartcheck-0.2.2...
Building smartcheck-0.2.2...
Failed to install smartcheck-0.2.2
Build log ( /home/testuser/.cabal/logs/smartcheck-0.2.2.log ):
cabal: Entering directory '/tmp/cabal-tmp-30973/smartcheck-0.2.2'
Configuring smartcheck-0.2.2...
Building smartcheck-0.2.2...
Preprocessing library smartcheck-0.2.2...
<command line>: cannot satisfy -package-id QuickCheck-2.10.0.1-ALuGysu7txTB2VnkPyDuTq
    (use -v for more information)
cabal: Leaving directory '/tmp/cabal-tmp-30973/smartcheck-0.2.2'
cabal: Error: some packages failed to install:
smartcheck-0.2.2 failed during the building phase. The exception was:
ExitFailure 1

After some fiddling around, I installed the immediately previous version
of QuickCheck (2.9.2):

$ cabal install tf-random primitive random generic-deriving mtl --reinstall --force-reinstalls
...
$ cabal install QuickCheck-2.9.2
...
Installed QuickCheck-2.9.2

When I try to install install SmartCheck bound with QuickCheck-2.9.2, I get a compilation error message:

$ cabal install smartcheck --constraint 'QuickCheck <= 2.9.2'
Resolving dependencies...
Configuring smartcheck-0.2.2...
Building smartcheck-0.2.2...
Failed to install smartcheck-0.2.2
Build log ( /home/testuser/.cabal/logs/smartcheck-0.2.2.log ):
cabal: Entering directory '/tmp/cabal-tmp-1490/smartcheck-0.2.2'
Configuring smartcheck-0.2.2...
Building smartcheck-0.2.2...
Preprocessing library smartcheck-0.2.2...

src/Test/SmartCheck/Types.hs:6:14: warning:
    -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
[ 1 of 11] Compiling Test.SmartCheck.Types ( src/Test/SmartCheck/Types.hs, dist/build/Test/SmartCheck/Types.o )

src/Test/SmartCheck/Types.hs:256:10: error:
    • No instance for (Generic Char)
        arising from a use of ‘Test.SmartCheck.Types.$dmsubTypes’
    • In the expression: Test.SmartCheck.Types.$dmsubTypes @Char
      In an equation for ‘subTypes’:
          subTypes = Test.SmartCheck.Types.$dmsubTypes @Char
      In the instance declaration for ‘SubTypes Char’

...

src/Test/SmartCheck/Types.hs:259:10: error:
    • No instance for (Generic Int)
        arising from a use of ‘Test.SmartCheck.Types.$dmshowForest’
    • In the expression: Test.SmartCheck.Types.$dmshowForest @Int
      In an equation for ‘showForest’:
          showForest = Test.SmartCheck.Types.$dmshowForest @Int
      In the instance declaration for ‘SubTypes Int’
cabal: Leaving directory '/tmp/cabal-tmp-1490/smartcheck-0.2.2'
cabal: Error: some packages failed to install:
smartcheck-0.2.2 failed during the building phase. The exception was:
ExitFailure 1

This may be my system, but it seems this issue is related to the fact that
Generic instances have been removed from base types starting with GHC 8.0. See
comment number 7 from GHC ticket 10532. See also this issue from lens and
this issue from optparse.

I am using GHC 8.0.2, cabal-install 1.24.0.2 and Cabal 1.24.2.0.

I tried installing under GHC 7.10 and it worked fine.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions