Skip to content

Constraint could not be deduced, although it is there GHC-39999 (GHC-9.8.1)

Summary

The GHC error reads:

src/LLVM/DSL/Expression/Vector.hs:101:19: error: [GHC-39999]
    • Could not deduce ‘LLVM.Positive n’
        arising from a use of ‘MultiValueVec.take’
      from the context: (LLVM.Positive n, LLVM.Positive m,
                         MultiVector.Select a)

Steps to reproduce

$ cabal unpack llvm-dsl-0.1.1
$ cd llvm-dsl-0.1.1
llvm-dsl-0.1.1$ nix-shell -p llvmPackages_16.libllvm gmp
[nix-shell:llvm-dsl-0.1.1]$ PATH=/usr/local/ghc/9.8.1/bin:$PATH cabal-3.10 build

I need to specify "gmp" for the nix-shell, maybe you do not need that.

I can try to minimize that example, but maybe you already have an idea what the problem might be.

Environment

  • GHC version used: 9.8.1
  • Operating System: GNU-Linux
  • System Architecture: amd64
Edited by Lemming
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information