(新手提醒)
鉴于以下错误消息,找到错误源的最快方法是什么:
08/Jul/2016:11:39:01 +0530 [Error#yesod-core] expected EPlain but got Nothing for: DerefBranch (DerefIdent (Ident "show")) (DerefString "abcdef") @(yesod_3MCr4WfhviiELXmo3fAaXL:Yesod.Core.Class.Yesod ./Yesod/Core/Class/Yesod.hs:625:5)
GET /
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8
Status: 500 Internal Server Error 0.054158s
Handler/Home.hs:38:11:
No instance for (Text.Julius.ToJavascript String)
arising from a use of ‘Text.Julius.toJavascript’
In the second argument of ‘(GHC.Base..)’, namely
‘Text.Julius.toJavascript’
In the second argument of ‘(GHC.Base..)’, namely
‘(Text.Julius.unJavascript GHC.Base.. Text.Julius.toJavascript)’
In the expression:
Text.Shakespeare.EPlain
GHC.Base..
(Text.Julius.unJavascript GHC.Base.. Text.Julius.toJavascript)
Build failure, pausing...
我正在使用一个简单的脚手架站点(没有 DB),并且故意弄乱了homepage.julius
. 在这个特定的例子中,我确切地知道错误是什么,但是仅仅通过查看错误消息怎么能知道呢?