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 -- trac m x = trace m x {-# INLINE trac #-} 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)]