【发布时间】:2021-03-31 03:55:30
【问题描述】:
我只是按照文档 blog example advanced 中的 Yesod 示例进行操作,但在执行 stack runghc main.hs 时出现此错误:
main.hs:186:14: error:
Not in scope: type constructor or class ‘Form’
Perhaps you meant one of these:
‘AForm’ (imported from Yesod), ‘MForm’ (imported from Yesod),
‘WForm’ (imported from Yesod)
|
186 | entryForm :: Form Entry
| ^^^^
main.hs:237:27: error:
Not in scope: type constructor or class ‘Form’
Perhaps you meant one of these:
‘AForm’ (imported from Yesod), ‘MForm’ (imported from Yesod),
‘WForm’ (imported from Yesod)
|
237 | commentForm :: EntryId -> Form Comment
|
不确定它的真正含义。是因为使用的 Yesod 版本有些不同吗?我正在使用 Yesod 1.6.0.6。
完整代码是here。
【问题讨论】:
-
你链接的完整代码给了我404页。
-
谢谢@Sibi,我的帐户刚刚被标记,不知道为什么,所以不允许粘贴这么长的文本。不是已经更新了。