| 1 |
module Test.Tasty.Discover.TastyInfo |
| 2 |
( TastyInfo(..) |
| 3 |
) where |
| 4 |
|
| 5 |
import Data.Monoid |
| 6 |
import GHC.Generics (Generic) |
| 7 |
|
| 8 |
data TastyInfo = TastyInfo |
| 9 |
{ name :: Last String |
| 10 |
, description :: Last String |
| 11 |
} deriving stock (Eq, Show, Generic) |
| 12 |
|
| 13 |
instance Semigroup TastyInfo where |
| 14 |
a <> b = TastyInfo |
| 15 |
{ name = name a <> name b |
| 16 |
, description = description a <> description b |
| 17 |
} |
| 18 |
|
| 19 |
instance Monoid TastyInfo where |
| 20 |
mempty = TastyInfo |
| 21 |
{ name = Last Nothing |
| 22 |
, description = Last Nothing |
| 23 |
} |