Skip to content

Benchmarks fail to compile on GHC 7.10.3 #7

Closed
@RyanGlScott

Description

@RyanGlScott

Initially reported at commercialhaskell/stackage#1372 (comment)

With GHC 7.10.3/Cabal-1.22.5.0, either cabal bench or stack bench fails with:

Preprocessing benchmark 'benchmarks' for vector-binary-instances-0.2.3.1...
[1 of 1] Compiling Main             ( benchmarks/Benchmarks.hs, dist/build/benchmarks/benchmarks-tmp/Main.o )

benchmarks/Benchmarks.hs:41:50:
    Overlapping instances for Binary (U.Vector Int)
      arising from a use of ‘decode’
    Matching instances:
      instance (U.Unbox a, Binary a) => Binary (U.Vector a)
        -- Defined in ‘vector-binary-instances-0.2.3.1@vecto_AfoM4V7e5UwKO3jo4zR1YO:Data.Vector.Binary’
      instance (U.Unbox a, Binary a) => Binary (U.Vector a)
        -- Defined in ‘Data.Vector.Binary’
    In the first argument of ‘nf’, namely ‘(decode :: V)’
    In the second argument of ‘($)’, namely ‘nf (decode :: V) bs’
    In the expression: bench "U.Vector Int" $ nf (decode :: V) bs

benchmarks/Benchmarks.hs:48:40:
    Overlapping instances for Binary (U.Vector Int)
      arising from a use of ‘encode’
    Matching instances:
      instance (U.Unbox a, Binary a) => Binary (U.Vector a)
        -- Defined in ‘vector-binary-instances-0.2.3.1@vecto_AfoM4V7e5UwKO3jo4zR1YO:Data.Vector.Binary’
      instance (U.Unbox a, Binary a) => Binary (U.Vector a)
        -- Defined in ‘Data.Vector.Binary’
    In the first argument of ‘nf’, namely ‘encode’
    In the second argument of ‘($)’, namely ‘nf encode vec1’
    In the expression: bench "U.Vector Int 3" $ nf encode vec1

Perhaps Cabal is being confused by the fact that the benchmarks depend on criterion, which itself transitively depends on vector-binary-instances itself?

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