builtins: added 'ErrorFn' property to range() so it generates the result type

Generally, any template function that varies only by return type should
have its return type generated. This should be done at some point.