[web-devel] [Yesod] getBy404.

いとうかつとし cutsea110 at gmail.com
Mon Dec 20 11:25:12 CET 2010

I'd like to support getBy404 as like as get404 on yesod framework.

getBy404 ukey = do
  mres <- getBy ukey
  case mres of
    Nothing -> lift notFound
    Just res -> return res

for example, on wiki site, the resource url include wikiname as key(String)
not id (Int).
In this situation, getBy404 are frequently encountered.

How about this?
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/web-devel/attachments/20101220/25946963/attachment.htm>

More information about the web-devel mailing list