]> Git — Sourcephile - doclang.git/blob - Text/Blaze/XML.hs
Update to megaparsec-7 and new symantic-xml
[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
6 import Prelude (Double)
7 import Text.Blaze
8 import Text.Blaze.Utils
9 import Text.Show (Show(..))
10 import qualified Language.Symantic.XML as XML
11
12 import Hdoc.Utils (Nat(..), Nat1(..))
13
14 -- * Type 'XML'
15 type XML = Markup
16
17 instance Attrify URL where
18 attrify (URL a) = attrify a
19 instance Attrify Nat where
20 attrify (Nat a) = attrify a
21 instance Attrify Nat1 where
22 attrify (Nat1 a) = attrify a
23 instance Attrify Ident where
24 attrify (Ident i) = attrify i
25 instance Attrify Double where
26 attrify = attrify . show
27 instance Attrify XML.NCName where
28 attrify = attrify . show . XML.unNCName
29
30 instance MayAttr URL where
31 mayAttr a (URL t) = mayAttr a t
32 instance MayAttr Ident where
33 mayAttr a (Ident t) = mayAttr a t
34 instance MayAttr Nat where
35 mayAttr a (Nat t) = mayAttr a t
36 instance MayAttr Nat1 where
37 mayAttr a (Nat1 t) = mayAttr a t