无法在反应香蕉中找到AddHandler

时间:2014-05-01 06:48:18

标签: haskell frp reactive-banana

我正在试验its tutorial中反应性香蕉的例子。当我尝试将示例加载到ghci时,我收到了错误。

Could not find module `Reactive.Banana.Frameworks.AddHandler'

使用ghci -v运行它会使输出位于底部。我在ubuntu 14.04 LTS上安装了wx-2.8wxWidgets-0.13.1.3

当我查看我的cabal目录时,AddHandler文件确实不存在:

$ ls lib/reactive-banana-0.8.0.0/ghc-7.6.3/Reactive/Banana/
Combinators.hi  Frameworks.hi  Model.hi  Prim.hi    Types.hi
Experimental    Internal       Prim      Switch.hi

有人可以告诉我出了什么问题,我该如何解决错误?

谢谢,

错误讯息:

~$ ghci teste.hs -v
GHCi, version 7.6.3: http://www.haskell.org/ghc/  :? for help
Glasgow Haskell Compiler, Version 7.6.3, stage 2 booted by GHC version 7.6.3
Using binary package database: /usr/lib/ghc/package.conf.d/package.cache
Using binary package database: /home/ting/.ghc/x86_64-linux-7.6.3/package.conf.d/package.cache
hiding package wxdirect-0.13.1.3 to avoid conflict with later version wxdirect-0.90.1.1
wired-in package ghc-prim mapped to ghc-prim-0.3.0.0-d5221a8c8a269b66ab9a07bdc23317dd
...
wired-in package dph-seq not found.
wired-in package dph-par not found.
Hsc static flags: -static
Loading package ghc-prim ... linking ... done.
*** gcc:
'/usr/bin/gcc' '-fno-stack-protector' '-Wl,--hash-size=31' '-Wl,--reduce-memory-overheads' '-L/usr/lib/ghc/integer-gmp-0.5.0.0' '--print-file-name' 'libgmp.so'
Loading package integer-gmp ... linking ... done.
Loading package base ... linking ... done.
*** Chasing dependencies:
Chasing modules from: 
Stable obj: []
Stable BCO: []
unload: retaining objs []
unload: retaining bcos []
Ready for upsweep []
Upsweep completely successful.
*** Deleting temp files:
Deleting: 
*** Chasing dependencies:
Chasing modules from: *teste.hs

teste.hs:7:8:
    Could not find module `Reactive.Banana.Frameworks.AddHandler'
    Locations searched:
      Reactive/Banana/Frameworks/AddHandler.hs
      Reactive/Banana/Frameworks/AddHandler.lhs
Failed, modules loaded: none.

2 个答案:

答案 0 :(得分:1)

我一直在完成这个教程,写了一篇fixed version of the example:希望帮助。

答案 1 :(得分:1)

删除import Reactive.Banana.Frameworks.AddHandler行。我认为它已被移到其他地方,不需要明确导入。