我想测试用户是否经过身份验证并根据状态显示“登录”或“注销”链接。
到目前为止我有
$maybe muid <- maybeAuthId
<a href=@{AuthR LogoutR} >Logout
$nothing
<a href=@{AuthR LoginR} >Login
但我收到一个错误:
Couldn't match expected type `Maybe v0'
with actual type `GHandler s0 m0 (Maybe (AuthId m0))'
In the first argument of `Text.Hamlet.maybeH', namely `maybeAuthId'