It's impossible. Your tail call is really
(genRange origin) >>= (\edge -> .....)
and hence it is not recursive.
----------- Edit for updated question -----------------
Generally, if you have something like
do
a <- foo
bar
you can't make something tail recursive out of it. This is because this gets desugared to
foo >>= (\a -> bar)
so (>>=) (or (>>)) is the tail call.