    module Graphics.Vty.UnicodeWidthTable.Types
      ( UnicodeWidthTable(..)
      , WidthTableRange(..)
      )
    where

    import Data.Word (Word8, Word32)

    -- | A range of code points in a width table.
    data WidthTableRange =
        WidthTableRange { WidthTableRange -> Word32
    rangeStart :: Word32
                        -- ^ The range's starting code point.
                        , WidthTableRange -> Word32
    rangeSize :: Word32
                        -- ^ The number of code points in the contiguous
                        -- range, beginning with the starting code point
                        -- ('rangeStart').
                        , WidthTableRange -> Word8
    rangeColumns :: Word8
                        -- ^ The terminal width, in columns, of all of the
                        -- characters corresponding to the code points in
                        -- this range.
                        }
        deriving (WidthTableRange -> WidthTableRange -> Bool
    (WidthTableRange -> WidthTableRange -> Bool)
    -> (WidthTableRange -> WidthTableRange -> Bool)
    -> Eq WidthTableRange
    forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
    $c== :: WidthTableRange -> WidthTableRange -> Bool
    == :: WidthTableRange -> WidthTableRange -> Bool
    $c/= :: WidthTableRange -> WidthTableRange -> Bool
    /= :: WidthTableRange -> WidthTableRange -> Bool
    Eq, Int -> WidthTableRange -> ShowS
    [WidthTableRange] -> ShowS
    WidthTableRange -> String
    (Int -> WidthTableRange -> ShowS)
    -> (WidthTableRange -> String)
    -> ([WidthTableRange] -> ShowS)
    -> Show WidthTableRange
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> WidthTableRange -> ShowS
    showsPrec :: Int -> WidthTableRange -> ShowS
    $cshow :: WidthTableRange -> String
    show :: WidthTableRange -> String
    $cshowList :: [WidthTableRange] -> ShowS
    showList :: [WidthTableRange] -> ShowS
    Show)

    -- | A run-length-encoded table of Unicode character widths.
    data UnicodeWidthTable =
        UnicodeWidthTable { UnicodeWidthTable -> [WidthTableRange]
    unicodeWidthTableRanges :: [WidthTableRange]
                          -- ^ The ranges in the table.
                          }
        deriving (Int -> UnicodeWidthTable -> ShowS
    [UnicodeWidthTable] -> ShowS
    UnicodeWidthTable -> String
    (Int -> UnicodeWidthTable -> ShowS)
    -> (UnicodeWidthTable -> String)
    -> ([UnicodeWidthTable] -> ShowS)
    -> Show UnicodeWidthTable
    forall a.
    (Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
    $cshowsPrec :: Int -> UnicodeWidthTable -> ShowS
    showsPrec :: Int -> UnicodeWidthTable -> ShowS
    $cshow :: UnicodeWidthTable -> String
    show :: UnicodeWidthTable -> String
    $cshowList :: [UnicodeWidthTable] -> ShowS
    showList :: [UnicodeWidthTable] -> ShowS
    Show)