From 457cc50cf9cbf8906695758acadee4bf39a4eed8 Mon Sep 17 00:00:00 2001 From: Alexander Foremny Date: Tue, 28 Nov 2023 12:44:16 +0100 Subject: change provenance's hash form `Text` to `CommitHash` --- app/Issue/Provenance.hs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/Issue/Provenance.hs') diff --git a/app/Issue/Provenance.hs b/app/Issue/Provenance.hs index b5fd396..addb6fe 100644 --- a/app/Issue/Provenance.hs +++ b/app/Issue/Provenance.hs @@ -20,6 +20,8 @@ import Data.Time.Calendar (Day (..), toModifiedJulianDay) import Data.Time.Clock (DiffTime, UTCTime (..), picosecondsToDiffTime) import Exception qualified as E import GHC.Generics (Generic) +import History.CommitHash (CommitHash) +import History.CommitHash qualified as C import Process (sh) import System.Process.Typed (setWorkingDir) import Prelude hiding (lines) @@ -31,9 +33,7 @@ data Provenance = Provenance deriving (Show, Generic, Binary, Eq) data Commit = Commit - { -- TODO `T.Text` -> `CommitHash` - -- @difficulty easy - hash :: T.Text, + { hash :: CommitHash, date :: UTCTime, author :: Author } @@ -73,7 +73,7 @@ commitFromHEAD cwd = do let date = read (unpack rawDate) in pure Commit - { hash = hash, + { hash = C.Commit hash, date = date, author = Author authorName authorEmail } -- cgit v1.2.3