comparison lib/ur/top.ur @ 1110:7fc4e0087e50

Proper 404 generation
author Adam Chlipala <adamc@hcoop.net>
date Sat, 02 Jan 2010 13:31:59 -0500
parents 8d3aa6c7cee0
children ad15700272f6
comparison
equal deleted inserted replaced
1109:631a3597c065 1110:7fc4e0087e50
244 (fn fs acc => 244 (fn fs acc =>
245 r <- f fs; 245 r <- f fs;
246 return <xml>{acc}{r}</xml>) 246 return <xml>{acc}{r}</xml>)
247 <xml/> 247 <xml/>
248 248
249 fun queryX1' [nm ::: Name] [fs ::: {Type}] [ctx ::: {Unit}] [inp ::: {Type}]
250 (q : sql_query [nm = fs] [])
251 (f : $fs -> transaction (xml ctx inp [])) =
252 query q
253 (fn fs acc =>
254 r <- f fs.nm;
255 return <xml>{acc}{r}</xml>)
256 <xml/>
257
258 fun queryXE' [exps ::: {Type}] [ctx ::: {Unit}] [inp ::: {Type}]
259 (q : sql_query [] exps)
260 (f : $exps -> transaction (xml ctx inp [])) =
261 query q
262 (fn fs acc =>
263 r <- f fs;
264 return <xml>{acc}{r}</xml>)
265 <xml/>
266
249 fun hasRows [tables ::: {{Type}}] [exps ::: {Type}] 267 fun hasRows [tables ::: {{Type}}] [exps ::: {Type}]
250 [tables ~ exps] 268 [tables ~ exps]
251 (q : sql_query tables exps) = 269 (q : sql_query tables exps) =
252 query q 270 query q
253 (fn _ _ => return True) 271 (fn _ _ => return True)