Hi,
I want to define an OCaml type with constraints.
For example:
type item = Item of int * float;;
If here this float type is for price of some item, and I want to make sure
it is positive. In other words, if x = (xi, xf) of type item,
I want to enforce, xf must >= 0.
Is there a way to define OCaml type like this?
Thanks a lot!
Angela