【问题标题】:using yesod without Shakespeare在没有莎士比亚的情况下使用 yesod
【发布时间】:2015-08-13 12:22:38
【问题描述】:

This 帖子展示了如何直接将 yesod 与 blaze-html 一起使用,但在此帖子之后 ghc 抱怨说:

No instance for (ToWidget App (t0 -> H.Html))
  arising from a use of ‘toWidget’
In the expression: toWidget
In a stmt of a 'do' block: toWidget $ \ render -> do { H.p "" }
In the second argument of ‘($)’, namely
  ‘do { toWidget $ \ render -> do { ... } }’

我检查了所需 yesod.pure 模块的来源,但发现 Towidget 没有这样的实例..

【问题讨论】:

    标签: haskell yesod blaze-html


    【解决方案1】:

    你是否包含了包yesod-core和模块Yesod.Core

    这就是定义ToWidget 类的地方。

    我使用Hayoo 来查找ToWidget 的定义位置。

    【讨论】:

      猜你喜欢
      • 2014-06-12
      • 2016-06-20
      • 1970-01-01
      • 2017-09-28
      • 2020-11-04
      • 1970-01-01
      • 2013-02-09
      • 2016-08-02
      • 2011-10-06
      相关资源
      最近更新 更多