]> Git — Sourcephile - doclang.git/blob - Language/TCT/Elem.hs
Rename Group -> Pair.
[doclang.git] / Language / TCT / Elem.hs
1 module Language.TCT.Elem where
2
3 import Data.Eq (Eq)
4 import Data.Semigroup (Semigroup(..))
5 import Data.String (String)
6 import Data.Text (Text)
7 import Text.Show (Show(..))
8
9 -- import Debug.Trace (trace)
10 trac :: String -> a -> a
11 trac _m x = x
12 -- trac m x = trace m x
13 dbg :: Show a => String -> a -> a
14 dbg m x = trac (m <> ": " <> show x) x
15
16 -- * Type 'Elem'
17 type Elem = Text
18
19 -- ** Type 'Attr'
20 data Attr
21 = Attr
22 { attr_name :: Text
23 , attr_open :: Text
24 , attr_value :: Text
25 , attr_close :: Text
26 }
27 deriving (Eq,Show)
28
29 -- ** Type 'White'
30 type White = Text
31
32 -- ** Type 'Attrs'
33 type Attrs = [(White,Attr)]