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/History/Scramble.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'app/History/Scramble.hs') diff --git a/app/History/Scramble.hs b/app/History/Scramble.hs index 9004dbf..39a1ac7 100644 --- a/app/History/Scramble.hs +++ b/app/History/Scramble.hs @@ -5,6 +5,7 @@ module History.Scramble ) where +import Backend qualified import CMark qualified as D import Comment qualified as G import Control.Exception (Handler (..), catches) @@ -17,7 +18,6 @@ import Data.Text.Lazy qualified as LT import Data.Text.Lazy.Encoding qualified as LT import Exception qualified as E import GHC.Generics (Generic) -import Git qualified import Issue qualified as I import Issue.Parser qualified as I import Issue.Tag qualified as I @@ -28,14 +28,14 @@ import Render qualified as P -- | `Scramble` records the complete issues ONLY in files that have -- been changed in the commit. data Scramble = Scramble - { commitHash :: Git.CommitHash, + { commitHash :: Backend.CommitHash, filesChanged :: [FilePath], issues :: M.Map T.Text I.Issue } deriving (Show, Binary, Generic) -- | Get all issues in the given directory and file. -getIssuesOfFile :: Git.CommitHash -> FilePath -> IO [I.Issue] +getIssuesOfFile :: Backend.CommitHash -> FilePath -> IO [I.Issue] getIssuesOfFile commitHash filename = ( fmap catMaybes . parMapM (fromComment commitHash) =<< G.getComments commitHash filename @@ -45,9 +45,9 @@ getIssuesOfFile commitHash filename = ] -- | Note that `provenance` is trivial and needs to be fixed up later. -fromComment :: Git.CommitHash -> G.Comment -> IO (Maybe I.Issue) +fromComment :: Backend.CommitHash -> G.Comment -> IO (Maybe I.Issue) fromComment commitHash comment = do - commit <- Git.getCommitOf commitHash + commit <- Backend.getCommitOf commitHash let provenance = I.Provenance commit commit pure $ -- cgit v1.2.3