There are several things here:
You need to define area as being a square length with
type area = radius * radius
. Otherwise the compiler has no way to match your input and output units.Pi, when used like this, is dimensionless, which is represented in F# as
<1>
or just no unit suffix.
[<Measure>] type radius[<Measure>] type area = radius * radiuslet convertRadiusToArea (r:float<radius>) : float<area> = let pi = System.Math.PI r * r * pi