matchOnceFrom :: Regex -> Int -> Rope -> Maybe (Int, Int)
matchOnceFrom regex i rope =
    let r = snd $ R.splitAt i rope
    in  setOffset `fmap` (!0) `fmap` (matchOnce regex r)
  where
    setOffset (offset, len) = (i + offset, len)
matchOnceFrom :: Regex -> Int -> Rope -> Maybe (Int, Int)
matchOnceFrom regex i rope =
    let r = snd $ R.splitAt i rope
    in  setOffset `fmap` (!0) `fmap` (matchOnce regex r)
  where
    setOffset (offset, len) = (i + offset, len)
matchOnceFrom regex i rope =
    let r = snd $ R.splitAt i rope
    in  setOffset `fmap` (!0) `fmap` (matchOnce regex r)
  where
    setOffset (offset, len) = (i + offset, len)