module Language.TCT.Elem where import Data.Eq (Eq) import Data.Semigroup (Semigroup(..)) import Data.String (String) import Data.Text (Text) import Text.Show (Show(..)) -- import Debug.Trace (trace) trac :: String -> a -> a trac _m x = x {-# INLINE trac #-} -- trac m x = trace m x dbg :: Show a => String -> a -> a dbg m x = trac (m <> ": " <> show x) x {-# INLINE dbg #-} -- * Type 'Elem' type Elem = Text -- ** Type 'Attr' data Attr = Attr { attr_name :: Text , attr_open :: Text , attr_value :: Text , attr_close :: Text } deriving (Eq,Show) -- ** Type 'White' type White = Text -- ** Type 'Attrs' type Attrs = [(White,Attr)]