diff options
Diffstat (limited to 'app/Issue/Tag.hs')
-rw-r--r-- | app/Issue/Tag.hs | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/app/Issue/Tag.hs b/app/Issue/Tag.hs index 8b6d6d4..85636b5 100644 --- a/app/Issue/Tag.hs +++ b/app/Issue/Tag.hs @@ -1,4 +1,11 @@ -module Issue.Tag (Tag (..), extractTags, internalTags) where +module Issue.Tag + ( Tag (..), + extractTags, + internalTags, + tagKey, + tagValue, + ) +where import Data.Binary (Binary) import Data.Maybe (catMaybes) @@ -10,6 +17,12 @@ import Issue.Provenance (Provenance (..)) data Tag = Tag Text (Maybe Text) deriving (Show, Generic, Binary) +tagKey :: Tag -> Text +tagKey (Tag k _) = k + +tagValue :: Tag -> Maybe Text +tagValue (Tag _ v) = v + extractTags :: Text -> [Tag] extractTags = catMaybes |