summaryrefslogtreecommitdiffstats
path: root/tags/src
diff options
context:
space:
mode:
Diffstat (limited to 'tags/src')
-rw-r--r--tags/src/Tag.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/tags/src/Tag.hs b/tags/src/Tag.hs
index f7f3398..882f1de 100644
--- a/tags/src/Tag.hs
+++ b/tags/src/Tag.hs
@@ -51,6 +51,7 @@ module Tag
where
import Control.Applicative ((<|>))
+import Control.DeepSeq (NFData (rnf))
import Data.Aeson qualified as J
import Data.Attoparsec.Text qualified as A
import Data.Binary (Binary)
@@ -66,6 +67,9 @@ import TypedValue (cast, castDef)
data Tag = Tag T.Text (Maybe T.Text)
deriving (Show, Generic, Binary, Eq, Ord)
+instance NFData Tag where
+ rnf (Tag k v) = rnf k `seq` rnf v
+
tag :: T.Text -> Maybe T.Text -> Tag
tag = Tag