gut*_*rie 2 haskell frp reactive-programming
我试图在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...
Run Code Online (Sandbox Code Playgroud)
好的,我安装了所有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
Run Code Online (Sandbox Code Playgroud)
更新:
我发现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包不常用,或者.. ??
请注意,您必须在"reactive-banana"中包含"banana".:-)
cabal install reactive-banana
cabal install reactive-banana-wx
Run Code Online (Sandbox Code Playgroud)
换句话说,Reactive不是你要找的包,reactive-banana是.(该Reactive软件包是Conal Elliott的一个较老的实验,具有类似的目标,但是它有一些系统性的错误,现在已经有点过头了.)