let sub_exn t ~index ~length = match sub t ~index ~length with | Some s -> s | None -> ksprintf failwith "sub_exn(%d,%d)" index length