wxHaskell 暂时无法使用吗?

Is wxHaskell unusable for the moment?

我在 Ubuntu 21.04“多毛河马”、GHC 8.8.4 和 Cabal 3.0.0.0。我无法安装 wx 软件包。

当我直接尝试cabal install wx --lib时,输出了以下消息:

Resolving dependencies...
cabal: Could not resolve dependencies:
[__0] trying: wx-0.92.3.0 (user goal)
[__1] trying: wxcore-0.92.3.0 (dependency of wx +/-splitbase)
[__2] trying: wxdirect-0.92.3.0 (dependency of wxcore)
[__3] trying: strict-0.4.0.1 (dependency of wxdirect)
[__4] trying: text-1.2.4.0/installed-1.2... (dependency of strict)
[__5] next goal: binary (dependency of strict)
[__5] rejecting: binary-0.8.7.0/installed-0.8... (conflict: wxcore
+/-splitbase => containers>=0.1 && <0.6, binary =>
containers==0.6.2.1/installed-0.6...)
[__5] rejecting: binary-0.8.8.0, binary-0.8.7.0, binary-0.8.6.0,
binary-0.8.5.1, binary-0.8.5.0, binary-0.8.4.1, binary-0.8.4.0,
binary-0.8.3.0, binary-0.8.2.1, binary-0.8.2.0, binary-0.8.1.0,
binary-0.8.0.1, binary-0.8.0.0, binary-0.7.6.1, binary-0.7.6.0,
binary-0.7.5.0, binary-0.7.4.0, binary-0.7.3.0, binary-0.7.2.3,
binary-0.7.2.2, binary-0.7.2.1, binary-0.7.2.0, binary-0.7.1.0,
binary-0.7.0.1, binary-0.7.0.0, binary-0.6.4.0, binary-0.6.3.0,
binary-0.6.2.0, binary-0.6.1.0, binary-0.6.0.0, binary-0.5.1.1,
binary-0.5.1.0, binary-0.5.0.2, binary-0.5.0.1, binary-0.5, binary-0.4.5,
binary-0.4.4, binary-0.4.3.1, binary-0.4.3, binary-0.4.2, binary-0.4.1,
binary-0.4, binary-0.3, binary-0.2, binary-0.10.0.0, binary-0.9.0.0 (conflict:
text => binary==0.8.7.0/installed-0.8...)
[__5] fail (backjumping, conflict set: binary, strict, text, wxcore)
Backjump limit reached (currently 4000, change with --max-backjumps or try to
run with --reorder-goals).

所以我尝试了 cabal install wx --lib --max-backjumps 8192。它没有帮助:

Resolving dependencies...
Build profile: -w ghc-8.8.4 -O1
In order, the following will be built (use -v for more details):
- old-locale-1.0.0.7 (lib) (requires build)
- old-time-1.1.0.3 (lib:old-time) (requires build)
- wxcore-0.11.1.2 (lib:wxcore) (requires build)
- wx-0.11.1.2 (lib:wx) (requires build)
Starting     old-locale-1.0.0.7 (lib)
Building     old-locale-1.0.0.7 (lib)
Installing   old-locale-1.0.0.7 (lib)
Completed    old-locale-1.0.0.7 (lib)
Starting     old-time-1.1.0.3 (all, legacy fallback)
Building     old-time-1.1.0.3 (all, legacy fallback)
Installing   old-time-1.1.0.3 (all, legacy fallback)
Completed    old-time-1.1.0.3 (all, legacy fallback)
Starting     wxcore-0.11.1.2 (all, legacy fallback)
cabal: Failed to build wxcore-0.11.1.2 (which is required by wx-0.11.1.2). The
failure occurred during the configure step. The build process terminated with
exit code 2

似乎wx自从containers升级到0.6版本后就不再更新了。这是这种依赖地狱的罪魁祸首。

有谁知道如何解决这个问题?或者 wx 暂时无法使用?我向 wxHaskell 邮件列表发送了消息,但他们没有回复。

Or is wx unusable for now?

是的,它目前没有维护,版本界限或多或少是正确的。 GitHub repository 上的代码比 Hackage 上的代码更新一点,并且可以使用更新的 GHC 版本编译,但在当前版本上仍然失败。

除非您愿意使 wxHaskell 与生态系统保持同步(好吧,或者使用旧的 GHC),否则您最好尝试另一个 UI 库。