You could use sum, but that will eat up a lot of RAM because of the laziness.
EDIT: For the fun of it, I decided to do the same in a slightly more esoteric language, so here's a Prolog version (given that your stack is big enough)
rangesum(0,0).
rangesum(N,X) :- M is N - 1, rangesum(M,Y), X is Y + N.
?- rangesum(1000000000, X), write(X).
Pass GHC the -O2 option to turn on optimizations. You need the strictness analyzer to run so that it can determine that sum is strict, otherwise you get a space leak.
GHC's strictness analyzer will recognize that sum is strict for Integer and optimize the laziness away. It will only cause a space leak when optimizations are turned off.
EDIT: For the fun of it, I decided to do the same in a slightly more esoteric language, so here's a Prolog version (given that your stack is big enough)