aboutsummaryrefslogtreecommitdiff
path: root/haddock-library
diff options
context:
space:
mode:
authorSimon Hengel <sol@typeful.net>2014-11-02 09:30:38 +0800
committerSimon Hengel <sol@typeful.net>2014-11-03 09:26:11 +0800
commit1c5f4fe3c4e3ef73481855a51af73d8995450e30 (patch)
treead4b6f788a6cae9c9637bfd37a8d1a0fb7ecbbce /haddock-library
parent2f6362ed4b6c16bdd5d01be19876507eeaf918bd (diff)
Derive more instances
Diffstat (limited to 'haddock-library')
-rw-r--r--haddock-library/src/Documentation/Haddock/Types.hs9
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