From 1c5f4fe3c4e3ef73481855a51af73d8995450e30 Mon Sep 17 00:00:00 2001 From: Simon Hengel Date: Sun, 2 Nov 2014 09:30:38 +0800 Subject: Derive more instances --- haddock-library/src/Documentation/Haddock/Types.hs | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) (limited to 'haddock-library/src') diff --git a/haddock-library/src/Documentation/Haddock/Types.hs b/haddock-library/src/Documentation/Haddock/Types.hs index 9a64fb69..b2d28be9 100644 --- a/haddock-library/src/Documentation/Haddock/Types.hs +++ b/haddock-library/src/Documentation/Haddock/Types.hs @@ -17,18 +17,11 @@ module Documentation.Haddock.Types where import Data.Foldable import Data.Traversable -instance Foldable Header where - foldMap f (Header _ a) = f a - -instance Traversable Header where - traverse f (Header l a) = Header l `fmap` f a - data Hyperlink = Hyperlink { hyperlinkUrl :: String , hyperlinkLabel :: Maybe String } deriving (Eq, Show) - data Picture = Picture { pictureUri :: String , pictureTitle :: Maybe String @@ -37,7 +30,7 @@ data Picture = Picture data Header id = Header { headerLevel :: Int , headerTitle :: id - } deriving (Eq, Show, Functor) + } deriving (Eq, Show, Functor, Foldable, Traversable) data Example = Example { exampleExpression :: String -- cgit v1.2.3