diff options
Diffstat (limited to 'app/Issue.hs')
-rw-r--r-- | app/Issue.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/app/Issue.hs b/app/Issue.hs index d58d14d..2743f45 100644 --- a/app/Issue.hs +++ b/app/Issue.hs @@ -23,7 +23,6 @@ import Data.Text.Encoding qualified as T import Data.Text.IO qualified as T import Data.Time.Clock (UTCTime (utctDay)) import GHC.Generics (Generic) -import GHC.Int (Int64) import GHC.Records (HasField (..)) import Git (Author (..), Commit (..)) import Git qualified as Git @@ -40,8 +39,8 @@ data Issue = Issue title :: T.Text, file :: FilePath, provenance :: Provenance, - startByte :: Int64, - endByte :: Int64, + startByte :: Int, + endByte :: Int, startPoint :: G.Point, endPoint :: G.Point, tags :: [Tag], @@ -100,7 +99,7 @@ instance HasField "id" Issue T.Text where getText :: Issue -> IO T.Text getText (Issue {..}) = - T.decodeUtf8 . LB.toStrict . LB.take (endByte - startByte) . LB.drop startByte + T.decodeUtf8 . LB.toStrict . LB.take (fromIntegral (endByte - startByte)) . LB.drop (fromIntegral startByte) <$> Git.readTextFileOfBS commitHash file replaceText :: Issue -> T.Text -> IO () |