let ok = function
    Ok v -> v
  | Bad ex -> raise ex