@@ -26,6 +26,10 @@ charWidth c = do
2626 Just (_, col) <- getCursorPosition
2727 return col
2828
29+-- | Convert a sequence of character/width pairs into a list of
30+-- run-length encoded ranges. This function assumes the pairs come
31+-- sorted by character ordinal value. It does not require that the
32+-- character range is fully covered by the sequence.
2933mkRanges :: [(Char, Int)] -> [WidthTableRange]
3034mkRanges pairs =
3135 let convertedPairs = convert <$> pairs