想尝试Reflex-Dom,但是在构建堆栈时从jsaddle包中得到一个错误。很想知道如何解决此问题的一些技巧。
/private/var/folders/m2/qwhdrn_d46z99_3vxchdwn7r0000gn/T/stack6036/jsaddle-0.9.5.0/src/Language/Javascript/JSaddle/Types.hs:190:5-34: error:
• No instance for (Control.Monad.Fail.MonadFail JSM)
arising from a do statement
with the failable pattern ‘SyncResult’
• In a stmt of a 'do' block: SyncResult <- sendCommand Sync
In the expression:
do SyncResult <- sendCommand Sync
return ()
In an equation for ‘syncPoint’:
syncPoint
= do SyncResult <- sendCommand Sync
return ()
|
190 | SyncResult <- sendCommand Sync
|
Cabal配置:
executable reflexdom
main-is: Main.hs
other-modules:
Paths_ReflexDom
hs-source-dirs:
app
ghc-options: -threaded -rtsopts -with-rtsopts=-N
build-depends:
ReflexDom
, base >=4.7 && <5
, reflex-dom >= 0.4
, reflex >= 0.5
allow-newer: true
default-language: Haskell2010
stack.yaml部门:
extra-deps:
- reflex-0.5
- reflex-dom-0.4
- jsaddle-wkwebview-0.9.4.0
- ref-tf-0.4.0.1
- reflex-dom-core-0.4
- ghcjs-dom-0.9.2.0
- zenc-0.1.1
- ghcjs-dom-jsaddle-0.9.2.0
- jsaddle-dom-0.9.2.0
- jsaddle-0.9.5.0
允许更新:true
答案 0 :(得分:0)
您使用的GHC版本太新,请使用arc
或更低的版本。