我看了虽然是的教程和源代码,但却找不到办法做这样的事情......我必须使用模式匹配吗?
https://hackage.haskell.org/package/yesod-core-1.2.2/docs/Yesod-Core.html
源:
-- | How to determine the root of the application for constructing URLs. -- -- Note that future versions of Yesod may add new constructors without bumping -- the major version number. As a result, you should /not/ pattern match on -- @Approot@ values. data Approot master = ApprootRelative -- ^ No application root. | ApprootStatic !Text | ApprootMaster !(master -> Text) | ApprootRequest !(master -> W.Request -> Text)
答案 0 :(得分:1)
您是要从getUrlRender
或Yesod.Core.Handler
renderRoute
寻找Yesod.Core
吗?