我试图在 Windows 上安装响应式香蕉包,但收效甚微。它似乎知道这些软件包,但安装失败。有什么提示吗?
>cabal install Reactive
Resolving dependencies...
...
cabal: Error: some packages failed to install:
category-extras-0.53.5 failed during the building phase. The exception was:
ExitFailure 1
reactive-0.11.5 depends on category-extras-0.53.5 which failed to install.
>cabal install category-extras
Resolving dependencies...
Configuring category-extras-0.53.5...
...
cabal: Error: some packages failed to install:
category-extras-0.53.5 failed during the building phase. The exception was:
ExitFailure 1
>cabal install reactive-banana-wx
Resolving dependencies...
Downloading monads-tf-0.1.0.0...
Warning: monads-tf.cabal: A package using 'cabal-version: >=1.2.3' must use
section syntax. See the Cabal user guide for details.
...
setup.exe: wx-config: does not exist
cabal: Error: some packages failed to install:
reactive-banana-wx-0.3.0.1 depends on wxcore-0.12.1.7 which failed to install.
wx-0.12.1.6 depends on wxcore-0.12.1.7 which failed to install.
wxcore-0.12.1.7 failed during the configure step. The exception was:
ExitFailure 1
etc...
好的,我安装了所有的 wx-stuff - 采取了几个步骤。wx-config,然后是 wxWidgets,然后安装 Haskell 部件(wx、wxcore、reactive-banana.wx)。但是基本的 Reactive 和 category-extras 仍然像上面那样失败。- 99 个附加类别中的第 39 步失败:
[39 of 99] Compiling Control.Monad.Either ( src\Control\Monad\Either.hs, dist\bu
ild\Control\Monad\Either.o )
src\Control\Monad\Either.hs:44:10:
Duplicate instance declarations:
instance Monad (Either e)
-- Defined at src\Control\Monad\Either.hs:44:10-25
instance Monad (Either e) -- Defined in Control.Monad.Instances
src\Control\Monad\Either.hs:49:10:
Duplicate instance declarations:
instance Applicative (Either e)
-- Defined at src\Control\Monad\Either.hs:49:10-31
instance Applicative (Either e) -- Defined in Control.Applicative
src\Control\Monad\Either.hs:53:10:
Duplicate instance declarations:
instance MonadFix (Either e)
-- Defined at src\Control\Monad\Either.hs:53:10-28
instance MonadFix (Either e) -- Defined in Control.Monad.Fix
cabal: Error: some packages failed to install:
category-extras-0.53.5 failed during the building phase. The exception was:
ExitFailure 1
更新:
我发现 Haskell 的 Wx 宇宙有点乱。有很多关于这个的注释和关于windows上wx和wxHaskell问题的描述,在一些建议中需要旧版本的GHC等。代码与当前的MSoft编译器不兼容,所以需要安装其他编译器等等。总而言之在戳了几个小时后,我感到相当失望。我确实安装了 wx-config、wxPack、wxWidgets,然后是 wxHaskell,然后是 cabal wx & wxcore; 所有报告成功 - 仍然失败(未找到 wxmsw28_gcc.dll;虽然它在库中)。他们的初始测试(样本/对照......)失败了。wxWidgets 和 wxHaskell 页面上的所有示例链接以及更多链接都已损坏。重新启动后(?!)它似乎确实运行了一些测试 - 所以我现在希望成功。
我希望有一种神奇的“apt-get install”之类的体验。
对于 FRP——FRP 示例(在 leksah 中)给出了很多:“Link destinations not found for...”错误消息,但到目前为止确实可以运行。
总而言之,根据我的经验,wxHaskell 和 FRP 在 Windows 上似乎不太容易使用。当然,我不会分配给一个班级来尝试作为 Haskell 易用性和实用性的一个很好的例子!:-)
我很欣赏这些软件包中涉及的所有复杂性和工作,我无意抱怨——只是一份经验报告。也许 wxHaskell 包不常用,或者..??