Maintaining Units of measure across type converstions
问题 If we define a unit of measure like: [<Measure>] type s and then an integer with a measure let t = 1<s> and then convert it to a float let r = float t we see that r = 1.0 without a measure type. This seems very odd, as all the measure information has been lost. You can use LanguagePrimitives.FloatWithMeasure to convert back to a float with something like let inline floatMeasure (arg:int<'t>) : (float<'t>) = LanguagePrimitives.FloatWithMeasure (float arg) which enforces the right types, but