From f83b424bf70b7b14b0268aeeafe1b3483fced49f Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Thu, 21 Mar 2024 05:35:00 +0100 Subject: chore: Git -> Backend --- app/Comment.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'app/Comment.hs') 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) -- cgit v1.2.3