let ( let* ) o f = Result.fold ~ok:f ~error:Result.error o type extended_status = [ Dream.status | `See_Other_Redirect of (string * string) list ] let ( let** ) o f = match o with | Error (kind, msg) -> begin match kind with | `See_Other_Redirect headers -> Dream.respond ~status:`See_Other ~headers msg | #Dream.status as status -> Template.err (status, msg) end | Ok v -> f v