如何从approot(网站网址)获取字符串?

时间:2015-07-12 07:16:34

标签: haskell yesod

我看了虽然是的教程和源代码,但却找不到办法做这样的事情......我必须使用模式匹配吗?

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)

1 个答案:

答案 0 :(得分:1)

您是要从getUrlRenderYesod.Core.Handler renderRoute寻找Yesod.Core吗?