mkMatchInfo :: ByteString -> ByteString -> [MatchInfo]
mkMatchInfo pat body = let
    patT = decodeUtf8 pat
    bodyT = decodeUtf8 body
    linesWithIndexes = [(i, encodeUtf8 p) | (p, i) <- zip (lines bodyT) [1..], patT `isInfixOf` p]
    colIndex xs = length . fst $ breakSubstring pat xs
    infoItems = [(i, colIndex txt) | (i, txt) <- linesWithIndexes]
  in [MatchInfo l c | (l, c) <- infoItems]
mkMatchInfo :: ByteString -> ByteString -> [MatchInfo]
mkMatchInfo pat body = let
    patT = decodeUtf8 pat
    bodyT = decodeUtf8 body
    linesWithIndexes = [(i, encodeUtf8 p) | (p, i) <- zip (lines bodyT) [1..], patT `isInfixOf` p]
    colIndex xs = length . fst $ breakSubstring pat xs
    infoItems = [(i, colIndex txt) | (i, txt) <- linesWithIndexes]
  in [MatchInfo l c | (l, c) <- infoItems]
mkMatchInfo pat body = let
    patT = decodeUtf8 pat
    bodyT = decodeUtf8 body
    linesWithIndexes = [(i, encodeUtf8 p) | (p, i) <- zip (lines bodyT) [1..], patT `isInfixOf` p]
    colIndex xs = length . fst $ breakSubstring pat xs
    infoItems = [(i, colIndex txt) | (i, txt) <- linesWithIndexes]
  in [MatchInfo l c | (l, c) <- infoItems]