{-# LANGUAGE FlexibleInstances #-}
{-# LANGUAGE EmptyDataDecls #-}
module Text.Layout.Table.Position.Internal where
import Data.Default.Class
data Position orientation
= Start
| Center
| End
deriving Eq
instance Show (Position H) where
show p = case p of
Start -> "left"
Center -> "center"
End -> "right"
instance Show (Position V) where
show p = case p of
Start -> "top"
Center -> "center"
End -> "bottom"
instance Default (Position orientation) where
def = Start
data H
data V
left :: Position H
left = Start
right :: Position H
right = End
center :: Position orientation
center = Center
top :: Position V
top = Start
bottom :: Position V
bottom = End