diff options
Diffstat (limited to 'src/Job')
-rw-r--r-- | src/Job/Types.hs | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Job/Types.hs b/src/Job/Types.hs index 0f91b94..0447615 100644 --- a/src/Job/Types.hs +++ b/src/Job/Types.hs @@ -68,3 +68,12 @@ data JobIdPart | JobIdCommit CommitId | JobIdTree TreeId deriving (Eq, Ord) + +newtype JobRef = JobRef [ Text ] + deriving (Eq, Ord) + +textJobIdPart :: JobIdPart -> Text +textJobIdPart = \case + JobIdName name -> textJobName name + JobIdCommit cid -> textCommitId cid + JobIdTree tid -> textTreeId tid |