<div>I&#39;d like to support getBy404 as like as get404 on yesod framework.</div><div><br></div><div>getBy404 ukey = do</div><div>  mres &lt;- getBy ukey</div><div>  case mres of</div><div>    Nothing -&gt; lift notFound</div>
<div>    Just res -&gt; return res</div><div><br></div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div>for example, on wiki site, the resource url include wikiname as key(String) not id (Int).</div>
</div><div>In this situation, getBy404 are frequently encountered.</div><div><meta http-equiv="content-type" content="text/html; charset=utf-8"><div><div><br></div><div>How about this?</div></div></div><div><br></div>