module Mpv.Data.VideoProgress where

import Polysemy.Time.Json (json)

newtype VideoProgress =
  VideoProgress { VideoProgress -> Double
unVideoProgress :: Double }
  deriving stock (VideoProgress -> VideoProgress -> Bool
(VideoProgress -> VideoProgress -> Bool)
-> (VideoProgress -> VideoProgress -> Bool) -> Eq VideoProgress
forall a. (a -> a -> Bool) -> (a -> a -> Bool) -> Eq a
/= :: VideoProgress -> VideoProgress -> Bool
$c/= :: VideoProgress -> VideoProgress -> Bool
== :: VideoProgress -> VideoProgress -> Bool
$c== :: VideoProgress -> VideoProgress -> Bool
Eq, Int -> VideoProgress -> ShowS
[VideoProgress] -> ShowS
VideoProgress -> String
(Int -> VideoProgress -> ShowS)
-> (VideoProgress -> String)
-> ([VideoProgress] -> ShowS)
-> Show VideoProgress
forall a.
(Int -> a -> ShowS) -> (a -> String) -> ([a] -> ShowS) -> Show a
showList :: [VideoProgress] -> ShowS
$cshowList :: [VideoProgress] -> ShowS
show :: VideoProgress -> String
$cshow :: VideoProgress -> String
showsPrec :: Int -> VideoProgress -> ShowS
$cshowsPrec :: Int -> VideoProgress -> ShowS
Show, (forall x. VideoProgress -> Rep VideoProgress x)
-> (forall x. Rep VideoProgress x -> VideoProgress)
-> Generic VideoProgress
forall x. Rep VideoProgress x -> VideoProgress
forall x. VideoProgress -> Rep VideoProgress x
forall a.
(forall x. a -> Rep a x) -> (forall x. Rep a x -> a) -> Generic a
$cto :: forall x. Rep VideoProgress x -> VideoProgress
$cfrom :: forall x. VideoProgress -> Rep VideoProgress x
Generic)
  deriving newtype (Integer -> VideoProgress
VideoProgress -> VideoProgress
VideoProgress -> VideoProgress -> VideoProgress
(VideoProgress -> VideoProgress -> VideoProgress)
-> (VideoProgress -> VideoProgress -> VideoProgress)
-> (VideoProgress -> VideoProgress -> VideoProgress)
-> (VideoProgress -> VideoProgress)
-> (VideoProgress -> VideoProgress)
-> (VideoProgress -> VideoProgress)
-> (Integer -> VideoProgress)
-> Num VideoProgress
forall a.
(a -> a -> a)
-> (a -> a -> a)
-> (a -> a -> a)
-> (a -> a)
-> (a -> a)
-> (a -> a)
-> (Integer -> a)
-> Num a
fromInteger :: Integer -> VideoProgress
$cfromInteger :: Integer -> VideoProgress
signum :: VideoProgress -> VideoProgress
$csignum :: VideoProgress -> VideoProgress
abs :: VideoProgress -> VideoProgress
$cabs :: VideoProgress -> VideoProgress
negate :: VideoProgress -> VideoProgress
$cnegate :: VideoProgress -> VideoProgress
* :: VideoProgress -> VideoProgress -> VideoProgress
$c* :: VideoProgress -> VideoProgress -> VideoProgress
- :: VideoProgress -> VideoProgress -> VideoProgress
$c- :: VideoProgress -> VideoProgress -> VideoProgress
+ :: VideoProgress -> VideoProgress -> VideoProgress
$c+ :: VideoProgress -> VideoProgress -> VideoProgress
Num, Eq VideoProgress
Eq VideoProgress
-> (VideoProgress -> VideoProgress -> Ordering)
-> (VideoProgress -> VideoProgress -> Bool)
-> (VideoProgress -> VideoProgress -> Bool)
-> (VideoProgress -> VideoProgress -> Bool)
-> (VideoProgress -> VideoProgress -> Bool)
-> (VideoProgress -> VideoProgress -> VideoProgress)
-> (VideoProgress -> VideoProgress -> VideoProgress)
-> Ord VideoProgress
VideoProgress -> VideoProgress -> Bool
VideoProgress -> VideoProgress -> Ordering
VideoProgress -> VideoProgress -> VideoProgress
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 :: VideoProgress -> VideoProgress -> VideoProgress
$cmin :: VideoProgress -> VideoProgress -> VideoProgress
max :: VideoProgress -> VideoProgress -> VideoProgress
$cmax :: VideoProgress -> VideoProgress -> VideoProgress
>= :: VideoProgress -> VideoProgress -> Bool
$c>= :: VideoProgress -> VideoProgress -> Bool
> :: VideoProgress -> VideoProgress -> Bool
$c> :: VideoProgress -> VideoProgress -> Bool
<= :: VideoProgress -> VideoProgress -> Bool
$c<= :: VideoProgress -> VideoProgress -> Bool
< :: VideoProgress -> VideoProgress -> Bool
$c< :: VideoProgress -> VideoProgress -> Bool
compare :: VideoProgress -> VideoProgress -> Ordering
$ccompare :: VideoProgress -> VideoProgress -> Ordering
Ord, Int -> VideoProgress
VideoProgress -> Int
VideoProgress -> [VideoProgress]
VideoProgress -> VideoProgress
VideoProgress -> VideoProgress -> [VideoProgress]
VideoProgress -> VideoProgress -> VideoProgress -> [VideoProgress]
(VideoProgress -> VideoProgress)
-> (VideoProgress -> VideoProgress)
-> (Int -> VideoProgress)
-> (VideoProgress -> Int)
-> (VideoProgress -> [VideoProgress])
-> (VideoProgress -> VideoProgress -> [VideoProgress])
-> (VideoProgress -> VideoProgress -> [VideoProgress])
-> (VideoProgress
    -> VideoProgress -> VideoProgress -> [VideoProgress])
-> Enum VideoProgress
forall a.
(a -> a)
-> (a -> a)
-> (Int -> a)
-> (a -> Int)
-> (a -> [a])
-> (a -> a -> [a])
-> (a -> a -> [a])
-> (a -> a -> a -> [a])
-> Enum a
enumFromThenTo :: VideoProgress -> VideoProgress -> VideoProgress -> [VideoProgress]
$cenumFromThenTo :: VideoProgress -> VideoProgress -> VideoProgress -> [VideoProgress]
enumFromTo :: VideoProgress -> VideoProgress -> [VideoProgress]
$cenumFromTo :: VideoProgress -> VideoProgress -> [VideoProgress]
enumFromThen :: VideoProgress -> VideoProgress -> [VideoProgress]
$cenumFromThen :: VideoProgress -> VideoProgress -> [VideoProgress]
enumFrom :: VideoProgress -> [VideoProgress]
$cenumFrom :: VideoProgress -> [VideoProgress]
fromEnum :: VideoProgress -> Int
$cfromEnum :: VideoProgress -> Int
toEnum :: Int -> VideoProgress
$ctoEnum :: Int -> VideoProgress
pred :: VideoProgress -> VideoProgress
$cpred :: VideoProgress -> VideoProgress
succ :: VideoProgress -> VideoProgress
$csucc :: VideoProgress -> VideoProgress
Enum, Num VideoProgress
Ord VideoProgress
Num VideoProgress
-> Ord VideoProgress
-> (VideoProgress -> Rational)
-> Real VideoProgress
VideoProgress -> Rational
forall a. Num a -> Ord a -> (a -> Rational) -> Real a
toRational :: VideoProgress -> Rational
$ctoRational :: VideoProgress -> Rational
Real, Num VideoProgress
Num VideoProgress
-> (VideoProgress -> VideoProgress -> VideoProgress)
-> (VideoProgress -> VideoProgress)
-> (Rational -> VideoProgress)
-> Fractional VideoProgress
Rational -> VideoProgress
VideoProgress -> VideoProgress
VideoProgress -> VideoProgress -> VideoProgress
forall a.
Num a
-> (a -> a -> a) -> (a -> a) -> (Rational -> a) -> Fractional a
fromRational :: Rational -> VideoProgress
$cfromRational :: Rational -> VideoProgress
recip :: VideoProgress -> VideoProgress
$crecip :: VideoProgress -> VideoProgress
/ :: VideoProgress -> VideoProgress -> VideoProgress
$c/ :: VideoProgress -> VideoProgress -> VideoProgress
Fractional, Fractional VideoProgress
Real VideoProgress
Real VideoProgress
-> Fractional VideoProgress
-> (forall b. Integral b => VideoProgress -> (b, VideoProgress))
-> (forall b. Integral b => VideoProgress -> b)
-> (forall b. Integral b => VideoProgress -> b)
-> (forall b. Integral b => VideoProgress -> b)
-> (forall b. Integral b => VideoProgress -> b)
-> RealFrac VideoProgress
forall b. Integral b => VideoProgress -> b
forall b. Integral b => VideoProgress -> (b, VideoProgress)
forall a.
Real a
-> Fractional a
-> (forall b. Integral b => a -> (b, a))
-> (forall b. Integral b => a -> b)
-> (forall b. Integral b => a -> b)
-> (forall b. Integral b => a -> b)
-> (forall b. Integral b => a -> b)
-> RealFrac a
floor :: forall b. Integral b => VideoProgress -> b
$cfloor :: forall b. Integral b => VideoProgress -> b
ceiling :: forall b. Integral b => VideoProgress -> b
$cceiling :: forall b. Integral b => VideoProgress -> b
round :: forall b. Integral b => VideoProgress -> b
$cround :: forall b. Integral b => VideoProgress -> b
truncate :: forall b. Integral b => VideoProgress -> b
$ctruncate :: forall b. Integral b => VideoProgress -> b
properFraction :: forall b. Integral b => VideoProgress -> (b, VideoProgress)
$cproperFraction :: forall b. Integral b => VideoProgress -> (b, VideoProgress)
RealFrac)

json ''VideoProgress