我在Stack中构建了我的网站,实际上我正在尝试添加更多页面(另一个问题是另一天),所以今天我打开了代码并且:
[13 of 14] Compiling Handler.Vendita ( src/Handler/Vendita.hs, .stack-work/dist/x86_64-freebsd/Cabal-2.0.1.0/build/Handler/Vendita.o )
/usr/home/giulio/Lavori/karmen/src/Handler/Vendita.hs:20:4: error:
* Couldn't match type `WidgetT site0 m0' with `HandlerT App IO'
Expected type: HandlerT App IO Html
Actual type: WidgetT site0 m0 ()
* In a stmt of a 'do' block:
(asWidgetT GHC.Base.. toWidget)
((blaze-markup-0.8.2.0:Text.Blaze.Internal.preEscapedText
GHC.Base.. Data.Text.pack)
"<main><h1>Canonical</h1>
</main>
")
In a stmt of a 'do' block:
(do (asWidgetT GHC.Base.. toWidget)
((blaze-markup-0.8.2.0:Text.Blaze.Internal.preEscapedText
GHC.Base.. Data.Text.pack)
"<main><h1>Canonical</h1>
</main>
"))
In the expression:
do setTitle "Vendita"
(do (asWidgetT GHC.Base.. toWidget)
((blaze-markup-0.8.2.0:Text.Blaze.Internal.preEscapedText
GHC.Base.. Data.Text.pack)
"<main><h1>Canonical</h1>
</main>
"))
|
20 | $(widgetFile "vendita")
| ^^^^^^^^^^^^^^^^^^^^
-- While building custom Setup.hs for package karmen-0.0.0 using:
/usr/home/giulio/.stack/setup-exe-cache/x86_64-freebsd/Cabal-simple_mPHDZzAJ_2.0.1.0_ghc-8.2.2 --builddir=.stack-work/dist/x86_64-freebsd/Cabal-2.0.1.0 build lib:karmen --ghc-options " -ddump-hi -ddump-to-file"
代码正常删除所有页面,并将窗口小部件文件从此更改为主页窗口小部件无法解决问题。 复制getHomeR代码也会导致错误。 我还尝试添加和删除isAuthenticated部分以导致不同的错误。