combineSrcSpans treats its first argument as the 'start' and second as the 'end', leading to strange behavior like combining (1,1-2) and (1,1) to get (1,1):
>>> x = SpanCoLinear {span_filename = "", span_row = 1, span_start_column = 1, span_end_column = 2}
>>> y = SpanPoint {span_filename = "", span_row = 1, span_column = 1}
>>> combineSrcSpans x y -- evals to (SpanPoint {span_filename = "", span_row = 1, span_column = 1})
Either the documentation needs to reflect this assumption (it currently incorrectly says "Combines two SrcSpan into one that spans at least all the characters within both spans.") or the implementation needs to be fixed. (I'd be happy to fix it myself if you say which of those two fixes to do.)
combineSrcSpans treats its first argument as the 'start' and second as the 'end', leading to strange behavior like combining (1,1-2) and (1,1) to get (1,1):
Either the documentation needs to reflect this assumption (it currently incorrectly says "Combines two SrcSpan into one that spans at least all the characters within both spans.") or the implementation needs to be fixed. (I'd be happy to fix it myself if you say which of those two fixes to do.)