document-build-0.2.0.0: src/Document/Build/Name/GitCommitTime.hs
{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE MultiParamTypeClasses #-}
{-# LANGUAGE TypeOperators #-}
{-# OPTIONS_GHC -Wall #-}
{- | The name @gitCommitTime@, targeting 'UTCTime': the time a commit was committed.
Any value of the target type has the name, as the identity.
@since 0.2.0.0
-}
module Document.Build.Name.GitCommitTime (
GitCommitTimeLike (..),
) where
import Control.Lens (Optic)
import Data.Time (UTCTime)
{- | A field or a constructor named @gitCommitTime@.
@since 0.2.0.0
-}
class GitCommitTimeLike p f x x' where
gitCommitTime ::
Optic p f x x' UTCTime UTCTime
{- | Identity
@since 0.2.0.0
-}
instance (x' ~ UTCTime) => GitCommitTimeLike p f UTCTime x' where
gitCommitTime =
id
{-# INLINE gitCommitTime #-}