mirror of
https://github.com/aelve/guide.git
synced 2024-11-23 21:13:07 +03:00
Add Show instances to all types
This commit is contained in:
parent
b29b3b2c7f
commit
8013ebbfb1
@ -134,6 +134,12 @@ instance Eq MarkdownInline where
|
||||
instance Eq MarkdownBlock where
|
||||
(==) = (==) `on` markdownBlockText
|
||||
|
||||
instance Show MarkdownInline where
|
||||
show = show . markdownInlineText
|
||||
|
||||
instance Show MarkdownBlock where
|
||||
show = show . markdownBlockText
|
||||
|
||||
instance ToHtml MarkdownInline where
|
||||
toHtml = builderToHtml . markdownInlineHtml
|
||||
toHtmlRaw = builderToHtml . markdownInlineHtml
|
||||
|
@ -140,7 +140,7 @@ import Markdown
|
||||
data Trait = Trait {
|
||||
_traitUid :: Uid Trait,
|
||||
_traitContent :: MarkdownInline }
|
||||
deriving (Eq)
|
||||
deriving (Eq, Show)
|
||||
|
||||
-- See Note [acid-state]
|
||||
deriveSafeCopy 1 'extension ''Trait
|
||||
@ -192,7 +192,7 @@ data Item = Item {
|
||||
_itemNotes :: MarkdownBlock,
|
||||
_itemLink :: Maybe Url,
|
||||
_itemKind :: ItemKind }
|
||||
deriving (Eq)
|
||||
deriving (Eq, Show)
|
||||
|
||||
deriveSafeCopy 7 'extension ''Item
|
||||
makeFields ''Item
|
||||
@ -303,7 +303,7 @@ data Category = Category {
|
||||
_categoryGroups :: Map Text Hue,
|
||||
_categoryItems :: [Item],
|
||||
_categoryItemsDeleted :: [Item] }
|
||||
deriving (Eq)
|
||||
deriving (Eq, Show)
|
||||
|
||||
deriveSafeCopy 3 'extension ''Category
|
||||
makeFields ''Category
|
||||
@ -553,6 +553,7 @@ data GlobalState = GlobalState {
|
||||
_categoriesDeleted :: [Category],
|
||||
_pendingEdits :: [(Edit, EditDetails)],
|
||||
_editIdCounter :: Int } -- ID of next edit that will be made
|
||||
deriving (Show)
|
||||
|
||||
deriveSafeCopy 2 'extension ''GlobalState
|
||||
makeLenses ''GlobalState
|
||||
|
Loading…
Reference in New Issue
Block a user