我试图在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宇宙有点混乱。有很多关于此的说明以及wx&的问题描述。 wxHaskell在windows上,在一些建议中要求旧版本的GHC等。代码与当前的MSoft编译器不兼容,因此需要其他编译器安装等等。总而言之,在我看了几个小时之后,对我来说相当令人失望。我确实安装了wx-config,wxPack,wxWidgets,然后是wxHaskell,然后是cabal wx& wxcore;所有报告的成功 - 仍然失败(找不到wxmsw28_gcc.dll;虽然它在库中)。他们的初始测试(样品/控制......)失败了。在wxWidgets和wxHaskell页面上打破了所有示例链接以及更多示例链接。重新启动后(?!)它似乎确实运行了一些测试 - 所以我希望现在能够取得成功。
我希望有一种神奇的“apt-get install”体验。
对于FRP - FRP示例(在leksah中)提供了许多:“找不到...的链接目的地”错误消息,但到目前为止已经运行。
总而言之,根据我的经验,似乎wxHaskell和FRP在Windows上似乎不太容易使用。当然不是我要分配给一个类来尝试作为Haskell的简单和实用的一个很好的例子! : - )
我很欣赏这些软件包中涉及的所有复杂性和工作,并不是要抱怨 - 只是一份体验报告。也许wxHaskell包不常用,或者...... ??
答案 0 :(得分:6)
请注意,您必须在“reactive-banana”中加入“banana”。 : - )
cabal install reactive-banana
cabal install reactive-banana-wx
换句话说,Reactive
不是您要查找的包,reactive-banana
是。 (Reactive
包是Conal Elliott的一个较老的实验,其目标相似,但它有一些系统性错误,现在已经有点不适了。)
答案 1 :(得分:1)
看起来有一个wx-config here的Windows端口。如果它不在wx-core中,我会感到惊讶。你安装了WX c库吗?需要它 - Haskell包只是绑定到C库。