]> Git — Sourcephile - doclang.git/blob - Text/Blaze/XML.hs
stack: fix locations
[doclang.git] / Text / Blaze / XML.hs
1 {-# OPTIONS_GHC -fno-warn-orphans #-}
2 module Text.Blaze.XML where
3
4 import Data.Function ((.))
5 import Hdoc.XML hiding (XML)
6 import Prelude (Double)
7 import Text.Blaze
8 import Text.Blaze.Utils
9 import Text.Show (Show(..))
10
11 import Hdoc.Utils (Nat(..), Nat1(..))
12
13 -- * Type 'XML'
14 type XML = Markup
15
16 instance Attrify URL where
17 attrify (URL a) = attrify a
18 instance Attrify Nat where
19 attrify (Nat a) = attrify a
20 instance Attrify Nat1 where
21 attrify (Nat1 a) = attrify a
22 instance Attrify Ident where
23 attrify (Ident i) = attrify i
24 instance Attrify Double where
25 attrify = attrify . show
26
27 instance MayAttr URL where
28 mayAttr a (URL t) = mayAttr a t
29 instance MayAttr Ident where
30 mayAttr a (Ident t) = mayAttr a t
31 instance MayAttr Nat where
32 mayAttr a (Nat t) = mayAttr a t
33 instance MayAttr Nat1 where
34 mayAttr a (Nat1 t) = mayAttr a t