Haskell 堆栈中的 Win32 包问题

Issue with Win32 package in Haskell Stack

我在 LTS 8.15. I am starting a basic, default, library for which I will need to use the win32 package.

在 cabal 文件中使用这些依赖项:

  build-depends:       base >= 4.7 && < 5
                       , win32

我收到以下错误消息:

While constructing the build plan, the following exceptions were encountered:

In the dependencies for w32test-0.1.0.0:
    win32 must match -any, but the stack configuration has no specified version

Plan construction failed.

我试图强制一个包版本:

  build-depends:       base >= 4.7 && < 5
                       , win32 == 2.3.1.1

但我再次收到相同的错误消息:

While constructing the build plan, the following exceptions were encountered:

In the dependencies for w32test-0.1.0.0:
    win32 must match ==2.3.1.1, but the stack configuration has no specified version

Plan construction failed.

如果答案很重要,这是我的简约 stack.yaml 文件:

resolver: lts-8.15
packages:
- '.'
extra-deps: []
flags: {}
extra-package-dbs: []

我的问题:我不明白出了什么问题,谁能建议解决问题的方法?

对我来说这似乎是一个区分大小写的问题,您可以尝试将其添加为 Win32。