let as_block x = match extract x with Block b -> b | _ -> failwith "as_block"