RosettaCodeData/Task/Copy-a-string/OCaml/copy-a-string-3.ocaml

5 lines
227 B
Plaintext

(* Transition-period synonymy between types, explicit type annotations are just for emphasis *)
let dst1 : string = Bytes.copy (src : bytes)
let dst2 : bytes = Bytes.copy (src : string)
(* fails to compile with -safe-string *)