2014-05-01 41 views
1

我正在嘗試在its tutorial中反應香蕉的實例。當我嘗試將示例加載到ghci時,出現錯誤。在反應香蕉中找不到AddHandler

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

運行它與ghci -v給出底部的輸出。我在ubuntu 14.04 LTS上安裝了wx-2.8wxWidgets-0.13.1.3

當我看着我的陰謀目錄,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

該模塊被重命名爲['Control.Event.Handler'](http://hackage.haskell.org/package/reactive-banana-0.8.0.0/docs/Control-Event-Handler.html#v: newAddHandler)在反應香蕉0.8。 Wiki最近更新的例子忽略了這種變化。 – duplode

+0

謝謝,它修復了它。 – tinlyx

回答

1

刪除import Reactive.Banana.Frameworks.AddHandler一行。我認爲它已經轉移到其他地方,並且不需要明確的導入。