diff options
author | Simon Hengel <sol@typeful.net> | 2014-11-02 09:30:38 +0800 |
---|---|---|
committer | Simon Hengel <sol@typeful.net> | 2014-11-03 09:26:11 +0800 |
commit | 1c5f4fe3c4e3ef73481855a51af73d8995450e30 (patch) | |
tree | ad4b6f788a6cae9c9637bfd37a8d1a0fb7ecbbce | |
parent | 2f6362ed4b6c16bdd5d01be19876507eeaf918bd (diff) |
Derive more instances
-rw-r--r-- | haddock-library/src/Documentation/Haddock/Types.hs | 9 |
1 files changed, 1 insertions, 8 deletions
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 |