Off topic because I don’t think non-empty string was what you were after literally, but with v11 and unboxed variants, you can easily model a non empty string in the type system:
@unboxed type str = | @as("") EmptyString | String(string)
let print = s =>
switch s {
| EmptyString => "empty!"
| String(str) => str
}
Console.log(("" :> str)->print)
Console.log(("Hello" :> str)->print)
This doesn’t make much sense of course because you could just as easily match on an empty string directly, but still a fun little effect from untagged variants.