diff options
author | Alexander Foremny <aforemny@posteo.de> | 2024-03-21 05:35:00 +0100 |
---|---|---|
committer | Alexander Foremny <aforemny@posteo.de> | 2024-03-25 07:45:59 +0100 |
commit | f83b424bf70b7b14b0268aeeafe1b3483fced49f (patch) | |
tree | 348a60e815f4bee492f58dea903ebc380029d61f /app/Comment.hs | |
parent | fc0afaaa273f5b5d3696df87d70d5347a13bb9ac (diff) |
chore: Git -> Backend
Diffstat (limited to 'app/Comment.hs')
-rw-r--r-- | app/Comment.hs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/app/Comment.hs b/app/Comment.hs index febd47e..7c76561 100644 --- a/app/Comment.hs +++ b/app/Comment.hs @@ -9,6 +9,7 @@ module Comment ) where +import Backend qualified import Comment.Language qualified as L import Control.Applicative (liftA2) import Control.Exception (catch) @@ -26,7 +27,6 @@ import Foreign.Marshal.Alloc (alloca, free) import Foreign.Marshal.Array (peekArray) import Foreign.Storable import GHC.Generics (Generic) -import Git qualified import System.FilePath (takeExtension) import TreeSitter qualified as S @@ -47,13 +47,13 @@ data Point = Point } deriving (Eq, Show, Generic, Binary) -getComments :: Git.CommitHash -> FilePath -> IO [Comment] +getComments :: Backend.CommitHash -> FilePath -> IO [Comment] getComments commitHash filePath = fmap mergeLineComments . extractComments filePath language . LB.toStrict =<< catch - (Git.readTextFileOfBS commitHash filePath) + (Backend.readTextFileOfBS commitHash filePath) (\(_ :: E.CannotReadFile) -> pure "") where language = L.fromPath (takeExtension filePath) |