module Language.TCT.Elem where import Data.Eq (Eq) import Data.Ord (Ord) 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,Ord,Show) -- ** Type 'White' type White = Text -- ** Type 'Attrs' type Attrs = [(White,Attr)]