I have found some issues about error FS0670 (This code is not sufficiently generic. ...) inside StackOverflow, but none of the proposed solution works fine with my issue (I'm a beginner, perhaps I miss in some concepts of F#).
I have the following generic structure that I would like to works only with primitive types only (i.e. int16/32/64 and single/float/decimal).
[<Struct>]
type Vector2D<'T when 'T : struct and 'T:(static member get_One: unit -> 'T) and 'T:(static member get_Zero: unit -> 'T) > =
val x : 'T
val y : 'T
new( xp: 'T, yp: 'T ) = { x = xp; y = yp }
But with the new constructor, I get the mentioned error FS0670.
Does somebody knows a possible solution? Many thanks in advance.