summaryrefslogtreecommitdiff
path: root/src/Language/GraphQL/AST/Document.hs
diff options
context:
space:
mode:
authorEugen Wissner <belka@caraus.de>2022-12-27 10:37:34 +0100
committerEugen Wissner <belka@caraus.de>2022-12-27 10:38:08 +0100
commita96d4e6ef3b1020d239f0061af5861aadeb278fc (patch)
treeae822d7ca7f3eb03a42ef23d000d9ba7da6d0913 /src/Language/GraphQL/AST/Document.hs
parent3ce6e7da461030d7d6f4b356096492c072ce16e2 (diff)
downloadgraphql-a96d4e6ef3b1020d239f0061af5861aadeb278fc.tar.gz
Add Semigroup and Monoid instances for Description
Diffstat (limited to 'src/Language/GraphQL/AST/Document.hs')
-rw-r--r--src/Language/GraphQL/AST/Document.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/Language/GraphQL/AST/Document.hs b/src/Language/GraphQL/AST/Document.hs
index ea640df..131285d 100644
--- a/src/Language/GraphQL/AST/Document.hs
+++ b/src/Language/GraphQL/AST/Document.hs
@@ -464,6 +464,14 @@ data SchemaExtension
newtype Description = Description (Maybe Text)
deriving (Eq, Show)
+instance Semigroup Description
+ where
+ Description lhs <> Description rhs = Description $ lhs <> rhs
+
+instance Monoid Description
+ where
+ mempty = Description mempty
+
-- ** Types
-- | Type definitions describe various user-defined types.