Re: [containers-users] Possible additions to Containers and Friends

2018-03-06 Thread SP
Speaking-too-soon is a valid and powerful code verification technique; it exploits tempting the bugs to make their move. -- SP ___ Containers-users mailing list Containers-users@lists.ocaml.org http://lists.ocaml.org/listinfo/containers-users

Re: [containers-users] Possible additions to Containers and Friends

2018-03-06 Thread Simon Cruanes
Of course I spoke too soon, and missed so validation cases (that would have been accepted by Peter's code). In particular, I just learnt about some interesting corner cases of UTF8, namely overlong encodings. If anyone is knowledgeable about UTF8, reviewing the code would be greatly appreciated!

Re: [containers-users] Possible additions to Containers and Friends

2018-03-06 Thread Simon Cruanes
I merged and adapted the code from Peter: https://github.com/c-cube/ocaml-containers/blob/master/src/core/CCUtf8_string.mli https://github.com/c-cube/ocaml-containers/blob/master/src/core/CCUtf8_string.ml it's stricter (only accepts valid UTF8) and the random tests should ensure that it agrees