module Media.Subtitles.SRT
( Line (..),
SRT (..),
)
where
import Data.Kind (Type)
import Data.Text (Text)
import Media.Timestamp (Range)
type Line :: Type
data Line = Line
{ Line -> Int
index :: Int,
Line -> Range
range :: Range,
Line -> Text
dialog :: Text
}
deriving stock (Line -> Line -> Bool
(Line -> Line -> Bool) -> (Line -> Line -> Bool) -> Eq Line
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: Line -> Line -> Bool
$c/= :: Line -> Line -> Bool
== :: Line -> Line -> Bool
$c== :: Line -> Line -> Bool
Eq, Int -> Line -> ShowS
[Line] -> ShowS
Line -> String
(Int -> Line -> ShowS)
-> (Line -> String) -> ([Line] -> ShowS) -> Show Line
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [Line] -> ShowS
$cshowList :: [Line] -> ShowS
show :: Line -> String
$cshow :: Line -> String
showsPrec :: Int -> Line -> ShowS
$cshowsPrec :: Int -> Line -> ShowS
Show, Eq Line
Eq Line
-> (Line -> Line -> Ordering)
-> (Line -> Line -> Bool)
-> (Line -> Line -> Bool)
-> (Line -> Line -> Bool)
-> (Line -> Line -> Bool)
-> (Line -> Line -> Line)
-> (Line -> Line -> Line)
-> Ord Line
Line -> Line -> Bool
Line -> Line -> Ordering
Line -> Line -> Line
forall a.
Eq a
-> (a -> a -> Ordering)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> Bool)
-> (a -> a -> a)
-> (a -> a -> a)
-> Ord a
min :: Line -> Line -> Line
$cmin :: Line -> Line -> Line
max :: Line -> Line -> Line
$cmax :: Line -> Line -> Line
>= :: Line -> Line -> Bool
$c>= :: Line -> Line -> Bool
> :: Line -> Line -> Bool
$c> :: Line -> Line -> Bool
<= :: Line -> Line -> Bool
$c<= :: Line -> Line -> Bool
< :: Line -> Line -> Bool
$c< :: Line -> Line -> Bool
compare :: Line -> Line -> Ordering
$ccompare :: Line -> Line -> Ordering
$cp1Ord :: Eq Line
Ord)
type SRT :: Type
newtype SRT = SRT {SRT -> [Line]
unSRT :: [Line]}
deriving stock (SRT -> SRT -> Bool
(SRT -> SRT -> Bool) -> (SRT -> SRT -> Bool) -> Eq SRT
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: SRT -> SRT -> Bool
$c/= :: SRT -> SRT -> Bool
== :: SRT -> SRT -> Bool
$c== :: SRT -> SRT -> Bool
Eq, Int -> SRT -> ShowS
[SRT] -> ShowS
SRT -> String
(Int -> SRT -> ShowS)
-> (SRT -> String) -> ([SRT] -> ShowS) -> Show SRT
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [SRT] -> ShowS
$cshowList :: [SRT] -> ShowS
show :: SRT -> String
$cshow :: SRT -> String
showsPrec :: Int -> SRT -> ShowS
$cshowsPrec :: Int -> SRT -> ShowS
Show)