ocaml-re icon indicating copy to clipboard operation
ocaml-re copied to clipboard

`compl` deemed dangerous

Open Chris00 opened this issue 10 years ago • 3 comments

The interface says

val compl : t list -> t
(** Complement of union *)

but compl cannot be applied to any list of regexpes... and, more problematically, it fails at runtime! I think that this ought to be fixed—maybe adding some phantom type to t or changing compl arguments.

Chris00 avatar Jun 17 '15 17:06 Chris00

A phantom type is probably out of the question (for compat reasons). I'm not sure what other kind of changes could be applied.

Drup avatar Jul 08 '15 21:07 Drup

@Drup Why is it out of question? You couldn't maintain compat. with aliases?

Also, providing a new, safe API sounds plausible as well (we've deprecated other stuff before)

rgrinberg avatar Dec 26 '15 21:12 rgrinberg

@rgrinberg I will believe it when I see it, but I don't think it would work very well. Also, I doubt it would be such a good solution. I would prefer to extend the handling of compl to other constructs, but it's much more difficult.

Drup avatar Dec 26 '15 23:12 Drup