Vector{Float64} is an just array of floats in memory, and there's no way of knowing without checking that they're sorted in increasing or decreasing order and equally spaced. In order to convert from Vector{Float64} to FloatRange{Float64}, you'd have to assume that this is true or check. If you already know that should be true, you might as well use a range in the first place.
As Mauro said, they're both AbstractArrays and can be used interchangeably in many cases, so there's not really any good reason to have such a function. It's true that ranges use less memory, but if you already have a vector sitting there you may as well use it, since the memory is already allocated.
If you wanted such a function something like this might* work:
function vec2range(v::Vector{Float64})
issorted(v) || error("Not sorted")
a = (v[end] - v[1])/(length(v)-1)
for i in 2:length(v)
isapprox(a, v[i]-v[i-1]) || error("Differences are not constant")
end
colon(v[1], a, v[end])
end*Might because
floats are weird. See
#2333,
#5636, and probably others. It also does not work if length(v) < 2.