diff options
| author | Eugen Wissner <belka@caraus.de> | 2022-12-27 10:37:34 +0100 |
|---|---|---|
| committer | Eugen Wissner <belka@caraus.de> | 2022-12-27 10:38:08 +0100 |
| commit | a96d4e6ef3b1020d239f0061af5861aadeb278fc (patch) | |
| tree | ae822d7ca7f3eb03a42ef23d000d9ba7da6d0913 /src/Language/GraphQL/AST/Document.hs | |
| parent | 3ce6e7da461030d7d6f4b356096492c072ce16e2 (diff) | |
| download | graphql-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.hs | 8 |
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. |
