module DerivationTrees.Basics
where
import Data.Monoid
data LineStyle = None | Simple | Double | Dotted | Dashed | Waved | TeXDotted
deriving (Enum,Show)
data Link = Link {label :: TeX, style :: LineStyle, align :: Alignment, steps :: Int}
| Detached {ident :: Int, label :: TeX}
| Delayed {align :: Alignment}
deriving Show
defaultLink :: Link
defaultLink = Link mempty Dotted CenterA 0
data Alignment = LeftA | CenterA | RightA
instance Show Alignment where
show LeftA = "l"
show CenterA = "c"
show RightA = "r"
newtype TeX = TeX String
deriving (Show, Monoid)
(<>) = mappend
void :: TeX -> Bool
void (TeX x) = null x