for example if I want literal type for Nullable(x) like a
let x = 6x // nullable literal type
So is it real to make own literal types ?
yes, you can
Integer literals with the suffixes Q, R, Z, I, N, G are used for user-defined and library-defined types through the following syntactic translation: xxxx<suffix>
For example, defining a module NumericLiteralZ as below permits the use of the literal form 32Z to generate a sequence of 32 'Z' characters. No literal syntax is available for numbers outside the range of 32-bit integers.
module NumericLiteralZ = let FromZero() = "" let FromOne() = "Z" let FromInt32 n = String.replicate n "Z" // nullables open System module NumericLiteralN = let FromZero() = Nullable(0) let FromOne() = Nullable(1) let FromInt32(i : int) = Nullable(i) printfn "%A" 0N printfn "%A" 1N printfn "%A" 100N.HasValue