srt-0.1.2.0: src/Media/Subtitles/SRT.hs
-- |
-- Module : Media.Subtitles.SRT
-- License : MIT
-- Stability : experimental
--
-- The SRT subtitle type.
module Media.Subtitles.SRT
( Line (..),
SRT (..),
)
where
import Data.Kind (Type)
import Data.Text (Text)
import Media.Timestamp (Range)
-- | Data type for a single line in SRT.
--
-- @since 0.1.0.0
type Line :: Type
data Line = Line
{ index :: Int,
range :: Range,
dialog :: Text
}
deriving stock (Eq, Show, Ord)
-- | SRT data type.
--
-- @since 0.1.0.0
type SRT :: Type
newtype SRT = SRT {unSRT :: [Line]}
deriving stock (Eq, Show)