Add Semigroup and Monoid instances for Description

This commit is contained in:
2022-12-27 10:37:34 +01:00
parent 3ce6e7da46
commit a96d4e6ef3
5 changed files with 39 additions and 2 deletions

View File

@ -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.