let as_string x = match extract x with String s -> s | _ -> failwith "as_string"